Re: [Tutor] File locking: cross platform?

2009-02-20 Thread Chris Fuller
There's a recipe in the Python Cookbook that addresses this: http://code.activestate.com/recipes/65203/ There are probably others floating around, too. Cheers ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] File locking: cross platform?

2009-02-20 Thread bob gailer
Bernard Rankin wrote: Hello, What is the correct way to implement cross-platform "flock like" file locking? Specifically, how would i acquire "exclusive read-write" and "shared read-only" locks for a CGI script that I expect to run on both Windows and Linux servers. Some other tutor may have

[Tutor] File locking: cross platform?

2009-02-20 Thread Bernard Rankin
Hello, What is the correct way to implement cross-platform "flock like" file locking? Specifically, how would i acquire "exclusive read-write" and "shared read-only" locks for a CGI script that I expect to run on both Windows and Linux servers. Thank you, :)

Re: [Tutor] File locking

2007-03-21 Thread Alan Gauld
Jeff, Just catching up after a week on vacation, but nobody seems to have picked this up so... > I'm always disappointed when I find something that Python > doesn't handle in a platform independent way. That's often because the platforms all do it too differently! :-) > 1. I don't see a way to

[Tutor] File locking

2007-03-12 Thread Smith, Jeff
I'm always disappointed when I find something that Python doesn't handle in a platform independent way. It seems to me that file locking is in that boat. 1. I don't see a way to atomically open a file for writing if and only if it doesn't exist without resorting to os.open and specialized platfo