<script type="text/javascript" src="brython.js"></script>
<script type="text/javascript" src="brython_stdlib.js"></script>
</head>
<body onload="brython()">
<script type="text/python">
from browser import document, alert
from browser.html import A,B,DIV
import os,re
fileList = os.listdir(os.getcwd())
names = str(fileList)
alert(names)
fileNames = os.popen("ls /home/user/folder").read()
alert(filenames)
#################
nothing popup by the vars,which seems Lib os did not work this style
but, some os operation is ok, like os.getcwd()
any comments are welcome!!
thanks
/Yijun
Hello Brython experts
i am the newcomer for Brython, so i have some "stupid" question related to the usage of Brython's standard lib like OS
i wish i could list my local directory, then i could do some handling, like:
.....<script type="text/javascript" src="brython.js"></script>
<script type="text/javascript" src="brython_stdlib.js"></script>
</head>
<body onload="brython()">
<script type="text/python">
from browser import document, alert
from browser.html import A,B,DIV
import os,re
fileList = os.listdir(os.getcwd())
names = str(fileList)
alert(names)
fileNames = os.popen("ls /home/user/folder").read()
alert(filenames)
#################
nothing popup by the vars,which seems Lib os did not work this style
but, some os operation is ok, like os.getcwd()
any comments are welcome!!
thanks
/Yijun
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+u...@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/24e61bb6-9037-4d47-b152-7aaa304f00f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.