Call for diversity

2009-07-29 Thread Aahz
The Python community is both incredibly diverse (Python 3.1's release manager was not yet eighteen years old) and incredibly lacking in diversity (none of the regular committers is a woman). Kirrily Robert gave a keynote at OSCON last week about women in Open Source, and I blogged about the

Re: bad certificate error

2009-07-29 Thread Gabriel Genellina
En Tue, 28 Jul 2009 09:02:40 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au 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 server certificate... If it's just

Re: Deprecated sets module with Python 2.6

2009-07-29 Thread Gabriel Genellina
En Tue, 28 Jul 2009 17:28:09 -0300, Virgil Stokes v...@it.uu.se escribió: I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the

Re: open a file in python

2009-07-29 Thread jayshree
On Jul 27, 2:55 pm, Diez B. Roggisch de...@nospam.web.de wrote: jayshree wrote: On Jul 27, 1:09 pm, Kushal Kumaran kushal.kumaran+pyt...@gmail.com wrote: On Mon, Jul 27, 2009 at 12:58 PM, jayshreejayshree06c...@gmail.com wrote: pk = open('/home/jayshree/my_key.public.pem' ,

[no subject]

2009-07-29 Thread hch
Hi, everyone Is there a python script can get a list of how much stack space each function in your program uses? ( the program is compiled by gcc) Any advice will be appreciate. -- http://mail.python.org/mailman/listinfo/python-list

Re: Deprecated sets module with Python 2.6

2009-07-29 Thread Virgil Stokes
Diez B. Roggisch wrote: Virgil Stokes schrieb: I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the compile process:

about analyze object's stack usage

2009-07-29 Thread hch
Hi, everyone Is there a python script can get a list of how much stack space each function in your program uses? ( the program is compiled by gcc) Any advice will be appreciate. -- http://mail.python.org/mailman/listinfo/python-list

Re: Deprecated sets module with Python 2.6

2009-07-29 Thread Virgil Stokes
Virgil Stokes wrote: Diez B. Roggisch wrote: Virgil Stokes schrieb: I would appreciate help on correcting a problem when trying to create an *.exe file using py2exe via GUI2exe with Python 2.6.2. When using GUI2exe to create an *.exe I always get the following warning during the compile

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

2009-07-29 Thread Hendrik van Rooyen
On Tuesday 28 July 2009 17:11:02 MRAB wrote: If you were a COBOL programmer, would you want to shout about it? :-) Hey don't knock it! - at the time, it was either COBOL or FORTRAN or some assembler or coding in hex or octal. And if code is data, where is Pythons ALTER statement? *Ducks* :-)

Re: python 3 and stringio.seek

2009-07-29 Thread Miles Kaufmann
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

fast video encoding

2009-07-29 Thread gregorth
Hi all, for a scientific application I need to save a video stream to disc for further post processing. My cam can deliver 8bit grayscale images with resolution 640x480 with a framerate up to 100Hz, this is a data rate of 30MB/s. Writing the data uncompressed to disc hits the data transfer limits

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

2009-07-29 Thread Peter Otten
'2+ wrote: it says Wave_write.writeframes(data) will that mean from array import array is a must? this does the job: import oil import wave from array import array a = oil.Sa() w = wave.open(current.wav, w) w.setnchannels(2) w.setsampwidth(2) w.setframerate(44100) data =

64-bit issues with dictionaries in Python 2.6

2009-07-29 Thread Michael Ströder
HI! Are there any known issues with dictionaries in Python 2.6 (not 2.6.2) when running on a 64-bit platform? A friend of mine experiences various strange problems with my web2ldap running with Python 2.6 shipped with openSUSE 11.1 x64. For me it seems some dictionary-based internal registries

idiom for list looping

2009-07-29 Thread superpollo
hi clp. i want to get from here: nomi = [one, two, three] to here: 0 - one 1 - two 2 - three i found two ways: first way: for i in range(len(nomi)): print i, -, nomi[i] or second way: for (i, e) in enumerate(nomi): print i, -, e which one is better? is there a more pythonic way

Re: idiom for list looping

2009-07-29 Thread David Roberts
To the best of my knowledge the second way is more pythonic - the first is a little too reminiscent of C. A couple of notes: - you don't need the parentheses around i, e - if you were going to use the first way it's better to use xrange instead of range for iteration -- David Roberts

Re: idiom for list looping

2009-07-29 Thread MRAB
superpollo wrote: hi clp. i want to get from here: nomi = [one, two, three] to here: 0 - one 1 - two 2 - three i found two ways: first way: for i in range(len(nomi)): print i, -, nomi[i] or second way: for (i, e) in enumerate(nomi): print i, -, e which one is better? is there a

Re: Deprecated sets module with Python 2.6

2009-07-29 Thread Giampaolo Rodola'
What about this? import warnings warnings.simplefilter('ignore', DeprecationWarning) import the_module_causing_the_warning warnings.resetwarnings() --- Giampaolo http://code.google.com/p/pyftpdlib http://code.google.com/p/psutil -- http://mail.python.org/mailman/listinfo/python-list

Re: idiom for list looping

2009-07-29 Thread Xavier Ho
superpollo wrote: for (i, e) in enumerate(nomi): print i, -, e Just to be random: print '\n'.join([%s - %s % (i, e) for i, e in enumerate(nomi)]) This has one advantage: only print once. So it's slightly faster if you have a list of a large amount. --

Re: idiom for list looping

2009-07-29 Thread MRAB
Xavier Ho wrote: superpollo wrote: for (i, e) in enumerate(nomi): print i, -, e Just to be random: print '\n'.join([%s - %s % (i, e) for i, e in enumerate(nomi)]) This has one advantage: only print once. So it's slightly faster if you have a list of a large amount.

Re: idiom for list looping

2009-07-29 Thread Xavier Ho
On Wed, Jul 29, 2009 at 8:52 PM, MRAB pyt...@mrabarnett.plus.com wrote: Slightly shorter: print '\n'.join(%s - %s % p for p in enumerate(nomi)) :-) That's cool. Does that make the list a tuple? (not that it matters, I'm just curious!) I just tested for a list of 1000 elements (number in

Re: idiom for list looping

2009-07-29 Thread superpollo
MRAB wrote: Xavier Ho wrote: superpollo wrote: for (i, e) in enumerate(nomi): print i, -, e Just to be random: print '\n'.join([%s - %s % (i, e) for i, e in enumerate(nomi)]) This has one advantage: only print once. So it's slightly faster if you have a list of a

idiom for list looping

2009-07-29 Thread Xavier Ho
Ack, sent to the wrong email again. On Wed, Jul 29, 2009 at 9:02 PM, superpollo u...@example.net wrote: print '\n'.join(%s - %s % p for p in enumerate(nomi)) File stdin, line 1 print '\n'.join(%s - %s % p for p in enumerate(nomi)) ^ SyntaxError:

Re: idiom for list looping

2009-07-29 Thread MRAB
Xavier Ho wrote: On Wed, Jul 29, 2009 at 8:52 PM, MRAB pyt...@mrabarnett.plus.com mailto:pyt...@mrabarnett.plus.com wrote: Slightly shorter: print '\n'.join(%s - %s % p for p in enumerate(nomi)) :-) That's cool. Does that make the list a tuple? (not that it matters, I'm just

