Popen in main and subprocess

2012-01-28 Thread pistacchio
the following code (in the main thread) works well, I grep some files and the search until the first 100 results are found (writing the results to a file), then exit: command = 'grep -F %s %s*.txt' % (search_string, DATA_PATH) p = Popen(['/bin/bash', '-c', command], stdout = PIPE) f

random.gauss: range

2010-02-26 Thread pistacchio
hi, i'm trying the random.gauss function. can anyone explain how to get a number between a given range? like, from 0 to 20 with an average of 10? and how to determine the steep of the curve? i've never studied it, so mu and sigma don't really tell me a thing. thanks in advange --

Re: random.gauss: range

2010-02-26 Thread pistacchio
thanks, betadistribute did the work... and i learned a new thing! On 26 Feb, 22:56, Robert Kern robert.k...gmail.com wrote: On 2010-02-26 15:26 PM, pistacchio wrote: hi, i'm trying the random.gauss function. can anyone explain how to get a number between a given range? You don't

Apache2 + Python WITHOUT mod_pytho

2008-06-25 Thread pistacchio
Hi to all! How can i configure apache2 so that it processes all .py files with python _without_ using mod_python? I'm on Ubuntu 8.4. currently my /etc/apache2/sites-available/default file reads: __ NameVirtualHost * VirtualHost * ServerAdmin [EMAIL PROTECTED]

Re: Apache2 + Python WITHOUT mod_pytho

2008-06-25 Thread pistacchio
/Directory /VirtualHost __ On 25 Giu, 11:13, pistacchio [EMAIL PROTECTED] wrote: Hi to all! How can i configure apache2 so that it processes all .py files with python _without_ using mod_python? I'm on Ubuntu 8.4. currently my /etc/apache2/sites-available/default file

Re: module global variables

2008-05-13 Thread pistacchio
On 12 Mag, 11:11, pistacchio [EMAIL PROTECTED] wrote: On 12 Mag, 10:47, Marco Mariani [EMAIL PROTECTED] wrote: pistacchiowrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm,pistacchio[EMAIL PROTECTED] wrote: hi to all! can i load a module passing

module global variables

2008-05-12 Thread pistacchio
hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? thanks module = __import__

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:10, pistacchio [EMAIL PROTECTED] wrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:47, Marco Mariani [EMAIL PROTECTED] wrote: pistacchio wrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global

Re: PHP + TinyButStrong Python replacement

2008-05-08 Thread pistacchio
[EMAIL PROTECTED] ha scritto: On 7 mai, 16:17, pistacchio [EMAIL PROTECTED] wrote: George Sakkis ha scritto: (snip) What does it matter if it's a single file or a dozen under a package ? Installation for pure Python packages can be as simple as copying the package under any directory in your

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
[EMAIL PROTECTED] ha scritto: Hi, i was reading/learning some hello world program in python. I think its very simillar to Java/C++/C#. What's different (except syntax) ? well, it's similar in the sense that it is a programming language. So you can say that assembly is similar to BASIC, but

Re: Newbie to python --- why should i learn !

2008-05-08 Thread pistacchio
Marc 'BlackJack' Rintsch ha scritto: On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote: Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in almost any other

PHP + TinyButStrong Python replacement

2008-05-07 Thread pistacchio
hi! i'm a php user and a python programmer. i'd love to use python for my server side needs but i can't seem to find what i'm looking for. for most of my php work i use mysql and tinyButStrong (http://www.tinybutstrong.com) which is a very lightweight template engine that offers powerful

Re: PHP + TinyButStrong Python replacement

2008-05-07 Thread pistacchio
Diez B. Roggisch ha scritto: pistacchio wrote: Mike Driscoll ha scritto: On May 7, 6:12 am, pistacchio [EMAIL PROTECTED] wrote: hi! i'm a php user and a python programmer. i'd love to use python for my server side needs but i can't seem to find what i'm looking for. for most of my php work i

Re: PHP + TinyButStrong Python replacement

2008-05-07 Thread pistacchio
Mike Driscoll ha scritto: On May 7, 6:12 am, pistacchio [EMAIL PROTECTED] wrote: hi! i'm a php user and a python programmer. i'd love to use python for my server side needs but i can't seem to find what i'm looking for. for most of my php work i use mysql and tinyButStrong (http

Re: PHP + TinyButStrong Python replacement

2008-05-07 Thread pistacchio
George Sakkis ha scritto: On May 7, 9:40 am, pistacchio [EMAIL PROTECTED] wrote: Diez B. Roggisch ha scritto: pistacchio wrote: Mike Driscoll ha scritto: On May 7, 6:12 am, pistacchio [EMAIL PROTECTED] wrote: hi! i'm a php user and a python programmer. i'd love to use python for my