Use Windows Explorer & Bash on Ubuntu on Windows

Question

I started by asking myself, “How can I use the Windows Explorer to create folders or files in my home directory using ‘Bash on Ubuntu on Windows’?”AskUbuntu

I tried the following:

Enter C:\Users{user}\AppData\Local\lxss{username} in the Windows Explorer
Create a folder named "scripts" using Windows Explorer
Open Bash on Ubuntu on Windows
$ ls -a
total 0

RESULT: total 0 DOESN’T WORK

I wondered if there any plans to make something like this work?

Work Around

I found “sort of” a Work Around

1. I used bash commands $ mkdir and $ touch to create folders and files 
i.e. scripts/menu.py
2. I used the Windows Explorer and Notepad++ to edit menu.py
3. $ python scripts/menu.py 
WORKS

#ubuntu-windows

Flask with pywebview Example

Flask with pywebview Example

I mashed up 2 things:

Here’s the project dir structure (minimal Flask):

C:\Users\joeco\PycharmProjects\pyWebviewFlask>tree /F /A
Folder PATH listing for volume Windows
Volume serial number is F2FB-4810
C:.
|   pyWebviewFlask.py
|
+---.idea
|       encodings.xml
|       misc.xml
|       modules.xml
|       pyWebviewFlask.iml
|       workspace.xml
|
+---static
\---templates

Here’s the code in pyWebviewFlask.py:

"""

__author__      = "Joe Dorocak (JoeCodeswell@gmail.com)"
__copyright__   = "Copyright 2016, Joe Dorocak (JoeCodeswell.com)"
__license__ = "MIT"

PyCharm project type: flask
Templating language (std for Flask) : Jinja2
pywebview == webview: https://github.com/r0x0r/pywebview (by Roman Sirokov already installed for py2 & py3)
    https://github.com/r0x0r/pywebview/blob/master/examples/http_server.py

Flask views: http://flask.pocoo.org/docs/0.11/tutorial/views/

https://opensource.org/licenses

"""
from flask import Flask


import webview
import sys
import threading

app = Flask(__name__)


@app.route('/')
def hello_world():
    return 'Hello to the World!'

def start_server():
    app.run()

if __name__ == '__main__':
    """  https://github.com/r0x0r/pywebview/blob/master/examples/http_server.py
    """

    t = threading.Thread(target=start_server)
    t.daemon = True
    t.start()

    webview.create_window("It works, Joe!", "http://127.0.0.1:5000/")

    sys.exit()

Here’s a link to a screenshot of the result:
flask-pyview-shot

#app-development-2, #flask, #python, #pywebview, #webview