[BangPypers] Plzzz help me!!!!!!!!!
Amit Saha
lists.amitsaha at gmail.com
Mon Jan 18 08:34:34 CET 2010
Smrutilekha Swain wrote:
> hi...this is my code...but...it is not working...in this programme i want
> the pdf will be copied from source to destination after it is generated....
>
> ##############################################
>
> import os
> import shutil
>
> src = os.getcwd()
> dest = "E:\home\smruti\Python\PostMissionAnalysis\presentation"
>
> #################################################################
>
> def file_moved(filename):
> #filename = 'newfile.pdf'
> file_list = os.listdir(os.curdir)
> for eachfile in file_list:
> if (eachfile == filename):
> shutil.copy(src,dest)
I guess, 'src' needs a filename, right now, its your os.getcwd(). you
should probably set it to os.getcwd() + 'filename'.
HTH,
Amit
--
Journal: http://amitksaha.wordpress.com
µ-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux
More information about the BangPypers
mailing list