That is a javascript error which should tell you that you are not in python when it is happening. The translation is correct, but javascript does not have a direct equivalent for a number of reasons. One of the big ones is that javascript is usually downloaded from a server to a client computer, and it would be considered unfriendly software if it ould obtain directory information or make changes to the os on the client computer.
When you use Pyjs you are NOT in Python any more. You can use the API to manipulate a DOM object hosted on the client computer, but put aside notions of controlling the local OS on the client computer. Michael On Mon, Mar 18, 2013 at 6:54 AM, Swapnil Bhavekar < [email protected]> wrote: > i am facing $m.os.listdir is not a function error, when i am using these > functions > > > On Monday, March 18, 2013 7:23:55 PM UTC+5:30, Swapnil Bhavekar wrote: >> >> Hi Guys, >> >> i just information about can we use of following functions* *in pyjs >> >> - * os.getenv("HOME")* >> - *os.listdir(directory_path)* >> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "Pyjs.org Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- --- You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
