Re: [Tutor] Escaping globs for glob.iglob()

2012-08-21 Thread Ray Jones
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

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-21 Thread Alan Gauld
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

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Emile van Sebille
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

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Ray Jones
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

Re: [Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Peter Otten
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

[Tutor] Escaping globs for glob.iglob()

2012-08-20 Thread Ray Jones
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