Re: import os

2014-11-16 Thread Dave Angel
Abdul Abdul Wrote in message: > Thanks for your reply. Yes, I came across this page, but didn't understand > what is meant by the operating system dependent functionality. What does that > mean? Is importing that module that serious? > > Please don't top-post here. Add your comments after some

Re: import os

2014-11-16 Thread Chris Angelico
On Mon, Nov 17, 2014 at 12:10 PM, Abdul Abdul wrote: > Thanks for your reply. Yes, I came across this page, but didn't understand > what is meant by the operating system dependent functionality. What does > that mean? Is importing that module that serious? It's not "serious" as in "using this mod

Re: import os

2014-11-16 Thread Dan Stromberg
On Sun, Nov 16, 2014 at 5:10 PM, Abdul Abdul wrote: > Thanks for your reply. Yes, I came across this page, but didn't understand > what is meant by the operating system dependent functionality. What does > that mean? Is importing that module that serious? The os module has mostly lower level OS i

Re: import os

2014-11-16 Thread Abdul Abdul
Thanks for your reply. Yes, I came across this page, but didn't understand what is meant by the operating system dependent functionality. What does that mean? Is importing that module that serious? Thanks. On Sun, Nov 16, 2014 at 11:02 PM, Chris Angelico wrote: > On Mon, Nov 17, 2014 at 8:56 AM

Re: import os

2014-11-16 Thread Chris Angelico
On Mon, Nov 17, 2014 at 8:56 AM, Abdul Abdul wrote: > I tried to refer to Python documentation for what "os" refers to, but, the > explanation was not clear. If it's something you import, what you want is the module of that name. Searching the web for 'python os module' should bring you straight

import os

2014-11-16 Thread Abdul Abdul
I tried to refer to Python documentation for what "os" refers to, but, the explanation was not clear. When we write something like: import os What do we mean here? What is the purpose of such import? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: import os or import os.path

2011-09-06 Thread Joe Riopel
On Tue, Sep 6, 2011 at 5:25 PM, Jabba Laci wrote: > Hi, > > If I want to use the 'os.path' module, it's enought to import 'os': > > import os > if os.path.isfile('/usr/bin/bash'): >    print 'got it' > > In other source cod

Re: import os or import os.path

2011-09-06 Thread Mark Hammond
On 7/09/2011 7:47 AM, Ian Kelly wrote: On Tue, Sep 6, 2011 at 3:25 PM, Jabba Laci wrote: Hi, If I want to use the 'os.path' module, it's enought to import 'os': import os if os.path.isfile('/usr/bin/bash'): print 'got it' In other source code

Re: import os or import os.path

2011-09-06 Thread Ian Kelly
On Tue, Sep 6, 2011 at 3:25 PM, Jabba Laci wrote: > Hi, > > If I want to use the 'os.path' module, it's enought to import 'os': > > import os > if os.path.isfile('/usr/bin/bash'): >    print 'got it' > > In other source cod

import os or import os.path

2011-09-06 Thread Jabba Laci
Hi, If I want to use the 'os.path' module, it's enought to import 'os': import os if os.path.isfile('/usr/bin/bash'): print 'got it' In other source codes I noticed that people write 'import os.path' in this case. Which is better practi

Re: Jython - problem import os

2007-08-14 Thread nmin
Thats it ... Additionally I had to set the python path with sys.path.append to the Lib folder .. and now it works perfect. thanks a lot Simon -- http://mail.python.org/mailman/listinfo/python-list

RE: Jython - problem import os

2007-08-08 Thread Delaney, Timothy (Tim)
[EMAIL PROTECTED] wrote: > I'm using Jython in combination with Java, webservices and jboss4.0.4. > > The webservice is implemented in java and creates an PythonInterpreter > object which loads the jython scripts. > I wrote an jython script which uses a function from another jython > file called

Jython - problem import os

2007-08-08 Thread nmin
wrote: service.java public void webMethod(){ PythonInterpreter p = new PythonInterpreter() p.execfile(skript.py) } skript.py == from library import * test=testFunction() library.py === import os def testFunction(): os.getcwd() ...all these files are inside my ear-archive an

Re: unable to import os

2005-10-11 Thread jepler
Concatenating filenames with "+" is seldom what you want. Instead, you should use os.path.join (or, to decrease portability, nt.path.join). Jeff pgpUKTuVnB2qh.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: unable to import os

2005-10-11 Thread ktxn1020
I had the following code run with Python for Delphi. It works. while IsCDriveNotEnoughSpace(): dirlist = nt.listdir(CPath) listsize = len(dirlist) if listsize > 2: file = dirlist[0] nt.remove(CPath + dirlist[0]) PyLog(file + " in C:\logs has been delete

Re: unable to import os

2005-10-11 Thread ktxn1020
It works fine independently, but still not work when run with Python for Delphi. -- http://mail.python.org/mailman/listinfo/python-list

Re: unable to import os

2005-10-10 Thread Fredrik Lundh
Kim Nguyen wrote: > Fredrik Lundh,I replaced mtime = os.stat(Path + > file_name)[os.path.stat.ST_MTIME] > with mtime = nt.stat("q.py") per your suggested, then ran it from IDLE 2.4.2. > Here is > the message I got oh, sorry, that was an example that accidentally slipped through. I somehow exp

unable to import os

2005-10-10 Thread Kim Nguyen
Fredrik Lundh,I replaced mtime = os.stat(Path + file_name)[os.path.stat.ST_MTIME] with  mtime = nt.stat("q.py") per your suggested, then ran it from IDLE 2.4.2. Here is the message I got, Traceback (most recent call last):   File "C:\Documents and Settings\nguyeki\Desktop\Oct7", line 37, in -topl

Re: unable to import os

2005-10-07 Thread Fredrik Lundh
"ktxn1020" wrote: > The script ran well independently using Python's Integrated > Development Environment version 2.4.1. When it is called from Borland > C++ Builder 5 with python for delphi version 3.16, it is complained at > the line "import os", but not

unable to import os

2005-10-07 Thread ktxn1020
with python for delphi version 3.16, it is complained at the line "import os", but not at the line "import nt". How can I resolve this? I wonder if there is a built_in command in NT OS specific to get date and time of a file. The following command is what I used in my sc