Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread Chris Rebert
On Wed, Jul 29, 2009 at 11:41 PM, Peter Otten<__pete...@web.de> wrote: > pdlem...@earthlink.net wrote: > >> I've used python a few months and expected to find cmath seperately >> sort of as a " header file".  A text search failed.  I now understand >> its in the Python Standard Library, which I ass

Re: Connecting multiple test cases in a sort of pipe

2009-07-29 Thread Diez B. Roggisch
Raghuram Devarakonda schrieb: Hi, I have three functions - create(), list(), and delete(). create() creates a new name in the file system hierarchy while list() displays all such created names and delete() removes them. I would like to write test cases for each of these functions, say, test_crea

Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread Peter Otten
pdlem...@earthlink.net wrote: > I've used python a few months and expected to find cmath seperately > sort of as a " header file". A text search failed. I now understand > its in the Python Standard Library, which I assume is that big file > Python30\LIBS\libpython30.a Python 3.1 is no

Re: Does python have the capability for driver development ?

2009-07-29 Thread Diez B. Roggisch
Nick Craig-Wood schrieb: Diez B. Roggisch wrote: MalC0de schrieb: hello there, I've a question : I want to know does python have any capability for using Ring0 and kernel functions for driver and device development stuff . if there's such a feature it is very good, and if there something for

RE: Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
> -Original Message- > From: Dave Angel [mailto:da...@ieee.org] > Sent: Wednesday, July 29, 2009 21:05 > To: Barak, Ron > Cc: 'python-list@python.org' > Subject: Re: Run pyc file without specifying python path ? > > Barak, Ron wrote: > > Hi, > > > > I wanted to make a python byte-code fi

Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread Terry Reedy
pdlem...@earthlink.net wrote: The following numerical approximation for Euler's Gamma function is found in http://en.wikipedia.org/wiki/Lanczos_approximation from cmath import * But I can't figure out where it gets "cmath". The Python documentation set has a module index. Really handy. I us

Re: IDLE Config Problems

2009-07-29 Thread alex23
On Jul 30, 6:55 am, "Russ Davis" wrote: > I am just getting started with Python and have installed v. 2.5.4   > Idle version 1.2.4  I can't seem to get the idle to display text.  It > seems as if the install went fine.  I start up the idle and the screen > is blank.  No text.  It seems as if I can

Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread pdlemper
On Wed, 29 Jul 2009 21:36:31 -0700 (PDT), Carl Banks wrote: >On Jul 29, 9:24 pm, pdlem...@earthlink.net wrote: >> What is cmath, where did it come from and how does it differ from >> the standard math module  ? > >What happened when you did a keyword search for "cmath" in the Python >library docu

Re: Confessions of a Python fanboy

2009-07-29 Thread Carl Banks
On Jul 29, 9:04 pm, alex23 wrote: > On Jul 30, 1:06 pm, r wrote: > > > 1.) No need to use "()" to call a function with no arguments. > > Python --> "obj.m2().m3()" --ugly > >   Ruby --> "obj.m1.m2.m3"  -- sweeet! > > Man, i must admit i really like this, and your code will look so much > > cleane

Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread Carl Banks
On Jul 29, 9:24 pm, pdlem...@earthlink.net wrote: > What is cmath, where did it come from and how does it differ from > the standard math module  ? What happened when you did a keyword search for "cmath" in the Python library documentation? What happened when you entered "python cmath" in Google?

Re: Confessions of a Python fanboy

2009-07-29 Thread Chris Rebert
On Wed, Jul 29, 2009 at 9:04 PM, alex23 wrote: > On Jul 30, 1:06 pm, r wrote: >> 1.) No need to use "()" to call a function with no arguments. >> Python --> "obj.m2().m3()" --ugly >>   Ruby --> "obj.m1.m2.m3"  -- sweeet! >> Man, i must admit i really like this, and your code will look so much >> c

Re: gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread Chris Rebert
On Wed, Jul 29, 2009 at 9:24 PM, wrote: > But I can't figure out where it gets "cmath".    Searching the Python > directory reveals no more than a test_cmath.  The only cmath I can find > is a header file in another directory  turboc++\Borland\include\ > > dir(cmath) reveals 23 functions overlapp

gamma approximation : what is module cmath and where is it located ?

