Re: How Do I...?

2009-12-20 Thread Victor Subervi
On Sat, Dec 19, 2009 at 8:04 PM, Steve Holden, Chairman, PSF chair...@python.org wrote: Well, if we were looking for arrogance we could easily interpret that last statement as such. Please remember that although we are mainly left-brain types on this list some of us do have artistic and

Re: how do I set a Python installation as the default under windows ?

2009-12-20 Thread Stef Mientki
Steve Holden wrote: Stef Mientki wrote: hello, I just upgraded from Python 2.5 to 2.6. Most of the things work, but I'm struggling with one issue, when I start Python in a command window, it still uses Python 2.5. Is there a way to get Python 2.6 as my default Python environment ? thanks,

Re: numpy performance and random numbers

2009-12-20 Thread Lie Ryan
On 12/20/2009 2:53 PM, sturlamolden wrote: On 20 Des, 01:46, Lie Ryanlie.1...@gmail.com wrote: Not necessarily, you only need to be certain that the two streams don't overlap in any reasonable amount of time. For that purpose, you can use a PRNG that have extremely high period like Mersenne

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-20 Thread Steven D'Aprano
On Sun, 20 Dec 2009 08:29:43 +0100, Alf P. Steinbach wrote: I recently (just weeks ago) was astounded to see that a C++ expert thought that Java had pass by reference, apparently because in Java only references are passed around. The Java community, for some bizarre reason, has a tendency to

Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Victor Subervi
Hi; I'm looking for something like os.environ['HTTP_REFERER'] but for python scripts. That is, if I have a script that is imported by another script, how can I have the script that is being imported determine which script imported it? TIA, Victor --

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Chris Rebert
On Sun, Dec 20, 2009 at 2:06 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; I'm looking for something like os.environ['HTTP_REFERER'] but for python scripts. That is, if I have a script that is imported by another script, how can I have the script that is being imported determine which

Re: Class variables static by default?

2009-12-20 Thread Steven D'Aprano
On Sat, 19 Dec 2009 20:28:07 -0800, Chris Rebert wrote: Surely, since string variables are strings, and float variables are floats, and bool variables are bools, and module variables are modules, a class variable will be a class and an instance variable will be an instance? As they say,

Mails encoding

2009-12-20 Thread Lord Eldritch
I have a CGI written in Python to process a form a read/write a text file (a minimal database). It runs in a Linux box with and it looks all the encoding is UTF8. Now I have two questions: - When I have: ttext='áá' I get a warning sendinme to this page

Re: Mails encoding

2009-12-20 Thread Chris Rebert
On Sun, Dec 20, 2009 at 2:46 AM, Lord Eldritch lord_eldri...@yahoo.co.uk wrote: snip - When I have: ttext='áá' I get a warning sendinme to this page http://www.python.org/peps/pep-0263.html Should I understand that PEP has been already implemented and follow it? Yes. Cheers,

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Victor Subervi
On Sun, Dec 20, 2009 at 5:18 AM, Chris Rebert c...@rebertia.com wrote: On Sun, Dec 20, 2009 at 2:06 AM, Victor Subervi victorsube...@gmail.com wrote: Hi; I'm looking for something like os.environ['HTTP_REFERER'] but for python scripts. That is, if I have a script that is imported by

Re: py itertools?

