On Wed, Apr 30, 2008 at 12:35 PM, J. Cliff Dyer <[EMAIL PROTECTED]> wrote:
> Post working code, and I'll answer your actual question.
Good grief! The code is *not* double spaced! Take a look. Click to the end
of the first line and hit the right arrow key, and see for yourself. As for
not initi
AlFire wrote:
Hi,
I have a piece of software which uses threads in very massive way -
like hundreds of them generated every second.
there is also a piece of code which maintains the number of
outstanding threads, simply
counter+=1 is executed when before starting the thread and counter-=1
"illume" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Ah, why is that?
Were any of the reasons given in
http://www.python.org/dev/peps/pep-0011/
unclear?
It appears you are already aware of MS's non-support of Win98
| Seems like a lot of people using it, so it's still worthwhil
The syllable link at the bottem is not currently working.
The site itself is still alive and distributing 2.5.1
terry
--
http://mail.python.org/mailman/listinfo/python-list
On May 2, 7:45 am, Christian Heimes <[EMAIL PROTECTED]> wrote:
> jmDesktop schrieb:
>
> > I have been to the main python site, but am still confused. I have
> > been using .net, so it may be obvious how to do this to everyone
> > else. I am aware there are various frameworks (Django, Pylons, etc.
Hallöchen!
Ivan Illarionov writes:
> [...]
>
> For me it looks more like an old-school/new-school thing than
> use-case thing. I may be wrong, but I see more and more new
> projects use things like reST and YAML/JSON and it feels like they
> are gradually replacing traditional old-school solution
On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
> On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote:
> > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
> >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wrote:
> >> > On May 1, 12:11 pm, Jon Ribbens <[EMAIL PROTECTED
Come check out this new site on the latest news and reviews on gizmos
and gadgets!
http://gizmohacker.com/
--
http://mail.python.org/mailman/listinfo/python-list
Below is a (flawed) one line RegEx that checks curly brackets (from
awk/c/python input) are being matched. Is there a one liner for doing
this in python?
ThanX
N
re_open_close="(((\{))[^{}]*((?(0)\})))+"
re_open_close=re.compile(re_open_close)
tests="""
{ this is a test BAD
{ this is a test
On May 1, 7:13 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On May 2, 7:45 am, Christian Heimes <[EMAIL PROTECTED]> wrote:
>
>
>
> > jmDesktop schrieb:
>
> > > I have been to the main python site, but am still confused. I have
> > > been using .net, so it may be obvious how to do this to ever
On Thu, 01 May 2008 16:32:00 -0700, Carl Banks wrote:
> On May 1, 4:50 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
>> On Thu, 01 May 2008 11:56:20 -0700, Carl Banks wrote:
>> > On May 1, 1:30 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
>> >> On Thu, 01 May 2008 09:45:28 -0700, Carl Banks wro
jmDesktop <[EMAIL PROTECTED]> writes:
> I am aware there are various frameworks (Django, Pylons, etc.),
> but I would like to know how to create web pages without these. If I
> have mod_python or fastcgi on apache, where do I start? I don't have
> clue where to begin to create a web page from scr
On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote:
> Hallöchen!
>
> Ivan Illarionov writes:
>
>> [...]
>>
>> For me it looks more like an old-school/new-school thing than use-case
>> thing. I may be wrong, but I see more and more new projects use things
>> like reST and YAML/JSON and it
On May 2, 9:44 am, NevilleDNZ <[EMAIL PROTECTED]> wrote:
> Below is a (flawed) one line RegEx that checks curly brackets (from
> awk/c/python input) are being matched. Is there a one liner for doing
> this in python?
>
> ThanX
> N
>
> re_open_close="(((\{))[^{}]*((?(0)\})))+"
> re_open_close=re.co
Hi all
I have this function:
def checkName(self, name):
cur = self.conn.cursor()
sql = "SELECT * from patient WHERE fn_pat = '" + name + "'"
cur.execute(sql)
rows = cur.fetchall()
if rows == "[]":
self.insert()
It seems to work fine, But I'm ge
I'm trying to write a simple program to calculate permutations. I created a
file called "mod.py" and put the following in it:
def factorial(n):
a = n
b = n
while a>0 and b>1:
n = (n)*(b-1)
b = b-1
def perm(n, r):
a = factorial(n)
b = factorial(n-r)
q =
On May 1, 7:54 pm, Ivan Illarionov <[EMAIL PROTECTED]> wrote:
> No, all I want is to give the OP a useful alternative
Fair enough, I can't argue with that.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On May 1, 7:44 pm, NevilleDNZ <[EMAIL PROTECTED]> wrote:
> Below is a (flawed) one line RegEx that checks curly brackets (from
> awk/c/python input) are being matched. Is there a one liner for doing
> this in python?
There is not even a 1000-liner regular expression for this; it's a
context-free
On May 1, 5:21 pm, "Jordan Harry" <[EMAIL PROTECTED]> wrote:
> I'm trying to write a simple program to calculate permutations. I created a
> file called "mod.py" and put the following in it:
>
> def factorial(n):
> a = n
> b = n
> while a>0 and b>1:
> n = (n)*(b-1)
> b
"Jordan Harry" <[EMAIL PROTECTED]> writes:
> I'm trying to write a simple program to calculate permutations. I
> created a file called "mod.py" and put the following in it:
>
> def factorial(n):
> a = n
> b = n
> while a>0 and b>1:
> n = (n)*(b-1)
> b = b-1
A functio
On UNIX, some people use
#!/usr/bin/env python
While other use
#!/usr/bin/python
Why is one preferred over the other one ?
Thanks.
--
Yves.
http://www.SollerS.ca
--
http://mail.python.org/mailman/listinfo/python-list
I want to spawn a child process based on an external executable that I have
the path for. I then want to wait on that executable, and capture it's
output.
In the os module, fork is only supported on unix, but spawn is only
supported on windows.
The os.system call is implemented by calling the C s
The first method allows python to be installed in an alternate location
(i.e. /usr/local/bin). "env" in this case is being used to launch python
from whatever location python is installed to.
I like to think of it as an "abstraction" of the python location to make it
"multiplatform-friendly" sinc
In the following script, m1() and m2() work fine. I am assuming m2() is
faster although I haven't checked that (loops through the list twice instead
of once).
Now what I am trying to do is something like m3(). As currently written it
does not work, and I have tried different ways, but I have
Yves Dorfsman <[EMAIL PROTECTED]> writes:
> On UNIX, some people use
> #!/usr/bin/env python
>
> While other use
> #!/usr/bin/python
You haven't indicated your understanding of what the difference in
meaning is, so I'll explain it for those who might not know.
The shebang line (the initial line
Brendan Miller <[EMAIL PROTECTED]> writes:
> Is there an actual portable means of asynchronously spawning a
> process and getting a handle to it, being able to write stdin and
> read stdout, or does everyone just write their own wrapper for fork
> and spawn?
You're looking for the 'subprocess' mo
On Apr 22, 7:54 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
>
> If you have a C function that receives a PyCObject, just include the
> relevant headers (cobject.h) and you can retrieve the original pointer
> using PyCObject_AsVoidPtr:
>
> void foo(PyObject *pyobj)
> {
> TOriginalType
Yves Dorfsman wrote:
In the following script, m1() and m2() work fine. I am assuming m2() is
faster although I haven't checked that (loops through the list twice
instead of once).
Well, let's check it:
$ python -m timeit -s "import x" "x.m1()"
10 loops, best of 3: 6.43 usec per loop
$
In article <[EMAIL PROTECTED]>,
Ben Finney <[EMAIL PROTECTED]> wrote:
> I've never clearly understood why people want to use "#! /usr/bin/env
> python", which is prone to finding a different Python from the one
> installed by the operating system. I'd be interested to see what
> responses are in
I did a few tests with this script:
class byebye:
def __del__(self):
print 'Bye, bye...'
x = byebye()
x.del() gets executed if:
-I del x, then run gc.collect()
-simply exit the script
-get the script to abort on an exception
But if I kill it with the default signal TERM, the script di
On Fri, 02 May 2008 13:24:01 +1000
Ben Finney <[EMAIL PROTECTED]> wrote:
> I much prefer "#! /usr/bin/python" because I want my Python programs
> to, by default, be run with the default Python, and depend on Python
> being installed by the operating system's package manager. On systems
> that use s
Hallöchen!
Ivan Illarionov writes:
> On Fri, 02 May 2008 01:21:38 +0200, Torsten Bronger wrote:
>
>> [...]
>>
>> In contrast to many other areas of software, configuration files
>> needn't be compatible with anything except the user's brain. So
>> even if the rest of the world uses config forma
-On [20080502 05:26], Ben Finney ([EMAIL PROTECTED]) wrote:
>I've never clearly understood why people want to use "#! /usr/bin/env
>python", which is prone to finding a different Python from the one
>installed by the operating system. I'd be interested to see what
>responses are in favour of it, an
On May 1, 8:01 pm, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
> In the following script, m1() and m2() work fine. I am assuming m2() is
> faster although I haven't checked that (loops through the list twice instead
> of once).
>
> Now what I am trying to do is something like m3(). As currently writte
On Fri, 02 May 2008 13:25:55 +1000, Ben Finney wrote:
> URL:http://docs.python.org/lib/module-subprocess.html
Awesome. This is exactly what I was hoping existed.
--
http://mail.python.org/mailman/listinfo/python-list
Yves Dorfsman <[EMAIL PROTECTED]> wrote:
>
>On UNIX, some people use
>#!/usr/bin/env python
>
>While other use
>#!/usr/bin/python
>
>Why is one preferred over the other one ?
The /usr/bin/env solution finds the Python interpreter anywhere on the
PATH, whether it be /usr/bin or /usr/local/bin, or w
Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> writes:
> -On [20080502 05:26], Ben Finney ([EMAIL PROTECTED]) wrote:
> >I've never clearly understood why people want to use "#!
> >/usr/bin/env python", which is prone to finding a different Python
> >from the one installed by the operating syste
On May 1, 11:46 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
> Yves Dorfsman wrote:
>
> > In the following script, m1() and m2() work fine. I am assuming m2() is
> > faster although I haven't checked that (loops through the list twice
> > instead of once).
>
> Well, let's check it:
>
> $ python -m
"D'Arcy J.M. Cain" <[EMAIL PROTECTED]> writes:
> On Fri, 02 May 2008 13:24:01 +1000
> Ben Finney <[EMAIL PROTECTED]> wrote:
> > I much prefer "#! /usr/bin/python" because I want my Python
> > programs to, by default, be run with the default Python, and
> > depend on Python being installed by the o
On May 1, 10:50 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On May 1, 11:46 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
>
>
>
> > Yves Dorfsman wrote:
>
> > > In the following script, m1() and m2() work fine. I am assuming m2() is
> > > faster although I haven't checked that (loops through the
On Fri, 02 May 2008 04:36:06 +, Yves Dorfsman wrote:
> x.del() gets executed if:
> -I del x, then run gc.collect()
> -simply exit the script
> -get the script to abort on an exception
>
> But if I kill it with the default signal TERM, the script dies, but I don't
> get the message, so I am a
101 - 141 of 141 matches
Mail list logo