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
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
It works fine independently, but still not work when run with Python
for Delphi.
--
http://mail.python.org/mailman/listinfo/python-list
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
"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