2009-07-29 Thread pdlemper
The following numerical approximation for Euler's Gamma function is found in http://en.wikipedia.org/wiki/Lanczos_approximation from cmath import * # Coefficients used by the GNU Scientific Library g = 7 p = [0.80993, 676.5203681218851, -1259.1392167224028, 771.32342877765313, -

Re: Confessions of a Python fanboy

2009-07-29 Thread alex23
On Jul 30, 1:06 pm, r wrote: > 1.) No need to use "()" to call a function with no arguments. > Python --> "obj.m2().m3()" --ugly >   Ruby --> "obj.m1.m2.m3"  -- sweeet! > Man, i must admit i really like this, and your code will look so much > cleaner. How do you distinguish between calling a meth

socket send

2009-07-29 Thread NighterNet
I am trying to figure out how to send text or byte in python 3.1. I am trying to send data to flash socket to get there. I am not sure how to work it. buff= 'id=' , self.id , ':balive=False\n' clientSock.send(buff); -- http://mail.python.org/mailman/listinfo/python-list

Re: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread Ben Finney
dandi kain writes: > What is the functionality of __ or _ , leading or trailing an object , > class ot function ? There is no change in functionality. It has some slight effects on import, but as a beginner you shouldn't need to worry about that. > Is it just a naming convention to note special

Re: IDLE Config Problems

2009-07-29 Thread r
On Jul 29, 3:55 pm, "Russ Davis" wrote: > I am just getting started with Python and have installed v. 2.5.4  Idle > version 1.2.4  I can't seem to get the idle to display text.  It seems as if > the install went fine.  I start up the idle and the screen is blank.  No > text.  It seems as if I c

Confessions of a Python fanboy

2009-07-29 Thread r
Hello fellow Pythonista's it's nice to be back after such a long hiatus. I have recently realized my blind love affair with Python was just that. I must admit there are better ways to program. Like your first lay, your first programing language can leave an indelible mark on you, but like all you

Connecting multiple test cases in a sort of pipe

2009-07-29 Thread Raghuram Devarakonda
Hi, I have three functions - create(), list(), and delete(). create() creates a new name in the file system hierarchy while list() displays all such created names and delete() removes them. I would like to write test cases for each of these functions, say, test_create() , test_list(), and test_de

Re: Working with platform.system()

2009-07-29 Thread Chris Rebert
On Wed, Jul 29, 2009 at 6:10 AM, v1d4l0k4 wrote: > Hi! > > I want to know how I can get different expected return values by > platform.system() method. I want to sniff some systems (Linux, Windows, Mac, > BSD, Solaris) and I don't know how I can check them correctly. Could you > give me some expect

Re: If Scheme is so good why MIT drops it?

2009-07-29 Thread greg
Hendrik van Rooyen wrote: And if code is data, where is Pythons ALTER statement? class Duck: def quack(self): print "Quack!" def moo(): print "Moo!" def ALTER(obj, name, TO_PROCEED_TO): setattr(obj, name, TO_PROCEED_TO) d = Duck() ALTER(d, 'quack', TO_PROCEED_TO = moo) d.quack()

Re: How to "gunzip-iterate" over a file?

2009-07-29 Thread Paul Rubin
Robert Kern writes: > f = gzip.open('filename.gz') > for line in f: > print line or use f.read(nbytes) to read n uncompressed bytes from f. Note that the standard iterator (which iterates over lines) can potentially consume an unbounded amount of memory if the file contains no newlines. --

Re: Does python have the capability for driver development ?

2009-07-29 Thread Rodrigo S Wanderley
"Martin P. Hellwig" writes: > Python is interpreted, so the first requirement would be that the > interpreter (the python VM to be more precise) would run in the kernel > or that there is a way for the interpreter to delegate operations to > kernel restricted operations. Most notably access to th

Re: Does python have the capability for driver development ?

2009-07-29 Thread Marcus Wanner
On 7/29/2009 7:44 PM, Martin P. Hellwig wrote: Rodrigo S Wanderley wrote: What about user level device drivers? Think the Python VM could communicate with the driver through the user space API. Is there a Python module for that? Sure why not? Look for example to libusb, which provides a u

