On 2013-11-12, Steven D'Aprano
wrote:
> Using os.path.exists before opening a file is, for the most
> part, a waste of time.
I use it in conjuction with file creation times to check that I
didn't forget to update/create one of the data files a process
might need.
Since I have to create the data
On Tue, 12 Nov 2013 11:24:02 +0100, Peter Otten wrote:
> unknown wrote:
>
>> On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote:
>>
>>> So I want to take the file, "desktop/test.txt" and write it to
>>> "desktop/newfolder/test.txt". I tried the below script, and it gave
>>> me:
>>> "IOError: [Errno
unknown wrote:
> On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote:
>
>> So I want to take the file, "desktop/test.txt" and write it to
>> "desktop/newfolder/test.txt". I tried the below script, and it gave me:
>> "IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'". Any
>> suggestions w
On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote:
> So I want to take the file, "desktop/test.txt" and write it to
> "desktop/newfolder/test.txt". I tried the below script, and it gave me:
> "IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'". Any
> suggestions would be great.
>
>
>
On Tue, Nov 12, 2013 at 4:42 PM, Rick Johnson
wrote:
> On Monday, November 11, 2013 5:11:52 PM UTC-6, Chris Angelico wrote:
>> On Tue, Nov 12, 2013 at 9:51 AM, Rick Johnson
>> > 1. i believe win32 file paths require a qualifying volume
>> > letter.
>> They do not; omitting the drive letter makes t
On Monday, November 11, 2013 5:11:52 PM UTC-6, Chris Angelico wrote:
> On Tue, Nov 12, 2013 at 9:51 AM, Rick Johnson
> > 1. i believe win32 file paths require a qualifying volume
> > letter.
> They do not; omitting the drive letter makes the path relative to the
> current drive (and since it doesn'
On Tue, Nov 12, 2013 at 9:44 AM, Joel Goldstick
wrote:
> Sorry for incorect answer. Those guys nailed it
Your answer wasn't incorrect, because it didn't give any false
information. Bob and I saw the problem itself and gave advice, but you
gave useful general advice on how to find the problem, whi
On Mon, 11 Nov 2013 14:51:45 -0800, Rick Johnson wrote:
> 2. Never, ever, *EVER* write data to disc before confirming the paths
> your passing are pointing to the location you intended to write the
> data. Use os.path.exists(path) to test your paths BEFORE trying to write
> data.
This is subject
On Tue, Nov 12, 2013 at 9:51 AM, Rick Johnson
wrote:
> On Monday, November 11, 2013 4:26:46 PM UTC-6, Matt wrote:
>
>> So I want to take the file, "desktop/test.txt" and write
>> it to "desktop/newfolder/test.txt". I tried the below
>> script, and it gave me: "IOError: [Errno 2] No such file
>> or
Thank you guys so much. Brain fart moment. I appreciate it
--
https://mail.python.org/mailman/listinfo/python-list
On Monday, November 11, 2013 4:26:46 PM UTC-6, Matt wrote:
> So I want to take the file, "desktop/test.txt" and write
> it to "desktop/newfolder/test.txt". I tried the below
> script, and it gave me: "IOError: [Errno 2] No such file
> or directory: 'desktop/%s.txt'". Any suggestions would be
> gre
On 11/11/2013 22:26, Matt wrote:
So I want to take the file, "desktop/test.txt" and write it to
"desktop/newfolder/test.txt". I tried the below script, and it gave me: "IOError: [Errno 2] No
such file or directory: 'desktop/%s.txt'". Any suggestions would be great.
def firstdev(file):
Sorry for incorect answer. Those guys nailed it
On Nov 11, 2013 5:43 PM, "bob gailer" wrote:
> On 11/11/2013 5:26 PM, Matt wrote:
>
>> So I want to take the file, "desktop/test.txt" and write it to
>> "desktop/newfolder/test.txt". I tried the below script, and it gave me:
>> "IOError: [Errno 2] N
On 11/11/2013 5:26 PM, Matt wrote:
So I want to take the file, "desktop/test.txt" and write it to
"desktop/newfolder/test.txt". I tried the below script, and it gave me: "IOError: [Errno 2] No
such file or directory: 'desktop/%s.txt'". Any suggestions would be great.
def firstdev(file):
On Tue, Nov 12, 2013 at 9:26 AM, Matt wrote:
> So I want to take the file, "desktop/test.txt" and write it to
> "desktop/newfolder/test.txt". I tried the below script, and it gave me:
> "IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'". Any
> suggestions would be great.
>
>
>
> d
On Mon, Nov 11, 2013 at 5:26 PM, Matt wrote:
> So I want to take the file, "desktop/test.txt" and write it to
> "desktop/newfolder/test.txt". I tried the below script, and it gave me:
> "IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'". Any
> suggestions would be great.
Its bett
16 matches
Mail list logo