On Sunday 18 February 2007 17:27, Gabriel Genellina wrote: > En Sun, 18 Feb 2007 18:09:23 -0300, > jim-on-linux <[EMAIL PROTECTED]> > > escribió: > > I have a simple module that sends text files > > to a printer. Then, it moves the file to the > > 'Fprtd' directory. The module contains the > > following code; > > > > > > ##### > > > > for n in PrtList: > > os.system('type '+n+ ' > prn' > > os.system('move '+n+ ' Fprtd') > > Thanks Geneilina, It works fine. shutil.copyfile(xxx,prn) jim-on-linux
> > ##### > > > > os.system opens and closes a window for each > > file it sends to the printer and again for > > each time it moves a file to the Fprtd > > directory. If there were only a few files, > > this wouldn't be so bad. But, when the files > > number 300 to 400 it becomes objectionable. > > Just code the above in Python itself. > type xxx > prn == copy xxx prn == > shutil.copyfile(xxx,prn) move xxx Fprtd == > shutil.move(xxx, Fprtd) > > -- > Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list