Re: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread alex23
On Jul 30, 3:59 am, dandi kain wrote: > What is the functionality of __ or _ , leading or trailing an object , > class ot function ? Is it just a naming convention to note special > functions and objects , or it really mean someting to Python ? I think everyone else has covered what you need to k

Re: Does python have the capability for driver development ?

2009-07-29 Thread MalC0de
actually I mean driver programming under Windows operating system, if you know, there's A kit name DDK available at microsoft's website for developing device drivers under C / C++ environment, now i'm working with this kind of toolkit, but when I started programming with Python, I saw this is very

No PyPI search for 3.x compatible packages

2009-07-29 Thread Neil Hodgson
There appears to be no way to search PyPI for packages that are compatible with Python 3.x. There are classifiers for 'Programming Language' including 'Programming Language :: Python :: 3' but that seems to be for implementation language since there are so many packages that specify C. There are

Re: Does python have the capability for driver development ?

2009-07-29 Thread Martin P. Hellwig
Rodrigo S Wanderley wrote: What about user level device drivers? Think the Python VM could communicate with the driver through the user space API. Is there a Python module for that? Sure why not? Look for example to libusb, which provides a userspace environment and pyusb which uses that

Re: Differences Between Arrays and Matrices in Numpy

2009-07-29 Thread Robert Kern
On 2009-07-29 18:27, Colin J. Williams wrote: Robert Kern wrote: On 2009-07-29 15:23, Nanime Puloski wrote: What are some differences between arrays and matrices using the Numpy library? When would I want to use arrays instead of matrices and vice versa? You will want to ask numpy questions o

Re: Does python have the capability for driver development ?

2009-07-29 Thread David Lyon
MalC0de wrote: > hello there, I've a question : > I want to know does python have any capability for using Ring0 and > kernel functions for driver and device development stuff . > if there's such a feature it is very good, and if there something for > this kind that you know please refer me to som

Re: Differences Between Arrays and Matrices in Numpy

2009-07-29 Thread Colin J. Williams
Robert Kern wrote: On 2009-07-29 15:23, Nanime Puloski wrote: What are some differences between arrays and matrices using the Numpy library? When would I want to use arrays instead of matrices and vice versa? You will want to ask numpy questions on the numpy mailing list: http://www.scipy.o

Re: Does python have the capability for driver development ?

2009-07-29 Thread Martin P. Hellwig
MalC0de wrote: hello there, I've a question : I want to know does python have any capability for using Ring0 and kernel functions for driver and device development stuff . if there's such a feature it is very good, and if there something for this kind that you know please refer me to some referen

Re: set variable to looping index?

2009-07-29 Thread Martin
On Jul 29, 11:57 pm, "Jan Kaliszewski" wrote: > 30-07-2009 wrote: > > All I was trying to do was call a function and return the result to an > > a variable. I could admittedly of just done... > > > var1 = some_function(var1_fn) > > var2 = some_function(var2_fn) > > var3 = some_function(var3_fn) >

Re: set variable to looping index?

2009-07-29 Thread Jan Kaliszewski
Me wrote: filenames = p'foo', 'bar', baz'] Sorry, should be of course: filenames = ['foo', 'bar', baz'] *j -- Jan Kaliszewski (zuo) -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore Techniques

2009-07-29 Thread Carl Banks
On Jul 29, 7:14 am, Piet van Oostrum wrote: > > Carl Banks (CB) wrote: > >CB> On Jul 28, 3:15 pm, John D Giotta wrote: > >>> I'm looking to run a process with a limit of 3 instances, but each > >>> execution is over a crontab interval. I've been investigating the > >>> threading module and u

Re: set variable to looping index?

2009-07-29 Thread Jan Kaliszewski
30-07-2009 wrote: All I was trying to do was call a function and return the result to an a variable. I could admittedly of just done... var1 = some_function(var1_fn) var2 = some_function(var2_fn) var3 = some_function(var3_fn) where var1_fn, var2_fn, var3_fn are just filenames, e.g. var1_fn =

Re: Does python have the capability for driver development ?

2009-07-29 Thread Nick Craig-Wood
Diez B. Roggisch wrote: > MalC0de schrieb: > > hello there, I've a question : > > I want to know does python have any capability for using Ring0 and > > kernel functions for driver and device development stuff . > > if there's such a feature it is very good, and if there something for > > this ki

