On 08/21/2012 12:59 AM, Alan Gauld wrote:
> On 21/08/12 06:42, Ray Jones wrote:
>
>>Files = glob.iglob(os.path.join(znDir, '*'))
>>print Files
>>
>>for moveFile in Files:
>> print moveFile
>>
>> Nothing happens. The 'print...moveFile' never happens, even though print
>> Files shows
On 21/08/12 06:42, Ray Jones wrote:
Files = glob.iglob(os.path.join(znDir, '*'))
print Files
for moveFile in Files:
print moveFile
Nothing happens. The 'print...moveFile' never happens, even though print
Files shows it to be an iglob generator object.
Good but does it contain a
On 8/20/2012 10:42 PM Ray Jones said...
Nothing happens.
>plugh!<
:)
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 08/20/2012 11:05 PM, Peter Otten wrote:
> Ray Jones wrote:
>
>> The code:
>>
>> curDir = os.getcwd()
>> znDir = shutil.abspath('../')
>> baseDir = shutil.abspath('../../')
>>
>> Files = glob.iglob(os.path.join(znDir, '*'))
>> print Files
>>
>> for moveFile in Files:
>> print mo
Ray Jones wrote:
> The code:
>
> curDir = os.getcwd()
> znDir = shutil.abspath('../')
> baseDir = shutil.abspath('../../')
>
> Files = glob.iglob(os.path.join(znDir, '*'))
> print Files
>
> for moveFile in Files:
> print moveFile
> shutil.move(moveFile, curDir)
>
> Nothing
The code:
curDir = os.getcwd()
znDir = shutil.abspath('../')
baseDir = shutil.abspath('../../')
Files = glob.iglob(os.path.join(znDir, '*'))
print Files
for moveFile in Files:
print moveFile
shutil.move(moveFile, curDir)
Nothing happens. The 'print...moveFile' never happens