Re: idiom for list looping

2009-07-29 Thread Xavier Ho
On Wed, Jul 29, 2009 at 9:17 PM, MRAB pyt...@mrabarnett.plus.com wrote: I've just replaced the list comprehension with a generator expression. Oh, and that isn't in Python 2.3 I see. Generators are slightly newer, eh. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Semaphore Techniques

2009-07-29 Thread Nick Craig-Wood
John D Giotta jdgio...@gmail.com 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'm not very successful at grasping the

QFileDialog setFileMode blues

2009-07-29 Thread Rincewind
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() function just for that. The only trouble is that I cannot make it work. Last thing I've tried was something like this:

Re: QFileDialog setFileMode blues

2009-07-29 Thread Phil Thompson
On Wed, 29 Jul 2009 04:35:42 -0700 (PDT), Rincewind spoo...@gmail.com 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() function just for that. The only trouble is that

Run pyc file without specifying python path ?

2009-07-29 Thread Barak, Ron
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]# and made its pyc

Re: fast video encoding

2009-07-29 Thread Marcus Wanner
On 7/29/2009 4:14 AM, gregorth wrote: Hi all, for a scientific application I need to save a video stream to disc for further post processing. My cam can deliver 8bit grayscale images with resolution 640x480 with a framerate up to 100Hz, this is a data rate of 30MB/s. Writing the data

Re: simple splash screen?

2009-07-29 Thread Marcus Wanner
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 python? Marcus --

Re: Need help in passing a -c command argument to the interactive shell.

2009-07-29 Thread Duncan Booth
Bill bsag...@gmail.com wrote: On my windows box I type = c:\xpython -c import re The result is = c:\x In other words, the Python interactive shell doesn't even open. What am I doing wrong? I did RTFM at http://www.python.org/doc/1.5.2p2/tut/node4.html on argument passing, but to no

Re: about analyze object's stack usage

2009-07-29 Thread Marcus Wanner
On 7/29/2009 3:51 AM, hch wrote: Is there a python script can get a list of how much stack space each function in your program uses? I don't think so. You could try raw reading of the memory from another thread using ctypes and pointers, but that would be madness. ( the program is compiled by

Particle research opens door for new technology