2009-12-20 Thread Parker
a = 'qwerty' b = '^%$#' c = [(x,y) for x in a for y in b] c [('q', '^'), ('q', '%'), ('q', ''), ('q', '$'), ('q', '#'), ('w', '^'), ('w', '%'), ('w', ''), ('w', '$'), ('w', '#'), ('e', '^'), ('e', '%'), ('e', ''), ('e', '$'), ('e', '#'), ('r', '^'), ('r', '%'), ('r', ''), ('r', '$'), ('r',

Import Problem

2009-12-20 Thread Victor Subervi
Hi; I have this import statement: from particulars import storePrimaryStandAlone, addStore, ourStores particulars.py has this code: def addStore(): return 'jewelry' def ourStores(): return ['products', 'prescriptions'] def storePrimaryStandAlone(): return 'prescriptions' But I get this

Re: Import Problem

2009-12-20 Thread Chris Rebert
On Sun, Dec 20, 2009 at 3:34 AM, Victor Subervi victorsube...@gmail.com wrote: snip But I get this error: /var/www/html/angrynates.com/cart/createTables2.py   263 /html   264 '''   265   266 createTables2()   267 createTables2 = function createTables2  

Re: py itertools?

2009-12-20 Thread Chris Rebert
On Dec 19, 12:48 pm, Chris Rebert c...@rebertia.com wrote: On Sat, Dec 19, 2009 at 2:54 AM, mattia ger...@gmail.com wrote: Hi all, I need to create the permutation of two strings but without repeat the values, e.g. 'ab' for me is equal to 'ba'. Here is my solution, but maybe the python

Re: tarfiles usage on python 2.4.4

2009-12-20 Thread yousay
On Dec 19, 9:27 am, tekion tek...@gmail.com wrote: All, I am using tarfile module and my python is version 2.4.4.  When I call method extractall, I am getting error method does not exist. Could someone confirm if the method exist on python 2.4.4? Thanks dir(tarfile) check if is exist --

Re: How Do I...?

2009-12-20 Thread Steve Holden
Victor Subervi wrote: On Sat, Dec 19, 2009 at 8:04 PM, Steve Holden, Chairman, PSF chair...@python.org mailto:chair...@python.org wrote: Well, if we were looking for arrogance we could easily interpret that last statement as such. Please remember that although we are mainly

console command to get the path of a function

2009-12-20 Thread mattia
Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia -- http://mail.python.org/mailman/listinfo/python-list

C Structure rebuild with ctypes

2009-12-20 Thread Georg
Hi All, I need to use a library written in C. The routine int func (int handle, int *numVars, char ***varNames, int **varTypes) expects a complex object: ... Variable names are structured as an array of *numVars pointers, each pointing to a char string containing a variable name, and

Re: console command to get the path of a function

2009-12-20 Thread Irmen de Jong
On 12/20/2009 1:45 PM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia something like this? import inspect import os inspect.getsourcefile(os.path.split) 'C:\\Python26\\lib\\ntpath.py'

Re: py itertools?

2009-12-20 Thread mattia
Il Sun, 20 Dec 2009 03:49:35 -0800, Chris Rebert ha scritto: On Dec 19, 12:48 pm, Chris Rebert c...@rebertia.com wrote: On Sat, Dec 19, 2009 at 2:54 AM, mattia ger...@gmail.com wrote: Hi all, I need to create the permutation of two strings but without repeat the values, e.g. 'ab' for me is

Re: console command to get the path of a function

2009-12-20 Thread mattia
Il Sun, 20 Dec 2009 13:53:18 +0100, Irmen de Jong ha scritto: On 12/20/2009 1:45 PM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia something like this? import inspect import os

Re: console command to get the path of a function

2009-12-20 Thread mattia
Il Sun, 20 Dec 2009 13:53:18 +0100, Irmen de Jong ha scritto: On 12/20/2009 1:45 PM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia something like this? import inspect import os

Re: console command to get the path of a function

2009-12-20 Thread Peter Otten
mattia wrote: Il Sun, 20 Dec 2009 13:53:18 +0100, Irmen de Jong ha scritto: On 12/20/2009 1:45 PM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia something like this? import

Invalid syntax error

2009-12-20 Thread Ray Holt
Why am I getting an invalid syntax error on the following: os.chdir(c:\\Python_Modules). The error message says the colon after c is invalid syntax. Why is it saying this when I am trying to change directory to c:\Python_Modules. Thanks, Ray -- http://mail.python.org/mailman/listinfo/python-list

Re: Invalid syntax error

2009-12-20 Thread Xavier Ho
Putting quotemarks around the path would be a good start, I think. Cheers, Xav On Sun, Dec 20, 2009 at 11:40 PM, Ray Holt mrhol...@sbcglobal.net wrote: Why am I getting an invalid syntax error on the following: os.chdir(c:\\Python_Modules). The error message says the colon after c is

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-20 Thread Alf P. Steinbach
Hi, 10 details I forgot in my first response... * John Posner: [...] Chapter 2, which current runs 98 pages! The chapter 2 PDF I posted on url: http://tinyurl.com/programmingbookP3 was and is (it's not been updated) 101 pages, with an -EOT- at page 102. I suspect you may have read the

Re: numpy performance and random numbers

2009-12-20 Thread David Cournapeau
On Sun, Dec 20, 2009 at 6:47 PM, Lie Ryan lie.1...@gmail.com wrote: On 12/20/2009 2:53 PM, sturlamolden wrote: On 20 Des, 01:46, Lie Ryanlie.1...@gmail.com  wrote: Not necessarily, you only need to be certain that the two streams don't overlap in any reasonable amount of time. For that

how to go back from 2.6.4 to 2.6.2 under windows ?

2009-12-20 Thread Stef Mientki
hello, I've just upgraded my system from Python 2.5 to 2.6.4, and installed the latest packages of a lot of libraries. Now one essential package (VPython) only works with Python 2.6.2. I tried to install Python 2.6.2 over this 2.6.4 installation, and indeed the readme file says it's 2.6.2, but

problem with cheetah

2009-12-20 Thread mlowicki
Hi!, i get such error when I try to install cheetah: sudo easy_install cheetah Searching for cheetah Reading http://pypi.python.org/simple/cheetah/ Reading http://www.CheetahTemplate.org/ Reading http://sourceforge.net/project/showfiles.php?group_id=28961 Reading http://www.cheetahtemplate.org/

Re: comparing dialects of csv-module

2009-12-20 Thread Malte Dik
quote: d = csv.Sniffer().sniff(1,2,3) def eq(a, b, attributes=[name for name in dir(d) if not name.startswith(_)]): ... return all(getattr(a, n, None) == getattr(b, n, None) for n in attributes) Only change I made is substituting dir(csv.excel) or dir(csv.Dialect) for dir(d), because I

Re: console command to get the path of a function

2009-12-20 Thread Dave Angel
mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). Thanks, Mattia If you know what module it's in, you can use themodule.__file__ But realize that this will only work if the module has been

Re: Invalid syntax error

2009-12-20 Thread D'Arcy J.M. Cain
On Sun, 20 Dec 2009 08:40:05 -0500 Ray Holt mrhol...@sbcglobal.net wrote: Why am I getting an invalid syntax error on the following: os.chdir(c:\\Python_Modules). The error message says the colon after c is You forgot the quotes around the string. I am not on Windows but I think the following

Re: problem with cheetah

2009-12-20 Thread Diez B. Roggisch
mlowicki schrieb: Hi!, i get such error when I try to install cheetah: sudo easy_install cheetah Searching for cheetah Reading http://pypi.python.org/simple/cheetah/ Reading http://www.CheetahTemplate.org/ Reading http://sourceforge.net/project/showfiles.php?group_id=28961 Reading

Python3.1: gzip encoding with UTF-8 fails

2009-12-20 Thread Johannes Bauer
Hello group, with this following program: #!/usr/bin/python3 import gzip x = gzip.open(testdatei, wb) x.write(ä) x.close() I get a broken .gzip file when decompressing: $ cat testdatei |gunzip ä gzip: stdin: invalid compressed data--length error As it only happens with UTF-8 characters, I

Re: Creating Classes

2009-12-20 Thread Steve Holden
Dave Angel wrote: [...] We were talking about 2.x And I explicitly mentioned 3.x because if one develops code that depends on old-style classes, they'll be in trouble with 3.x, which has no way to specify old-style classes. In 3.x, all classes are new-style. And although it'll no longer

Re: how to go back from 2.6.4 to 2.6.2 under windows ?

2009-12-20 Thread Benjamin Kaplan
On Sun, Dec 20, 2009 at 9:26 AM, Stef Mientki stef.mien...@gmail.com wrote: hello, I've just upgraded my system from Python 2.5 to 2.6.4, and installed the latest packages of a lot of libraries. Now one essential package (VPython) only works with Python 2.6.2. I tried to install Python

Multithreaded python program freezes

2009-12-20 Thread Andreas Røsdal
Hello, I have some problems with a http proxy which is implemented in Python 2.6. A few times a day, the proxy begins using 100% CPU and doesn't work any more. I have created a thread dump when the problem occurs here: http://www.pvv.ntnu.no/~andrearo/thread-dump.html This is a thread dump

Re: Python3.1: gzip encoding with UTF-8 fails

2009-12-20 Thread Diez B. Roggisch
Johannes Bauer schrieb: Hello group, with this following program: #!/usr/bin/python3 import gzip x = gzip.open(testdatei, wb) x.write(ä) x.close() I get a broken .gzip file when decompressing: $ cat testdatei |gunzip ä gzip: stdin: invalid compressed data--length error As it only happens

Re: opening a connection to quickbooks

2009-12-20 Thread Aahz
In article noidnyb9g7d8godwnz2dnuvz_jedn...@wavecable.com, jfabi...@yolo.com wrote: Has anyone ever attempted to work with quickbooks in a real time fashion? I need some advise. I'm trying to work out a way to have real time updates/inserts/and queries. I'd also like not to use all the user

Re: problem with cheetah

2009-12-20 Thread mlowicki
On Dec 20, 4:54 pm, Diez B. Roggisch de...@nospam.web.de wrote: mlowicki schrieb: Hi!, i get such error when I try to install cheetah: sudo easy_install cheetah Searching for cheetah Readinghttp://pypi.python.org/simple/cheetah/ Readinghttp://www.CheetahTemplate.org/

Re: When will Python 3 be fully deployed

2009-12-20 Thread Aahz
In article mailman.1660.1260434572.2873.python-l...@python.org, Ned Deily n...@acm.org wrote: In article 4b20ac0a$0$1596$742ec...@news.sonic.net, John Nagle na...@animats.com wrote: I'd argue against using Python 2.6 for production work. Either use Python 2.5, which is stable, or 3.x, which

Re: os.starfile() linux

2009-12-20 Thread Todd A. Jacobs
On Mon, Nov 30, 2009 at 05:35:31PM +, joao abrantes wrote: to open a new shell and to put the output of the new python program there.. The subprocess module is probably what you want. -- Oh, look: rocks! -- Doctor Who, Destiny of the Daleks --

Re: Invalid syntax error

2009-12-20 Thread Todd A. Jacobs
On Sun, Dec 20, 2009 at 08:40:05AM -0500, Ray Holt wrote: Why am I getting an invalid syntax error on the following: os.chdir(c:\\Python_Modules). The error message says the colon after c You need to pass either a string literal or a variable. If you're passing a string, like you are trying to

IDLE issue

2009-12-20 Thread Mohamed Musthafa Safarulla
I have python 2.5 ...but when i open it, i get the below error messages Socker Error: Connection refused and IDLE's subprocess didnt make connection. Either IDLE can't start subprocess or personal firewall software is blocking the connection. Have someone encountered this issue? Please help.

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread MRAB
Victor Subervi wrote: Hi; I'm looking for something like os.environ['HTTP_REFERER'] but for python scripts. That is, if I have a script that is imported by another script, how can I have the script that is being imported determine which script imported it? I don't know whether that's possible

Re: Where is my namespace?

2009-12-20 Thread Aahz
In article 00a7037c$0$15659$c3e8...@news.astraweb.com, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: 2009/12/7 vsoler vicente.so...@gmail.com: 3. Mark says: The from statement is really an assignment to names in the importer's scope--a name-copy operation, not a name aliasing.  

Re: Python3.1: gzip encoding with UTF-8 fails

2009-12-20 Thread Mark Tolonen
Diez B. Roggisch de...@nospam.web.de wrote in message news:7p7328f3r1r2...@mid.uni-berlin.de... Johannes Bauer schrieb: Hello group, with this following program: #!/usr/bin/python3 import gzip x = gzip.open(testdatei, wb) x.write(ä) x.close() I get a broken .gzip file when

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Stephen Hansen
On Sun, Dec 20, 2009 at 3:05 AM, Victor Subervi victorsube...@gmail.comwrote: Of course, I can pass the page name as a parameter, but that's not elegant. That is precisely what it is in fact-- elegant; it is non-elegant to have magical behavior where what 'imports' something somehow changes or

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Victor Subervi
On Sun, Dec 20, 2009 at 1:20 PM, Stephen Hansen apt.shan...@gmail.comwrote: On Sun, Dec 20, 2009 at 3:05 AM, Victor Subervi victorsube...@gmail.comwrote: Of course, I can pass the page name as a parameter, but that's not elegant. That is precisely what it is in fact-- elegant; it is

Re: how to go back from 2.6.4 to 2.6.2 under windows ?

2009-12-20 Thread Stef Mientki
Benjamin Kaplan wrote: On Sun, Dec 20, 2009 at 9:26 AM, Stef Mientki stef.mien...@gmail.com wrote: hello, I've just upgraded my system from Python 2.5 to 2.6.4, and installed the latest packages of a lot of libraries. Now one essential package (VPython) only works with Python 2.6.2. I

Re: console command to get the path of a function

2009-12-20 Thread Terry Reedy
On 12/20/2009 7:45 AM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). On Windows and I believe other systems, for the stdlib, 'import x' imports .../Pythonx.y/Lib/x --

Re: IDLE issue

2009-12-20 Thread Terry Reedy
On 12/20/2009 12:17 PM, Mohamed Musthafa Safarulla wrote: I have python 2.5 ...but when i open it, i get the below error messages Socker Error: Connection refused and IDLE's subprocess didnt make connection. Either IDLE can't start subprocess or personal firewall software is blocking the

Re: Anybody use web2py?

2009-12-20 Thread mdipierro
The concept of distributed transaction does not make sense on GAE because there is only one datastore. It supports regular transactions on GAE to the extent that GAE supports them but you have to use the GAE run_in_transaction API explictely. It does support distributed transactions with

Re: how to go back from 2.6.4 to 2.6.2 under windows ?

2009-12-20 Thread Terry Reedy
On 12/20/2009 2:59 PM, Stef Mientki wrote: Benjamin Kaplan wrote: On Sun, Dec 20, 2009 at 9:26 AM, Stef Mientki stef.mien...@gmail.com wrote: hello, I've just upgraded my system from Python 2.5 to 2.6.4, and installed the latest packages of a lot of libraries. Now one essential package

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Stephen Hansen
On Sun, Dec 20, 2009 at 11:01 AM, Victor Subervi victorsube...@gmail.comwrote: If you want a piece of code to have a variable number of differing behaviors, that's something you can handle in many elegant ways. That's something inheritance is good for, with a core default behavior represented

Re: how to go back from 2.6.4 to 2.6.2 under windows ?

2009-12-20 Thread Stef Mientki
So I guess this is a reasonable approach, and all libraries should work well, unless one of these libraries has a work around for one of the bugs fixed between 2.6.2 and 2.6.4. Let VPython people know about this problem. People should be able to run it on the latest patched 2.6. Well

Re: console command to get the path of a function

2009-12-20 Thread pograph
On Dec 20, 12:02 pm, Terry Reedy tjre...@udel.edu wrote: On 12/20/2009 7:45 AM, mattia wrote: Hi all, is there a way in the python shell to list the path of a library function (in order to look at the source code?). On Windows and I believe other systems, for the stdlib, 'import x'

Live Video Capture using Python

2009-12-20 Thread aditya shukla
Hello Guys, I am trying to capture images from a live broadcast of a cricket match or say any video using python. I can see the video in the browser.My aim is to capture the video at any moment and create an images.Searching on google turns up http://videocapture.sourceforge.net/ .I am not sure

Re: Anybody use web2py?

2009-12-20 Thread Baron
If all web2py offers is default views, then it may be good for proof of concept projects, however I can't see in my right mind, proofing an application, and then turning around to write it in django because more than the defaults is needed. You *can* customize web2py views ... Why does

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Tim Chase
Victor Subervi wrote: On Sun, Dec 20, 2009 at 1:20 PM, Stephen Hansen apt.shan...@gmail.comwrote: Of course, I can pass the page name as a parameter, but that's not elegant. That is precisely what it is in fact-- elegant; it is non-elegant to have magical behavior where what 'imports'

Re: How Do I...?

2009-12-20 Thread Tim Chase
Victor Subervi wrote: The aim was not arrogance, but expression of exasperation Walk a mile in my mocassins. You can't do it. I'm an artist. I think out of my right hemisphere, not my left like you. You couldn't possibly understand. [snip] Thank you for your help anyway. Thank you for your

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Victor Subervi
On Sun, Dec 20, 2009 at 3:26 PM, Stephen Hansen apt.shan...@gmail.comwrote: On Sun, Dec 20, 2009 at 11:01 AM, Victor Subervi victorsube...@gmail.comwrote: If you want a piece of code to have a variable number of differing behaviors, that's something you can handle in many elegant ways.

Re: Something Like os.environ['HTTP_REFERER']

2009-12-20 Thread Dave Angel
Victor Subervi wrote: Inelegant. This will be elegant: ourFile = string.split(__file__, /) p = ourFile[len(ourFile) - 1] p = p[: - 3] site = ourFile[4][:-10] if site != '': site = site[:-1] from this import that(site) Now it's automated. V Amazing. When trying to split a path string,

PyQt Signals and multiple sources

2009-12-20 Thread Zabin
I am beginner in programming in pyqt. I have been trying to call the same function from multiple events- but each event results in a different instance of the function. I am just unable to figure out how to retrieve the source which calls the function: My source signal declarations are as below:

Re: PyQt Signals and multiple sources

2009-12-20 Thread John Posner
On Sun, 20 Dec 2009 16:59:11 -0500, Zabin zabin.faris...@gmail.com wrote: I am beginner in programming in pyqt. I have been trying to call the same function from multiple events- but each event results in a different instance of the function. I am just unable to figure out how to retrieve the

Re: PyQt Signals and multiple sources

2009-12-20 Thread Zabin
On Dec 21, 11:15 am, John Posner jjpos...@optimum.net wrote: On Sun, 20 Dec 2009 16:59:11 -0500, Zabin zabin.faris...@gmail.com wrote: I am beginner in programming in pyqt. I have been trying to call the same function from multiple events- but each event results in a different instance of

Re: When will Python 3 be fully deployed

2009-12-20 Thread Roy Smith
In article hgll51$cv...@panix5.panix.com, a...@pythoncraft.com (Aahz) wrote: Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before. That's a sad commentary. Python is fun to use, but surely there are other ways you can enjoy

Re: Anybody use web2py?

2009-12-20 Thread mdipierro
People seem to think that because web2py has a default for almost everything (part of its design) than you must use the default. - There is a web based IDE but you *can* use the shell instead (like you do in Django) - There are migrations but you *can* disable then (and it works like Django that

Re: C Structure rebuild with ctypes

2009-12-20 Thread Mark Tolonen
Georg nob...@nowhere.org wrote in message news:7p6ksnfkg...@mid.individual.net... Hi All, I need to use a library written in C. The routine int func (int handle, int *numVars, char ***varNames, int **varTypes) expects a complex object: ... Variable names are structured as an array of

Re: numpy performance and random numbers

2009-12-20 Thread Lie Ryan
On 12/21/2009 1:13 AM, David Cournapeau wrote: But the OP case mostly like falls in your estimated 0.01% case. PRNG quality is essential for reliable Monte Carlo procedures. I don't think long period is enough to guarantee those good properties for // random generators - at least it is not

Re: strptime not strict enough

2009-12-20 Thread Tim Roberts
Chris Rebert c...@rebertia.com wrote: On Tue, Dec 15, 2009 at 9:47 PM, Tim Roberts t...@probo.com wrote: Tobias Weber t...@gmx.net wrote: despite the directives for leading zero stime.strptime('09121', '%y%m%d') returns the first of December. Shouldn't it raise ValueError? Python merely calls

Re: numpy performance and random numbers

2009-12-20 Thread Peter Pearson
On Sun, 20 Dec 2009 07:26:03 +1100, Lie Ryan lie.1...@gmail.com wrote: On 12/20/2009 4:02 AM, Carl Johan Rehn wrote: Parallel PRNGs are an unsolved problem in computer science. Thanks again for sharing your knowledge. I had no idea. This means that if I want to speed up my application I have

Windows, IDLE, __doc_, other

2009-12-20 Thread W. eWatson
When I use numpy.__doc__ in IDLE under Win XP, I get a heap of words without reasonable line breaks. \nNumPy\n=\n\nProvides\n 1. An array object of arbitrary homogeneous items\n 2. Fast mathematical operations over arrays\n 3. Linear Algebra, Fourier Transforms, Random Number ... Is

Re: Windows, IDLE, __doc_, other

2009-12-20 Thread W. eWatson
Add to this. Isn't there a way to see the arguments and descriptions of functions? -- http://mail.python.org/mailman/listinfo/python-list

converting string to a date format

2009-12-20 Thread tekion
All, I know there is a datetime module for converting and manipulate date format. I have this string date format: 24/Nov/2009:10:39:03 -0500 and would like to convert it to a date format of 2009-11-24 10:39:03. At the moment I am reading datetime module trying to find out if I could do it with

Re: Windows, IDLE, __doc_, other

2009-12-20 Thread Lie Ryan
On 12/21/2009 1:19 PM, W. eWatson wrote: When I use numpy.__doc__ in IDLE under Win XP, I get a heap of words without reasonable line breaks. \nNumPy\n=\n\nProvides\n 1. An array object of arbitrary homogeneous items\n 2. Fast mathematical operations over arrays\n 3. Linear Algebra,

Re: converting string to a date format

2009-12-20 Thread MRAB
tekion wrote: All, I know there is a datetime module for converting and manipulate date format. I have this string date format: 24/Nov/2009:10:39:03 -0500 and would like to convert it to a date format of 2009-11-24 10:39:03. At the moment I am reading datetime module trying to find out if I

Re: Windows, IDLE, __doc_, other

2009-12-20 Thread Benjamin Kaplan
On Sun, Dec 20, 2009 at 9:16 PM, W. eWatson wolftra...@invalid.com wrote: When I use numpy.__doc__ in IDLE under Win XP, I get a heap of words without reasonable line breaks. \nNumPy\n=\n\nProvides\n  1. An array object of arbitrary homogeneous items\n  2. Fast mathematical operations

Re: converting string to a date format

2009-12-20 Thread Ben Finney
tekion tek...@gmail.com writes: I have this string date format: 24/Nov/2009:10:39:03 -0500 and would like to convert it to a date format of 2009-11-24 10:39:03. This should, ideally, consist of two separate operations: * parse the string, using a specific format, to create a ‘datetime’

Re: Multithreaded python program freezes

2009-12-20 Thread Cameron Simpson
On 20Dec2009 17:36, Andreas R�sdal andre...@pvv.ntnu.no wrote: | I have some problems with a http proxy which is implemented | in Python 2.6. A few times a day, the proxy begins using 100% CPU | and doesn't work any more. | | I have created a thread dump when the problem occurs here: |

Re: numpy performance and random numbers

2009-12-20 Thread Rami Chowdhury
On Dec 20, 2009, at 17:41 , Peter Pearson wrote: On Sun, 20 Dec 2009 07:26:03 +1100, Lie Ryan lie.1...@gmail.com wrote: On 12/20/2009 4:02 AM, Carl Johan Rehn wrote: Parallel PRNGs are an unsolved problem in computer science. Thanks again for sharing your knowledge. I had no idea. This

The fun of Python (was Re: When will Python 3 be fully deployed)

2009-12-20 Thread Aahz
In article roy-8d00e9.17341520122...@news.panix.com, Roy Smith r...@panix.com wrote: In article hgll51$cv...@panix5.panix.com, a...@pythoncraft.com (Aahz) wrote: -- Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before. That's a

Re: The fun of Python

2009-12-20 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: I never called myself a programmer before I learned Python because I didn't really like it. It took Python to make me realize that programming *could* be fun, or at least not annoying enough to keep me from making a career of programming. +1 QOTW -- \

Re: Live Video Capture using Python

2009-12-20 Thread Banibrata Dutta
Have you searched the archives of this list ? I remember seeing a related discussion 5-6 months back. On Mon, Dec 21, 2009 at 2:35 AM, aditya shukla adityashukla1...@gmail.comwrote: Hello Guys, I am trying to capture images from a live broadcast of a cricket match or say any video using

Re: Live Video Capture using Python

2009-12-20 Thread David Lyon
Also try.. http://www.unixuser.org/~euske/python/vnc2flv/index.html On Mon, 21 Dec 2009 11:15:32 +0530, Banibrata Dutta banibrata.du...@gmail.com wrote: Have you searched the archives of this list ? I remember seeing a related discussion 5-6 months back. On Mon, Dec 21, 2009 at 2:35 AM,

Re: how do I set a Python installation as the default under windows ?

2009-12-20 Thread Sridhar Ratnakumar
On 12/20/2009 1:35 AM, Stef Mientki wrote: Steve Holden wrote: Stef Mientki wrote: hello, I just upgraded from Python 2.5 to 2.6. Most of the things work, but I'm struggling with one issue, when I start Python in a command window, it still uses Python 2.5. Is there a way to get Python 2.6

Re: Class variables static by default?

2009-12-20 Thread Gabriel Genellina
En Sun, 20 Dec 2009 01:16:16 -0300, Steven D'Aprano st...@remove-this-cybersource.com.au escribió: On Sun, 20 Dec 2009 11:44:11 +1100, Lie Ryan wrote: In python, 'class variable' is a variable that belongs to a class; not to the instance and is shared by all instance that belong to the class.

Re: How can I get the target platform info of a dll with Python 3.1.1?

2009-12-20 Thread Gabriel Genellina
En Mon, 14 Dec 2009 07:25:45 -0300, W00D00 istvan.szir...@gmail.com escribió: On dec. 12, 03:18, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 11 Dec 2009 16:39:37 -0300, Isti istvan.szir...@gmail.com escribió: I have manydllfiles and I would like to select them into two

Re: AttributeError: logging module bug ?

2009-12-20 Thread Gabriel Genellina
En Sat, 19 Dec 2009 00:18:26 -0300, Peter vm...@mycircuit.org escribió: This was somehow unexpected for me, since in a module using logger.py, I could use either import: from mylogger import logger # without package name or from of.mylogger import logger # with package name but this

Re: Mails encoding

2009-12-20 Thread Gabriel Genellina
En Sun, 20 Dec 2009 07:46:02 -0300, Lord Eldritch lord_eldri...@yahoo.co.uk escribió: I have a CGI written in Python to process a form a read/write a text file (a minimal database). It runs in a Linux box with and it looks all the encoding is UTF8. [...] - Related to the former one: the

Re: Windows, IDLE, __doc_, other

2009-12-20 Thread Alf P. Steinbach
* W. eWatson: When I use numpy.__doc__ in IDLE under Win XP, I get a heap of words without reasonable line breaks. \nNumPy\n=\n\nProvides\n 1. An array object of arbitrary homogeneous items\n 2. Fast mathematical operations over arrays\n 3. Linear Algebra, Fourier Transforms, Random

[issue7549] 2.6.4 Win32 linked to debug DLLs?

2009-12-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: wininst*.exe is the binary that gets patched into the zip file when you build a windows installer out of your Python package. wininst-8_d.exe is the debug version of that, so it's not surprising that it is linked with the debug CRT. What is

[issue7549] 2.6.4 Win32 linked to debug DLLs?

2009-12-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I have now removed these files from my build directory, so they won't get included in future releases. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2009-12-20 Thread lekma
lekma lekma...@gmail.com added the comment: this one addresses Antoines's comments (with the help of R. David Murray). -- Added file: http://bugs.python.org/file15621/Issue7523_3.diff ___ Python tracker rep...@bugs.python.org

[issue7033] C/API - Document exceptions

2009-12-20 Thread lekma
lekma lekma...@gmail.com added the comment: Is there any chance that this will make it in? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7033 ___

[issue7549] 2.6.4 Win32 linked to debug DLLs?

2009-12-20 Thread John Wells
John Wells johnx...@gmail.com added the comment: Thanks for the quick follow-up. You're right -- given your explanation of what wininst-8_d.exe is, the interesting question now is why it is running. I get two errors every day, in the early hours of the morning. Before I delete this file, I

[issue7528] Provide PyLong_AsLongAndOverflow compatibility to Python 2.x

2009-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: The longobject.diff patch looks fine, modulo some whitespace nits. (Older C source files use width-8 tabs for indentation.) Are you interested in adding documentation and tests (the latter in the test_capi module)? One thing about the

[issue7550] PyLong_As* methods should not call nb_int.

2009-12-20 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: The following C-API functions: PyLong_AsLongAndOverflow PyLong_AsUnsignedLongMask PyLong_AsLongLong PyLong_AsUnsignedLongLongMask call nb_int for inputs that don't satisfy PyLong_Check. They thus accept floats, Decimal instances, etc.

[issue7376] python -m doctest results in FAIL: Doctest: __main__.DebugRunner

2009-12-20 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15392/issue7376_usage.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7376 ___

[issue7376] python -m doctest results in FAIL: Doctest: __main__.DebugRunner

2009-12-20 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Minor update: replaced '{}' by '{0}' for compatibility with 2.6. Ready for review and merge. -- Added file: http://bugs.python.org/file15622/issue7376_usage.diff ___ Python tracker

  1   2   >