Re: set variable to looping index?

2009-07-29 Thread Martin
On Jul 29, 11:02 pm, "Rhodri James" wrote: > On Wed, 29 Jul 2009 19:56:28 +0100, Martin wrote: > > Hi, > > > I am trying to set the return value from a function to a name which I > > grab from the for loop. I can't work out how I can do this without > > using an if statement... > > > for f in var

Re: Differences Between Arrays and Matrices in Numpy

2009-07-29 Thread Nobody
On Wed, 29 Jul 2009 16:23:33 -0400, Nanime Puloski wrote: > What are some differences between arrays and matrices using the Numpy > library? Matrices are always two-dimensional, as are slices of them. Matrices override mulitplication and exponentiation to use matrix multiplication rather than ele

Re: set variable to looping index?

2009-07-29 Thread Rhodri James
On Wed, 29 Jul 2009 19:56:28 +0100, Martin wrote: Hi, I am trying to set the return value from a function to a name which I grab from the for loop. I can't work out how I can do this without using an if statement... for f in var1_fn, var2_fn, var3_fn: if f.split('.')[0] == 'var1':

Re: set variable to looping index?

2009-07-29 Thread Dave Angel
Martin wrote: Hi, I am trying to set the return value from a function to a name which I grab from the for loop. I can't work out how I can do this without using an if statement... for f in var1_fn, var2_fn, var3_fn: if f.split('.')[0] == 'var1': var1 = call_some_function(f)

IDLE Config Problems

2009-07-29 Thread Russ Davis
I am just getting started with Python and have installed v. 2.5.4 Idle version 1.2.4 I can't seem to get the idle to display text. It seems as if the install went fine. I start up the idle and the screen is blank. No text. It seems as if I can type on the screen but I just can't see the ch

Re: how to embed the python interpreter into web App (Mehndi, Sibtey)

2009-07-29 Thread André
On Jul 29, 1:11 pm, Ryniek90 wrote: > > Hi All > > > I am trying to embed the python interpreter in to a web app but could > > not get the way, any one can suggest me how to do this. > > > Thanks, > > > Sibtey Mehdi > > > This e-mail (and any attachments), is confidential and may be privileged. >

Re: simple splash screen?

2009-07-29 Thread Martin P. Hellwig
NighterNet wrote: Thanks it help. Sorry about that, I was just wander what kind of answer and if there are other methods to learn it. Is there a way to position image to the center screen? Yes there is, just start reading from here: http://effbot.org/tkinterbook/ Though because Python 3 has

Re: Does python have the capability for driver development ?

2009-07-29 Thread Diez B. Roggisch
MalC0de schrieb: hello there, I've a question : I want to know does python have any capability for using Ring0 and kernel functions for driver and device development stuff . if there's such a feature it is very good, and if there something for this kind that you know please refer me to some refer

Re: set variable to looping index?

2009-07-29 Thread Peter Otten
Martin wrote: > I am trying to set the return value from a function to a name which I > grab from the for loop. I can't work out how I can do this without > using an if statement... > > for f in var1_fn, var2_fn, var3_fn: > if f.split('.')[0] == 'var1': > var1 = call_some_function(f)

Re: delayed sys.exit?

2009-07-29 Thread Peter Otten
Dr. Phillip M. Feldman wrote: > In the attached http://www.nabble.com/file/p24726902/test.py test.py > code, it appears that additional statements execute after the call to > sys.exit(0). >try: > # If the conversion to int fails, nothing is appended to the list: > Runs.append(int

Re: delayed sys.exit?

2009-07-29 Thread MRAB
Dr. Phillip M. Feldman wrote: In the attached http://www.nabble.com/file/p24726902/test.py test.py code, it appears that additional statements execute after the call to sys.exit(0). I'll be grateful if anyone can shed light on why this is happening. Below is a copy of some sample I/O. Note t

Re: delayed sys.exit?

2009-07-29 Thread Stephen Hansen
> > In the attached http://www.nabble.com/file/p24726902/test.py test.py > code, > it appears that additional statements execute after the call to > sys.exit(0). > I'll be grateful if anyone can shed light on why this is happening. Below > is a copy of some sample I/O. Note that in the last case

