Earl Eiland <[EMAIL PROTECTED]> wrote:
>
>A couple of you commented that I should be using os.path.join.
>Accordingly, I rewrote my code. Unfortunately, I still have the same
>problem. the following code snippet
>
>Results.SetOriginal(os.path.getsize(os.path.join(InputDirectory , x)))
>y = str(x
A couple of you commented that I should be using os.path.join.
Accordingly, I rewrote my code. Unfortunately, I still have the same
problem. the following code snippet
Results.SetOriginal(os.path.getsize(os.path.join(InputDirectory , x)))
y = str(x.split('.')[0]) + '.rk'
print InputDirectory, y
A couple of you commented that I should be using os.path.join.
Accordingly, I rewrote my code. Unfortunately, I still have the same
problem. the following code snippet
Results.SetOriginal(os.path.getsize(os.path.join(InputDirectory , x)))
y = str(x.split('.')[0]) + '.rk'
print InputDirectory, y
"Earl Eiland" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> os.path.getsize(Inputdirectory + '\\' + Filename) works, but
> os.path.getsize(Inputdirectory + '\\' + Filename.split('.') + '.ext')
> Fails reporting "no such file or directory
> InputDirectory\\Filename.ext".
> os.path.g
To generate path names take a look at os.path.join(see
http://docs.python.org/lib/module-os.path.html)
--
http://mail.python.org/mailman/listinfo/python-list
Earl Eiland wrote:
os.path.getsize(Inputdirectory + '\\' + Filename) works, but
os.path.getsize(Inputdirectory + '\\' + Filename.split('.') + '.ext')
Fails reporting "no such file or directory
InputDirectory\\Filename.ext".
No, that should be a TypeError. This will be easier if you copy and
paste y