2009-07-29 Thread Rashid Ali Soomro
Big uses for small particles will be explored at the annual Particle Technology Research Centre Conference at The University of Western Ontario July 9 and 10.more http://0nanotechnology0.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Help with sql and python

2009-07-29 Thread catalinf...@gmail.com
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 ! -- http://mail.python.org/mailman/listinfo/python-list

Re: Particle research opens door for new technology

2009-07-29 Thread Xavier Ho
Is this a spam? Why did you have to send it 4 times, and it's already in the past (July 9 and 10) ? Ching-Yun Xavier Ho, Technical Artist Contact Information Mobile: (+61) 04 3335 4748 Skype ID: SpaXe85 Email: cont...@xavierho.com Website: http://xavierho.com/ --

Working with platform.system()

2009-07-29 Thread v1d4l0k4
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 expected return values that you know? Thanks in advance, Paulo

escaping characters in filenames

2009-07-29 Thread J Kenneth King
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 finding a module or recipe

Re: Semaphore Techniques

2009-07-29 Thread Piet van Oostrum
Carl Banks pavlovevide...@gmail.com (CB) wrote: CB On Jul 28, 3:15 pm, John D Giotta jdgio...@gmail.com 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

Re: QFileDialog setFileMode blues

2009-07-29 Thread Rincewind
On Jul 29, 12:45 pm, Phil Thompson p...@riverbankcomputing.com wrote: On Wed, 29 Jul 2009 04:35:42 -0700 (PDT), Rincewind spoo...@gmail.com 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

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

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: 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

Re: Compiling Python for uCLinux appliance?

2009-07-29 Thread Grant Edwards
On 2009-07-29, Diez B. Roggisch de...@nospam.web.de 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

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

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})

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

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: Help with sql and python

2009-07-29 Thread Piet van Oostrum
catalinf...@gmail.com 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

Re: New implementation of re module

2009-07-29 Thread Mike
On Jul 29, 10:45 am, MRAB pyt...@mrabarnett.plus.com 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. -

Re: open a file in python

2009-07-29 Thread Piet van Oostrum
jayshree jayshree06c...@gmail.com (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

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

Re: Print value CLOB via cx_Oracle

2009-07-29 Thread Vincent Vega
On 28 Lip, 20:02, Vincent Vega lemm...@gmail.com 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

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: 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 dandi.k...@gmail.com 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

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

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_PATH

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

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

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: 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 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 the best

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: 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\ \\

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: 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

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

Re: simple splash screen?

2009-07-29 Thread NighterNet
On Jul 29, 11:16 am, Martin P. Hellwig martin.hell...@dcuktec.org 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:

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

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: Does underscore has any special built-in meaningin Python ?

2009-07-29 Thread Jan Kaliszewski
29-07-2009 Benjamin Kaplan benjamin.kap...@case.edu wrote: On Wed, Jul 29, 2009 at 1:59 PM, dandi kain dandi.k...@gmail.com 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

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 dandi.k...@gmail.com 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

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

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

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

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

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

Re: escaping characters in filenames

2009-07-29 Thread J Kenneth King
Nobody nob...@nowhere.com 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

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

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 I get

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

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:

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: 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

Re: simple splash screen?

2009-07-29 Thread Martin P. Hellwig
NighterNet wrote: cut 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

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

2009-07-29 Thread André
On Jul 29, 1:11 pm, Ryniek90 rynie...@gmail.com 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.

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

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)

Re: set variable to looping index?

2009-07-29 Thread Rhodri James
On Wed, 29 Jul 2009 19:56:28 +0100, Martin mdeka...@gmail.com 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]

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

Re: set variable to looping index?

2009-07-29 Thread Martin
On Jul 29, 11:02 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Wed, 29 Jul 2009 19:56:28 +0100, Martin mdeka...@gmail.com 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

Re: Does python have the capability for driver development ?

2009-07-29 Thread Nick Craig-Wood
Diez B. Roggisch de...@nospam.web.de 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: set variable to looping index?

2009-07-29 Thread Jan Kaliszewski
30-07-2009 mdeka...@gmail.com 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

Re: Semaphore Techniques

2009-07-29 Thread Carl Banks
On Jul 29, 7:14 am, Piet van Oostrum p...@cs.uu.nl wrote: Carl Banks pavlovevide...@gmail.com (CB) wrote: CB On Jul 28, 3:15 pm, John D Giotta jdgio...@gmail.com 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

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) z...@chopin.edu.pl -- http://mail.python.org/mailman/listinfo/python-list

Re: set variable to looping index?

2009-07-29 Thread Martin
On Jul 29, 11:57 pm, Jan Kaliszewski z...@chopin.edu.pl wrote: 30-07-2009 mdeka...@gmail.com 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 =

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

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:

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 some

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

Re: Does python have the capability for driver development ?

2009-07-29 Thread Martin P. Hellwig
Rodrigo S Wanderley wrote: cut 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

  1   2   >