Re: Differences Between Arrays and Matrices in Numpy

2009-07-29 Thread Robert Kern
On 2009-07-29 15:23, Nanime Puloski wrote: What are some differences between arrays and matrices using the Numpy library? When would I want to use arrays instead of matrices and vice versa? You will want to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists An

Re: escaping characters in filenames

2009-07-29 Thread J Kenneth King
Nobody writes: > On Wed, 29 Jul 2009 09:29:55 -0400, J Kenneth King wrote: > >> I wrote a script to process some files using another program. One thing >> I noticed was that both os.listdir() and os.path.walk() will return >> unescaped file names (ie: "My File With Spaces & Stuff" instead of "My

delayed sys.exit?

2009-07-29 Thread Dr. Phillip M. Feldman
In the attached http://www.nabble.com/file/p24726902/test.py test.py code, it appears that additional statements execute after the call to sys.exit(0). I'll be grateful if anyone can shed light on why this is happening. Below is a copy of some sample I/O. Note that in the last case I get addit

Does python have the capability for driver development ?

2009-07-29 Thread MalC0de
hello there, I've a question : I want to know does python have any capability for using Ring0 and kernel functions for driver and device development stuff . if there's such a feature it is very good, and if there something for this kind that you know please refer me to some reference and show me so

Differences Between Arrays and Matrices in Numpy

2009-07-29 Thread Nanime Puloski
What are some differences between arrays and matrices using the Numpy library? When would I want to use arrays instead of matrices and vice versa? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to "gunzip-iterate" over a file?

2009-07-29 Thread Robert Kern
On 2009-07-29 15:05, kj wrote: I need to iterate over the lines of *very* large (>1 GB) gzipped files. I would like to do this without having to read the full compressed contents into memory so that I can apply zlib.decompress to these contents. I also would like to avoid having to gunzip the

How to "gunzip-iterate" over a file?

2009-07-29 Thread kj
I need to iterate over the lines of *very* large (>1 GB) gzipped files. I would like to do this without having to read the full compressed contents into memory so that I can apply zlib.decompress to these contents. I also would like to avoid having to gunzip the file (i.e. creating an uncompre

Re: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread Terry Reedy
Benjamin Kaplan wrote: On Wed, Jul 29, 2009 at 1:59 PM, dandi kain wrote: Hello everybody, I have just started learning Python.I heard its simple so I pick a presentation [1] and tried to work on it.But when it comes to underscores leading and trailing an object I dont understand any.I look thr

Re: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread Jan Kaliszewski
29-07-2009 Benjamin Kaplan wrote: On Wed, Jul 29, 2009 at 1:59 PM, dandi kain wrote: [snip What is the functionality of __ or _ , leading or trailing an object , class ot function ? Is it just a naming convention to note special functions and objects , or it really mean someting to Python ?

Re: Very Strange Problem

2009-07-29 Thread Dave Angel
Omer Khalid wrote: Hi Dave, Thanks for your reply. I actually didn't cut and paste my code as it was dispersed in different places, i typed the logic behind my code in the email (and obiviously made some typos, indentations is some thing else) but my real code does not have these problems as my

Re: Very Strange Problem

2009-07-29 Thread Terry Reedy
Omer Khalid wrote: Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: To me, this sentence clearly implies that the code that follows is the code that had the problem. Since the posted code cannot run, it clearly is not. People should

Re: simple splash screen?

2009-07-29 Thread NighterNet
On Jul 29, 11:16 am, "Martin P. Hellwig" wrote: > NighterNet wrote: > > I am trying to make a simple splash screen from python 3.1.Not sure > > where to start looking for it. Can any one help? > > Sure, almost the same as with Python 2 :-) > But to be a bit more specific: > > """Only works if

Re: Very Strange Problem

2009-07-29 Thread Omer Khalid
Hi Dave, Thanks for your reply. I actually didn't cut and paste my code as it was dispersed in different places, i typed the logic behind my code in the email (and obiviously made some typos, indentations is some thing else) but my real code does not have these problems as my application runs fine

Re: 64-bit issues with dictionaries in Python 2.6

2009-07-29 Thread Martin v. Löwis
> Are there any known issues with dictionaries in Python 2.6 (not 2.6.2) > when running on a 64-bit platform? No, none. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

set variable to looping index?

2009-07-29 Thread Martin
Hi, I am trying to set the return value from a function to a name which I grab from the for loop. I can't work out how I can do this without using an if statement... for f in var1_fn, var2_fn, var3_fn: if f.split('.')[0] == 'var1': var1 = call_some_function(f) . .

Re: escaping characters in filenames

2009-07-29 Thread Nobody
On Wed, 29 Jul 2009 09:29:55 -0400, J Kenneth King wrote: > I wrote a script to process some files using another program. One thing > I noticed was that both os.listdir() and os.path.walk() will return > unescaped file names (ie: "My File With Spaces & Stuff" instead of "My\ > File\ With\ Spaces\

Re: Very Strange Problem

2009-07-29 Thread Dave Angel
Omer Khalid wrote: Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: # a list that contains dictionary objects jobs = [] index=5 for each in range(index): jobs.append({'v':0}) some_function(index): if jobs[index]['v'] =

Re: Semaphore Techniques

2009-07-29 Thread Christian Heimes
John D Giotta schrieb: > I'm working with up to 3 process "session" per server, each process > running three threads. > I was wishing to tie back the 3 "session"/server to a semaphore, but > everything (and everyone) say semaphores are only good per process. That's not true. Named semaphores are t

Re: Semaphore Techniques

2009-07-29 Thread John D Giotta
That was my original idea. Restricting each process by pid: #bash procs=`ps aux | grep script.pl | grep -v grep | wc -l` if [ $procs -lt 3 ]; then python2.4 script.py config.xml else exit 0 fi -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore Techniques

2009-07-29 Thread John D Giotta
I'm working with up to 3 process "session" per server, each process running three threads. I was wishing to tie back the 3 "session"/server to a semaphore, but everything (and everyone) say semaphores are only good per process. -- http://mail.python.org/mailman/listinfo/python-list

Re: escaping characters in filenames

2009-07-29 Thread Dave Angel
J Kenneth King wrote: I wrote a script to process some files using another program. One thing I noticed was that both os.listdir() and os.path.walk() will return unescaped file names (ie: "My File With Spaces & Stuff" instead of "My\ File\ With\ Spaces\ \&\ Stuff"). I haven't had much success f

Re: instead of depending on data = array('h') .. write samples 1 by 1 to w = wave.open("wav.wav", "w")

2009-07-29 Thread '2+
o wow .. there's still a lot to learn .. okay .. if i get stucked with the memory usage issue will try this hybrid .. thanx for the example!! it took about 40 min to render 1min of wav so i'll just keep this project like 15 sec oriented and maybe that'll keep me away from the mem trouble and my o

Re: simple splash screen?

2009-07-29 Thread Martin P. Hellwig
NighterNet wrote: I am trying to make a simple splash screen from python 3.1.Not sure where to start looking for it. Can any one help? Sure, almost the same as with Python 2 :-) But to be a bit more specific: """Only works if you got Python 3 installed with tkinter""" import tkinter IMAGE

Re: Help with sql and python

2009-07-29 Thread Dave Angel
catalinf...@gmail.com wrote: Hello ! I have accont on myphpadmin on my server. I want to create one script in python. This script manage sql task from my sql server . How i make this in a simple way ? Thank you ! It's seldom simple. I'm guessing it's not your server, but is actually a web

Re: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread Benjamin Kaplan
On Wed, Jul 29, 2009 at 1:59 PM, dandi kain wrote: > > Hello everybody, > I have just started learning Python.I heard its simple so I pick a > presentation [1] and tried to work on it.But when it comes to > underscores leading and trailing an object I dont understand any.I > look through the pytho

Re: Run pyc file without specifying python path ?

2009-07-29 Thread Dave Angel
Barak, Ron wrote: Hi, I wanted to make a python byte-code file executable, expecting to be able to run it without specifying "python" on the (Linux bash) command line. So, I wrote the following: [r...@vmlinux1 python]# cat test_pyc.py #!/usr/bin/env python print "hello" [r...@vmlinux1 python

Re: Print value CLOB via cx_Oracle

2009-07-29 Thread Vincent Vega
On 28 Lip, 20:02, Vincent Vega wrote: > Hi, > > I call function in Oracle database use cx_Oracle. > In standard I define: > > db       = cx_Oracle.connect(username, password, tnsentry) > cursor  = db.cursor() > > I create variable 'y' (result function 'fun_name') and call function > 'fun_name': >

Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread dandi kain
Hello everybody, I have just started learning Python.I heard its simple so I pick a presentation [1] and tried to work on it.But when it comes to underscores leading and trailing an object I dont understand any.I look through the python manual also but that was not helping .I searched some forums a

Re: open a file in python

2009-07-29 Thread Piet van Oostrum
> jayshree (j) wrote: >>> The Exact Problem is how to use the key containing by .pem file for >>> 'encryption' . can i print the contents of the .pem file I have already answered this question in a previous thread. It is not very helpful if you repeat asking the same or similar questions in

Re: New implementation of re module

2009-07-29 Thread Mike
On Jul 29, 10:45 am, MRAB wrote: > Mike wrote: > > - findall/finditer doesn't find overlapping matches.  Sometimes you > > really *do* want to know all possible matches, even if they overlap. > > Perhaps by adding "overlapped=True"? Something like that would be great, yes. > > - split won't spl

Re: Help with sql and python

2009-07-29 Thread Piet van Oostrum
> "catalinf...@gmail.com" (cc) wrote: >cc> Hello ! >cc> I have accont on myphpadmin on my server. >cc> I want to create one script in python. >cc> This script manage sql task from my sql server . >cc> How i make this in a simple way ? See http://mysql-python.sourceforge.net/MySQLdb.html Thi

Re: SEC forms parsing

2009-07-29 Thread John Nagle
mpython wrote: I am looking for any python examples that have written to parse SEC filings (Security Exchange Commission's EDGAR system),or just a pointer to best modules to use. I've been doing that in Perl for years. See "www.downside.com". Actually extracting financial statements is

Re: bad certificate error

2009-07-29 Thread John Nagle
jakecjacobson wrote: Hi, I am getting the following error when doing a post to REST API, Enter PEM pass phrase: Traceback (most recent call last): File "./ices_catalog_feeder.py", line 193, in ? main(sys.argv[1]) File "./ices_catalog_feeder.py", line 60, in main post2Catalog(catalog

Re: Very Strange Problem

2009-07-29 Thread MRAB
Ricardo Aráoz wrote: MRAB wrote: Omer Khalid wrote: Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: # a list that contains dictionary objects jobs = [] index=5 for each in range(index): jobs.append({'v':0}) some_function

Re: how to embed the python interpreter into web App (Mehndi, Sibtey)

2009-07-29 Thread Ryniek90
Hi All I am trying to embed the python interpreter in to a web app but could not get the way, any one can suggest me how to do this. Thanks, Sibtey Mehdi This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended reci

Re: Compiling Python for uCLinux appliance?

2009-07-29 Thread Grant Edwards
On 2009-07-29, Diez B. Roggisch wrote: > Gilles Ganault wrote: > >> Hello >> >> I just got a small appliance based on a Blackfin CPU with 64MB RAM and >> 258MB NAND flash. Using the stock software, there's about 30MB of RAM >> left. >> >> Besides C/C++ and shel scripts, I was wondering if it wer

Re: Very Strange Problem

2009-07-29 Thread MRAB
Omer Khalid wrote: Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: # a list that contains dictionary objects jobs = [] index=5 for each in range(index): jobs.append({'v':0}) some_function(index): if jobs[index]['v']

SEC forms parsing

2009-07-29 Thread mpython
I am looking for any python examples that have written to parse SEC filings (Security Exchange Commission's EDGAR system),or just a pointer to best modules to use. -- http://mail.python.org/mailman/listinfo/python-list

Re: New implementation of re module

2009-07-29 Thread MRAB
Mike wrote: On Jul 27, 11:34 am, MRAB wrote: I've been working on a new implementation of the re module. Fabulous! If you're extending/changing the interface, there are a couple of sore points in the current implementation I'd love to see addressed: - findall/finditer doesn't find overlappi

Re: python 3 and stringio.seek

2009-07-29 Thread Terry Reedy
Miles Kaufmann wrote: On Jul 28, 2009, at 6:30 AM, Michele Petrazzo wrote: Hi list, I'm trying to port a my library to python 3, but I have a problem with a the stringio.seek: the method not accept anymore a value like pos=-6 mode=1, but the "old" (2.X) version yes... The error: File "/home/

Re: Clearing an array

2009-07-29 Thread Jason Tackaberry
On Wed, 2009-07-29 at 08:24 -0700, WilsonOfCanada wrote: > I was wondering if there is any built-in function that clears the > array. The proper python term would be "list." You can remove all elements of a list 'l' like so: del l[:] > I was also wondering if this works: > > arrMoo = ['3

Re: Clearing an array

2009-07-29 Thread Diez B. Roggisch
WilsonOfCanada wrote: > Hellos, > > I was wondering if there is any built-in function that clears the > array. I was also wondering if this works: > > arrMoo = ['33', '342', '342'] > arrMoo = [] Most of the time, yes. Unless you have something like this, then it won't work: foo = [10]

Very Strange Problem

2009-07-29 Thread Omer Khalid
Hi, I am having a very strange problem with modifying a variable in a list in my program. Here is the code: # a list that contains dictionary objects jobs = [] index=5 for each in range(index): jobs.append({'v':0}) some_function(index): if jobs[index]['v'] == 0:

Re: New implementation of re module

2009-07-29 Thread Mike
On Jul 27, 11:34 am, MRAB wrote: > I've been working on a new implementation of the re module. Fabulous! If you're extending/changing the interface, there are a couple of sore points in the current implementation I'd love to see addressed: - findall/finditer doesn't find overlapping matches. S

Clearing an array

2009-07-29 Thread WilsonOfCanada
Hellos, I was wondering if there is any built-in function that clears the array. I was also wondering if this works: arrMoo = ['33', '342', '342'] arrMoo = [] -- http://mail.python.org/mailman/listinfo/python-list

Re: simple splash screen?

2009-07-29 Thread NighterNet
On Jul 29, 5:24 am, Marcus Wanner wrote: > On 7/28/2009 11:58 PM, NighterNet wrote:> I am trying to make a simple splash > screen from python 3.1.Not sure > > where to start looking for it. Can any one help? > > Trying to make a splash screen for python? > Or trying to do image processing in pyth

Re: bad certificate error

2009-07-29 Thread jakecjacobson
On Jul 29, 2:08 am, "Gabriel Genellina" wrote: > En Tue, 28 Jul 2009 09:02:40 -0300, Steven D'Aprano   > escribió: > > > > > On Mon, 27 Jul 2009 23:16:39 -0300, Gabriel Genellina wrote: > > >> I don't see the point on "fixing" either the Python script or httplib to > >> accomodate for an invalid

Re: Compiling Python for uCLinux appliance?

2009-07-29 Thread Diez B. Roggisch
Gilles Ganault wrote: > Hello > > I just got a small appliance based on a Blackfin CPU with 64MB RAM and > 258MB NAND flash. Using the stock software, there's about 30MB of RAM > left. > > Besides C/C++ and shel scripts, I was wondering if it were realistic > to upload a few Python scripts in su

Re: escaping characters in filenames

2009-07-29 Thread MRAB
J Kenneth King wrote: I wrote a script to process some files using another program. One thing I noticed was that both os.listdir() and os.path.walk() will return unescaped file names (ie: "My File With Spaces & Stuff" instead of "My\ File\ With\ Spaces\ \&\ Stuff"). I haven't had much success f

Re: QFileDialog setFileMode blues

2009-07-29 Thread Rincewind
On Jul 29, 12:45 pm, Phil Thompson wrote: > On Wed, 29 Jul 2009 04:35:42 -0700 (PDT), Rincewind > wrote: > > > Heya, > > > I am fairly new to Python and even newer to Qt. > > The problem is opening a Qt file dialog to select folders only. > > QFileDialog has a nice and dandy setFileMode() functio

Re: Semaphore Techniques

2009-07-29 Thread Piet van Oostrum
> Carl Banks (CB) wrote: >CB> On Jul 28, 3:15 pm, John D Giotta wrote: >>> I'm looking to run a process with a limit of 3 instances, but each >>> execution is over a crontab interval. I've been investigating the >>> threading module and using daemons to limit active thread objects, but >>> I

  1   2   >