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,
:)
>
> I sympatjise but to be honest I never use the backtick trick except at
> the >>> prompt as a quick and dirty hack. It ranks alongside the _ variable
> in my book as an interactive utility but it's too easy to miss or misread to
> use
>
> in real code.
>
> But even popen is easier, I
> > Is:
> >
> > from subprocess import Popen
> > output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
> >
> > Really the replacement for:
> >
> > output = `mycmd myarg`
>
> Yes, because it works more consistently and reliably across
> operating systems for one reason. Its also much
Hello,
I've been reading the Python docs on how to call a 2nd program and getting it's
output, and would up here:
http://docs.python.org/library/subprocess.html
Is:
from subprocess import Popen
output = Popen(["mycmd", "myarg"], stdout=PIPE).communicate()[0]
Really the replacement for:
out
> > I'd like to match any line that does not start with FOO. (Using just a
> > reg-ex
> rule)
> >
> > 1) What is the effective difference between:
> >
> > (?!^FOO).*
> >
> > ^(?!FOO).*
>
> One difference is that the first will match starting anywhere in a
> string, while the second will matc
> > I'd like to match any line that does not start with FOO. (Using just a
> > reg-ex
> rule)
> >
> > 1) What is the effective difference between:
> >
> > (?!^FOO).*
> >
> > ^(?!FOO).*
>
> One difference is that the first will match starting anywhere in a
> string, while the second will matc
> > I'd like to match any line that does not start with FOO. (Using just a
> > reg-ex
> rule)
> >
> > 1) What is the effective difference between:
> >
> > (?!^FOO).*
> >
> > ^(?!FOO).*
> >
> > 2) Is there a better way to do this?
> >
>
> myline = 'FOO things in line'
>
> >>> myline.startswi
Hello,
I'd like to match any line that does not start with FOO. (Using just a reg-ex
rule)
1) What is the effective difference between:
(?!^FOO).*
^(?!FOO).*
2) Is there a better way to do this?
Thanks,
:)
___
Tutor maillist - Tutor
> > Python 2.5 builds fine, but I am getting an error when I run "make" for
> > 2.6.1
> >
> > Here is the command line I am using:
> > ../configure -prefix=/home/username/local-python/ --enable-unicode=ucs4
> >
> > (I don't know what the ucs4 thing is, but all the HOWTOs I saw say to use
>
Hello,
I am trying to build python 2.6 on a machine (web server) that I do not have
root access to. (has 2.4 installed)
Python 2.5 builds fine, but I am getting an error when I run "make" for 2.6.1
Here is the command line I am using:
../configure -prefix=/home/username/local-python/ --enable-u
10 matches
Mail list logo