Re: Python Script Cannot Write to Directory

2010-08-06 Thread Jean-Michel Pichavant
Lawrence D'Oliveiro wrote: In message <4c5a6d00$0$29614$426a3...@news.free.fr>, News123 wrote: The original question lacks necessary information That seems to be very common in this newsgroup. ... JM -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Script Cannot Write to Directory

2010-08-06 Thread Lawrence D'Oliveiro
In message <4c5a6d00$0$29614$426a3...@news.free.fr>, News123 wrote: > The original question lacks necessary information That seems to be very common in this newsgroup. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Script Cannot Write to Directory

2010-08-05 Thread News123
On 08/04/2010 09:27 AM, Chris Rebert wrote: > On Wed, Aug 4, 2010 at 12:21 AM, News123 wrote: > >> 3.) try following python >> >> import os >> print os.getcwd() >> import shutil >> shutil("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME") > > WTF; modules aren't callable. Typo? >

Re: Python Script Cannot Write to Directory

2010-08-04 Thread Steven D'Aprano
On Tue, 03 Aug 2010 21:01:38 -0700, Chris Brauchli wrote: > Hi, > > I am writing a script that, at one point, copies a file from directory A > to directory B. Directory B can only be written to by root, but the > script is always called with sudo, so this shouldn't be an issue, but it > is. I hav

Re: Python Script Cannot Write to Directory

2010-08-04 Thread Matteo Landi
On Wed, Aug 4, 2010 at 9:27 AM, Chris Rebert wrote: > On Wed, Aug 4, 2010 at 12:21 AM, News123 wrote: > >> 3.) try following python >> >> import os >> print os.getcwd() >> import shutil >> shutil("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME") > > WTF; modules aren't callable.

Re: Python Script Cannot Write to Directory

2010-08-04 Thread Chris Rebert
On Wed, Aug 4, 2010 at 12:21 AM, News123 wrote: > 3.) try following python > > import os > print os.getcwd() > import shutil > shutil("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME") WTF; modules aren't callable. Typo? Cheers, Chris -- http://blog.rebertia.com -- http://mail.p

Re: Python Script Cannot Write to Directory

2010-08-04 Thread News123
On 08/04/2010 06:01 AM, Chris Brauchli wrote: > Hi, > > I am writing a script that, at one point, copies a file from directory > A to directory B. Directory B can only be written to by root, but the > script is always called with sudo, so this shouldn't be an issue, but > it is. I have tried using

Re: Python Script Cannot Write to Directory

2010-08-03 Thread Albert Hopkins
On Tue, 2010-08-03 at 21:01 -0700, Chris Brauchli wrote: > Hi, > > I am writing a script that, at one point, copies a file from directory > A to directory B. Directory B can only be written to by root, but the > script is always called with sudo, so this shouldn't be an issue, but > it is. I have