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 at the line "import nt". How can > I reso

unable to import os

2005-10-07 Thread ktxn1020
Hi Experts, I built a scrip file which cleans up the old log files starting from the oldest till the necessary free space on the drive reaches. 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 pyth