Re: Is python worth learning as a second language?

2009-03-11 Thread bubill
I'm a Testing Engineer ,i don't know any language at all before learning py3k ,and for Testing job! -- http://mail.python.org/mailman/listinfo/python-list

Problem with threading: can't start new thread

2009-03-11 Thread sufrank
I am doing stress test with python using threading, I have encountered the can't start new thread problem when running the script. The system is Linux, python version 2.4 Traceback (most recent call last): File "./imap_test.py", line 38, in ? current.start() File "/usr/lib/python2.4/threadi

Re: Ban Xah Lee

2009-03-11 Thread Hendrik van Rooyen
"Kenneth Tilton" wrote: > > ps. when the hell do I get an eponymous banning thread?! I have been > flaming this damn group for 13 years and no recognition!! k > Well you are obviously not trying hard enough, so you have nobody but yourself to blame if you get pipped at the post after 13 years

Re: urllib2.URLError:

2009-03-11 Thread Chris Rebert
On Tue, Mar 10, 2009 at 11:34 PM, Coonay wrote: > i use python2.6 > > > File "C:\PROGRA~1\Python26\lib\urllib2.py", line 383, in open >    response = self._open(req, data) >  File "C:\PROGRA~1\Python26\lib\urllib2.py", line 401, in _open >    '_open', req) >  File "C:\PROGRA~1\Python26\lib\urllib2

WSE 3 with Python (Newbie)

2009-03-11 Thread Shane Bignell
Hi, I am trying to post a python HTTP request to a web service that implements using Web Service Enhancements 3.0. I have WSE3.0 installed on the client and the server and I have looked over a few examples of how the SOAP header should look like for WSE authentication, I have included the follo

Re: python code to fortran 77's

2009-03-11 Thread Larry
On Mar 9, 9:55 am, John Machin wrote: > On Mar 9, 12:09 pm, Larry wrote: > > > > > Friends, > > > I need to read a binary file using a Fortran 77 code to integrate with > > a legacy code It looked very much complicated to me for I have no > > knowledge in Fortran. > > > I could read the file

Re: Problem with threading: can't start new thread

2009-03-11 Thread Diez B. Roggisch
sufrank wrote: > I am doing stress test with python using threading, I have encountered > the can't start new thread problem when running the script. > The system is Linux, python version 2.4 http://stackoverflow.com/questions/344203/maximum-number-of-threads-per-process-in-linux Diez -- http://

Re: Ban Xah Lee

2009-03-11 Thread Craig Allen
> There you go: a 30-second psychological diagnosis by an > electrical engineer based entirely on Usenet postings.  It > doesn't get much more worthless than that... > > -- > Grant rolf but interesting post nonetheless. I have been really somewhat fascinated by AS since I heard of it about a dec

Re: Determining from which web page a cgi script is invoked?

2009-03-11 Thread davidgould
On Mar 10, 7:15 pm, cm wrote: > davidgo...@davidgould.com escribió: > > > Given a webpage test.html that has a form with a cgi script, how can > > you determine inside the cgi script the name of the webpage that > > invoked the script? > > > I have many different html pages that use a common cgi s

Re: Determining from which web page a cgi script is invoked?

2009-03-11 Thread davidgould
On Mar 10, 7:15 pm, cm wrote: > davidgo...@davidgould.com escribió: > > > Given a webpage test.html that has a form with a cgi script, how can > > you determine inside the cgi script the name of the webpage that > > invoked the script? > > > I have many different html pages that use a common cgi s

elixir vs. storm

2009-03-11 Thread Dan Barbus
Hi, Anyone here compared elixir with storm? Both are sqlite declarative wrappers (as far as I understood) and both seem to hide the (unnecessary for what I want) SQL/data layer under pythonic wrappers. I'm not trying to start a flamewar here (but I wanted to know if one is more mature than the ot

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 11:08 am, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > Hello all, > >            I am writing a python script which has to access deep paths > > then supported normally by the Windows OS (>255). So I am appending "\ > > \?\" to do so. But when I use the path in the above fashi

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 11:08 am, Tim Golden wrote: venutaurus...@gmail.com wrote: Hello all, I am writing a python script which has to access deep paths then supported normally by the Windows OS (>255). So I am appending "\ \?\" to do so. But when I use the path i

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 5:02 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 11:08 am, Tim Golden wrote: > >> venutaurus...@gmail.com wrote: > >>> Hello all, > >>>            I am writing a python script which has to access deep paths > >>> then supported normally by the Windows OS (>255

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLevel05\DeepPathLevel06\DeepPathLevel07\DeepPathLevel08\DeepPathLevel09\DeepPathLevel10\DeepPathLevel11\DeepPathLeve

blocked on futex

2009-03-11 Thread msoulier
Hello, I'm using the Python packaged with CentOS 4.7, which is a patched 2.3.4. Yes, ancient but I can't do anything about it. The problem is that my long-running process, which talks to PostgreSQL via Django models, does a lot of reading and writing to and from the disk and writes to a Unix doma

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 5:19 pm, Tim Golden wrote: > > Here is my code snippet which you will be interested in: > > Indeed. > > > file = ur'\\?\C:\\TestDataSet\DeepPaths > > \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLe > > vel05\DeepPathLevel06\DeepPathLevel07\DeepPathLevel08\De

msiexec and python-2.6.1.msi

2009-03-11 Thread cjl
With previous versions of the Python Windows msi installer, for example 2.5.4, I could run the following command from the windows cmd prompt: msiexec /a C:\python-2.5.4.msi /qn TARGETDIR=C:\python This would result in a 'full' python installation in the C:\python directory, inside of which I woul

Re: elixir vs. storm

2009-03-11 Thread Bruno Desthuilliers
Dan Barbus a écrit : Hi, Anyone here compared elixir with storm? Both are sqlite declarative wrappers (as far as I understood) and both seem to hide the (unnecessary for what I want) SQL/data layer under pythonic wrappers. elixir is a declarative layer over SQLAlchemy, which is a hi-level SQL

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepPathLevel04\DeepPathLe vel05\DeepPathLevel06\DeepPathLevel07\Dee

Re: can python import class or module directly from a zip package

2009-03-11 Thread Lorenzo
On Mar 10, 2:13 pm, Flank wrote: > can python import class or  module directly from  a zip package ,just > like jave does from jar package without extracting the class file into > directory > > so far as i know ,python module should be unzip to file system in > order to use them, After a little d

Re: Is python worth learning as a second language?

2009-03-11 Thread ZikO
Well What Can I say guys? I really appreciate your help here. Thanks for your answers. I have read all of them :P. Yes. Thanks for the websites: Dive In Python and docs.python.org. And I most say I have been convinced to take it as another tool for the programmer. PS. Tomasz, thanks for pl.

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 6:41 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 5:19 pm, Tim Golden wrote: > >>> Here is my code snippet which you will be interested in: > >> Indeed. > > >>> file = ur'\\?\C:\\TestDataSet\DeepPaths > >>> \DeepPathLevel01\DeepPathLevel02\DeepPathLevel03\DeepP

Re: can python import class or module directly from a zip package

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 11:47:54 -0200, Lorenzo escribió: On Mar 10, 2:13 pm, Flank wrote: can python import class or  module directly from  a zip package ,just like jave does from jar package without extracting the class file into directory so far as i know ,python module should be unzip to fi

Behaviour of os.rename()

2009-03-11 Thread venutaurus...@gmail.com
Hello all, I got a suspicion on the behaviour of os.rename (src,dst).If the src is the path of a file and dst is a new filename this os.rename() function is infact creating a new file with the dst name in the current working directory and leaving the src as it is. Is this the expected b

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C:\\TestDataSet\DeepPaths \DeepPathLevel01\DeepPathLevel02\DeepPathLevel0

Re: Behaviour of os.rename()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: Hello all, I got a suspicion on the behaviour of os.rename (src,dst).If the src is the path of a file and dst is a new filename this os.rename() function is infact creating a new file with the dst name in the current working directory and leaving the src

Re: Problem with os.chdir()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 7:17 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > On Mar 11, 6:41 pm, Tim Golden wrote: > >> venutaurus...@gmail.com wrote: > >>> On Mar 11, 5:19 pm, Tim Golden wrote: > > Here is my code snippet which you will be interested in: > Indeed. > > file = ur'\\?\C

Re: Behaviour of os.rename()

2009-03-11 Thread Emile van Sebille
venutaurus...@gmail.com wrote: Hello all, I got a suspicion on the behaviour of os.rename (src,dst).If the src is the path of a file and dst is a new filename this os.rename() function is infact creating a new file with the dst name in the current working directory and leaving the src

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
venutaurus...@gmail.com wrote: On Mar 11, 7:17 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: On Mar 11, 5:19 pm, Tim Golden wrote: Here is my code snippet which you will be interested in: Indeed. file = ur'\\?\C

Re: Problem with os.chdir()

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 11:59:57 -0200, venutaurus...@gmail.com escribió: On Mar 11, 6:41 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: > On Mar 11, 5:19 pm, Tim Golden wrote: Well, the source for os.chdir under Windows uses the Win32 SetCurrentDirectoryW API as expected. What is not exp

Re: Behaviour of os.rename()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 7:20 pm, Tim Golden wrote: > venutaurus...@gmail.com wrote: > > Hello all, > >             I got a suspicion on the behaviour of os.rename > > (src,dst).If the src is the path of a file and dst is a new filename > > this os.rename() function is infact creating a new file with the dst >

Re: Behaviour of os.rename()

2009-03-11 Thread venutaurus...@gmail.com
On Mar 11, 7:27 pm, Emile van Sebille wrote: > venutaurus...@gmail.com wrote: > > Hello all, > >             I got a suspicion on the behaviour of os.rename > > (src,dst).If the src is the path of a file and dst is a new filename > > this os.rename() function is infact creating a new file with the

strange problem with Py2exe

2009-03-11 Thread sf409777
Hello all, in the past I've used Py2exe without any problem, but now I have this strange difficulty. In my computer I have python 2.6, py2exe for python 2.6 and the distutils, but when I do: from distutils.core import setup import py2exe setup(console=['hello.py']) ( like written in: http://w

functions - where to store them

2009-03-11 Thread plsullivan1
I have several functions which I would like to store in a different directory so several programs can use them. I can't seem to find much information about how to call a function if the function code is not actually in the script itself. The problem: do I have to cut and paste functions into a scri

Re: Set & Frozenset?

2009-03-11 Thread Lie Ryan
R. David Murray wrote: Lie Ryan wrote: Matt Nordhoff wrote: Alan G Isaac wrote: Hans Larsen schrieb: How could I "take" an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_s

Re: functions - where to store them

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 12:46:05 -0200, escribió: I have several functions which I would like to store in a different directory so several programs can use them. I can't seem to find much information about how to call a function if the function code is not actually in the script itself. The problem

Re: functions - where to store them

2009-03-11 Thread Marco Mariani
plsulliv...@gmail.com wrote: I have several functions which I would like to store in a different directory so several programs can use them. I can't seem to find much information about how to call a function if the function code is not actually in the script itself. read the tutorial, look for

Re: functions - where to store them

2009-03-11 Thread plsullivan1
On Mar 11, 10:46 am, plsulliv...@gmail.com wrote: > I have several functions which I would like to store in a different > directory so several programs can use them. I can't seem to find much > information about how to call a function if the function code is not > actually in the script itself. > T

Re: functions - where to store them

2009-03-11 Thread Lie Ryan
plsulliv...@gmail.com wrote: I have several functions which I would like to store in a different directory so several programs can use them. I can't seem to find much information about how to call a function if the function code is not actually in the script itself. The problem: do I have to cut

UnicodeEncode Error ?

2009-03-11 Thread Rama Vadakattu
While doing the below 1) fetch html page 2) extract title using BeatifulSoup 3) Save into the database. iam getting the below error (at the bottom). Few observations which i had: 1) type of variable which holds this title is 2) iam getting this problem when the title has character wh

Re: UnicodeEncode Error ?

2009-03-11 Thread Lie Ryan
Rama Vadakattu wrote: While doing the below 1) fetch html page 2) extract title using BeatifulSoup 3) Save into the database. iam getting the below error (at the bottom). Few observations which i had: 1) type of variable which holds this title is 2) iam getting this problem when th

Visual Studio 2005 build of Python 2.4, 2.5 or 2.6

2009-03-11 Thread paul.baum...@googlemail.com
Hello, I am a bit lost with all the possible builds of python on Windoze. I am looking for a Visual Studio 2005 build of Python 2.4, 2.5 or 2.6 incl. debug build of the python24.lib e.g. python24_d.lib ? Any hints are appreciated. Paul -- http://mail.python.org/mailman/listinfo/python-list

Read a content file from a P7M

2009-03-11 Thread Luca
Hi all. There is standard or sugested way in python to read the content of a P7M file? I don't need no feature like verify sign, or sign using a certificate. I only need to extract the content file of the p7m (a doc, a pdf, ...) Thanks! -- -- luca -- http://mail.python.org/mailman/listinfo/pyt

Python-URL! - weekly Python news and links (Mar 11)

2009-03-11 Thread Gabriel Genellina
QOTW: "[Perhaps] it sounds [as though] I'm saying that most prospective users of OSS [open-source software] can't even manage to download it. Let me be clear: that is exactly what I am saying." - Patrick McKenzie http://www.kalzumeus.com/2009/03/07/how-to-successfully-compete-with-open-sourc

Re: Problem with os.chdir()

2009-03-11 Thread Hendrik van Rooyen
"Tim Golden" wrote: > Well, a little bit of experimentation shows that you can > *create* paths this deep (say, with os.mkdir). But you > can't actually set the current directory to it. So the Is this also true if you try to go there by a succession of shorter hops of the ./next_level kind? - H

calling class methods from class methods, help?

2009-03-11 Thread Oltmans
I've a multithreaded program in which I've to call class methods from class methods. Here is how my code look like (excluding imports),. Any help is highly appreciated. #!/usr/bin/env python class Requests(Thread): def __init__(self, times): Thread.__init__(self) self.times=ti

Re: Problem with os.chdir()

2009-03-11 Thread Tim Golden
Hendrik van Rooyen wrote: "Tim Golden" wrote: Well, a little bit of experimentation shows that you can *create* paths this deep (say, with os.mkdir). But you can't actually set the current directory to it. So the Is this also true if you try to go there by a succession of shorter hops of the

Re: calling class methods from class methods, help?

2009-03-11 Thread Oltmans
On Mar 11, 10:08 pm, Oltmans wrote: >                 self.html=SendRequest() # This line throws an error and error says NameError: global name '_Requests_SendRequest' is not defined. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with string format

2009-03-11 Thread Terry Reedy
Mike314 wrote: Hello, I have a strange problem with the string format: '%s %s %s %s %s' % ['01', '02', '03', '04', '05'] Traceback (most recent call last): File "", line 1, in TypeError: not enough arguments for format string But as soon I use tuple it is working: '%s %s %s %s %s' % (

Re: No module named _sqlite3

2009-03-11 Thread gert
On Mar 9, 8:31 pm, gert wrote: > Testing 3.1 i get this with 3.0 it works > > python/lib/python3.1/sqlite3/dbapi2.py", line 27, in , > ImportError:No module named _sqlite3, never mind had some include problems during compiling, nothing to do with 3.1 -- http://mail.python.org/mailman/listinfo/pyt

Re: calling class methods from class methods, help?

2009-03-11 Thread MRAB
Oltmans wrote: I've a multithreaded program in which I've to call class methods from class methods. Here is how my code look like (excluding imports),. Any help is highly appreciated. #!/usr/bin/env python class Requests(Thread): def __init__(self, times): Thread.__init__(self)

Re: calling class methods from class methods, help?

2009-03-11 Thread Chris Rebert
On Wed, Mar 11, 2009 at 10:08 AM, Oltmans wrote: > I've a multithreaded program in which I've to call class methods from > class methods. Um, those are instance methods, not class methods. Class methods take the class itself as an argument (the parameter is typically named "cls" instead of "self"

Re: factory functions & methods

2009-03-11 Thread Piet van Oostrum
> Aaron Brady (AB) wrote: >AB> Hello, >AB> I am creating a container. I have some types which are built to be >AB> members of the container. The members need to know which container >AB> they are in, as they call methods on it, such as finding other >AB> members. I want help with the synta

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread Falcolas
On Mar 10, 7:19 pm, David George wrote: > So, my question is, is there any way to stop a SocketServer that's been > told to server forever in python 2.5? serve_forever, in python 2.5, is simply coded as: while 1: self.handle_request() So, instead of calling serve_forever, call handle_reques

Re: calling class methods from class methods, help?

2009-03-11 Thread Piet van Oostrum
> Oltmans (O) escribió: >O> I've a multithreaded program in which I've to call class methods from >O> class methods. Here is how my code look like (excluding imports),. Any >O> help is highly appreciated. >O> #!/usr/bin/env python >O> class Requests(Thread): >O> def __init__(self, times

Re: Visual Studio 2005 build of Python 2.4, 2.5 or 2.6

2009-03-11 Thread Martin v. Löwis
> I am a bit lost with all the possible builds of python on Windoze. I > am looking for a Visual Studio 2005 build of Python 2.4, 2.5 or 2.6 > incl. debug build of the python24.lib e.g. python24_d.lib ? What's the problem with creating one yourself? Regards, Martin -- http://mail.python.org/mailm

Re: "Battleship" style game

2009-03-11 Thread Shawn Milochik
Thanks for the tips, everybody. I've cleaned it up, and learned some useful things from your comments and the reading they led to. http://shawnmilo.com/ships/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with os.chdir()

2009-03-11 Thread van Asselt
Hello, In order to prevent this type of problems, I alway do the following: import path path = something path = os.path.normpath(path) os.chdir(path) This prevents a lot of problems for me. Regards, Henk "Tim Golden" wrote in message news:mailman.1646.1236751732.11746.python-l...@python.org

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread David George
On 2009-03-11 04:36:29 +, "Mark Tolonen" said: "David George" wrote in message news:00150e67$0$27956$c3e8...@news.astraweb.com... Hi guys, I've been developing some code for a university project using Python. We've been working on an existing codebase, cleaning it up and removing dea

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread Falcolas
On Mar 11, 12:28 pm, David George wrote: > On 2009-03-11 04:36:29 +, "Mark Tolonen" said: > > > > > > > "David George" wrote in message > >news:00150e67$0$27956$c3e8...@news.astraweb.com... > >> Hi guys, > > >> I've been developing some code for a university project using Python. > >> We've b

Re: calling class methods from class methods, help?

2009-03-11 Thread Oltmans
On Mar 11, 11:00 pm, Piet van Oostrum wrote: >                     self.html=self.SendRequest() > -- Thank you, everyone, for the help. Appreciate that. > Piet van Oostrum > URL:http://pietvanoostrum.com[PGP 8DAE142BE17999C4] > Private email: p...@vanoostrum.org- Hide quoted text - > > - Show q

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread David George
On 2009-03-11 19:02:26 +, Falcolas said: On Mar 11, 12:28 pm, David George wrote: On 2009-03-11 04:36:29 +, "Mark Tolonen" s aid: "David George" wrote in message news:00150e67$0$27956$c3e8...@news.astraweb.com... Hi guys, I've been developing some code for a university pr

Re: functions - where to store them

2009-03-11 Thread Terry Reedy
plsulliv...@gmail.com wrote: I have several functions which I would like to store in a different directory so several programs can use them. I can't seem to find much information about how to call a function if the function code is not actually in the script itself. The problem: do I have to cut

Re: Visual Studio 2005 build of Python 2.4, 2.5 or 2.6

2009-03-11 Thread Terry Reedy
paul.baum...@googlemail.com wrote: Hello, I am a bit lost with all the possible builds of python on Windoze. I am looking for a Visual Studio 2005 build of Python 2.4, 2.5 or 2.6 incl. debug build of the python24.lib e.g. python24_d.lib ? Are you looking for pre-built binaries or the build fil

Re: calling class methods from class methods, help?

2009-03-11 Thread Terry Reedy
Oltmans wrote: I've a multithreaded program in which I've to call class methods from class methods. Here is how my code look like (excluding imports),. Any help is highly appreciated. #!/usr/bin/env python class Requests(Thread): def __init__(self, times): Thread.__init__(self)

Re: Visual Studio 2005 build of Python 2.4, 2.5 or 2.6

2009-03-11 Thread Christian Heimes
Terry Reedy wrote: > Are you looking for pre-built binaries or the build files to make your > own? PSF distributes 2.? to 2.5 binaries built with VS2003 and 2.6+ > binaries built with VS2008 (I believe) and the corresponding build > files. People have built with VS2005, but you will have to sear

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread Craig Allen
On Mar 10, 1:39 pm, Paul Rubin wrote: > Craig Allen writes: > > it raises an interesting question about why doesn't it.  I can think > > of practical answers to that, obviously, but in principle, if a > > function compiles to exactly the same byte code, you obviously

Re: strange problem with Py2exe

2009-03-11 Thread CM
On Mar 11, 10:37 am, sf409...@gmail.com wrote: > Hello all, > in the past I've used Py2exe without any problem, but now I have this > strange difficulty. > In my computer I have  python 2.6,  py2exe for python 2.6 and the > distutils, but when I do: > > from distutils.core import setup > import py2

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread r
On Mar 11, 3:40 pm, Craig Allen wrote: > On Mar 10, 1:39 pm, Paul Rubin wrote: > > > Craig Allen writes: > > > it raises an interesting question about why doesn't it.  I can think > > > of practical answers to that, obviously, but in principle, if a > > > function c

Re: strange problem with Py2exe

2009-03-11 Thread Mike Driscoll
On Mar 11, 9:37 am, sf409...@gmail.com wrote: > Hello all, > in the past I've used Py2exe without any problem, but now I have this > strange difficulty. > In my computer I have  python 2.6,  py2exe for python 2.6 and the > distutils, but when I do: > > from distutils.core import setup > import py2e

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread Terry Reedy
r wrote: On Mar 11, 3:40 pm, Craig Allen wrote: On Mar 10, 1:39 pm, Paul Rubin wrote: Identical strings don't necessarily have the same id: A more verbose way to put this is "Requesting a string with a value that is the same an an existing string does not n

Re: Why is lambda allowed as a key in a dict?

2009-03-11 Thread r
On Mar 11, 4:32 pm, Terry Reedy wrote: > Similarly, if one is populating a LARGE structure with duplicate values, > it may be worthwhile to cache values that are not cached by the interpreter. Thanks Terry, Actually i had no idea how Python handled strings(immutables) internally but after conside

[ANN] Pyjamas 0.5 Web Widget Set and python-to-javascript Compiler released

2009-03-11 Thread Luke Kenneth Casson Leighton
This is the release of Pyjamas 0.5, a python-to-javascript compiler with an AJAX Web Widget set, for creating python desktop-like applications that run in all major web browsers. http://pyjs.org Pyjamas is NOT "another AJAX framework" where the widgets are predefined, fixed and inflexible. Thank

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread Falcolas
On Mar 11, 1:11 pm, David George wrote: > Again, problem here is the issue of being unable to kill the server > while it's waiting on a request. In theory, i could force it to > continue by sending some sort of junk data with the method i use to > stop the server, but that seems a bit hacky, don't

An error in threading.py?

2009-03-11 Thread Oltmans
Hi, all. I'm trying to use Mechanize in a multithreaded program-- purpose of which is to fill out a form on a website using concurrent threads. Guys, trust me I've spent a lot of time to figure out the problem but I'm completed puzzled. Firstly, I've listed the errors and then the program listing (

Re: An error in threading.py?

2009-03-11 Thread Robert Kern
On 2009-03-11 17:15, Oltmans wrote: Hi, all. I'm trying to use Mechanize in a multithreaded program-- purpose of which is to fill out a form on a website using concurrent threads. Guys, trust me I've spent a lot of time to figure out the problem but I'm completed puzzled. Firstly, I've listed the

Re: An error in threading.py?

2009-03-11 Thread Falcolas
On Mar 11, 4:15 pm, Oltmans wrote: > Hi, all. I'm trying to use Mechanize in a multithreaded program-- > purpose of which is to fill out a form on a website using concurrent > threads. Guys, trust me I've spent a lot of time to figure out the > problem but I'm completed puzzled. Firstly, I've list

Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread scoop
I know I could just try to install it and see, but I've got my configuration just right, so I don't want to mess it up (maybe) with IPython. Also, can someone please point me to some page where I can find differences between C and I Python. I'm learning Python using "Learning python" (figures :),

Re: Behaviour of os.rename()

2009-03-11 Thread Rhodri James
On Wed, 11 Mar 2009 14:35:01 -, venutaurus...@gmail.com wrote: On Mar 11, 7:20 pm, Tim Golden wrote: venutaurus...@gmail.com wrote: > Hello all, >             I got a suspicion on the behaviour of os.rename > (src,dst).If the src is the path of a file and dst is a new filename > this os

Re: Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread Chris Rebert
On Wed, Mar 11, 2009 at 4:17 PM, scoop wrote: > I know I could just try to install it and see, but I've got my > configuration just right, so I don't want to mess it up (maybe) with > IPython. > > Also, can someone please point me to some page where I can find > differences between C and I Python.

Re: Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread John Machin
On Mar 12, 10:17 am, scoop wrote: > I know I could just try to install it and see, but I've got my > configuration just right, so I don't want to mess it up (maybe) with > IPython. > > Also, can someone please point me to some page where I can find > differences between C and I Python. I'm learnin

Re: factory functions & methods

2009-03-11 Thread Aaron Brady
On Mar 11, 12:52 pm, Piet van Oostrum wrote: > > Aaron Brady (AB) wrote: > >AB> Hello, > >AB> I am creating a container.  I have some types which are built to be > >AB> members of the container.  The members need to know which container > >AB> they are in, as they call methods on it, such as

Question on periods in strings

2009-03-11 Thread Philip Bloom
Hello, this is my first time posting to the list, but my curiosity here is great. I was randomly toying with file writes and I ran into something that seemed quite odd to me. When a period is in a string, file write takes about double the time. I saw similar things with newlines, but I figured t

Re: Strange array.array performance

2009-03-11 Thread Aahz
In article , Maxim Khitrov wrote: > >Interesting, though I'm not able to replicate that last outcome. The >string method is still the fastest on my machine. Furthermore, it >looks like the order in which you do the multiplication also matters - >(8 * size * '\0') is faster than ('\0' * 8 * size).

Re: Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread scoop
On Wed, 11 Mar 2009 17:20:09 -0700 (PDT), John Machin wrote: >Do you mean this IPython: >http://en.wikipedia.org/wiki/IPython >or do you mean Iron Python: >http://en.wikipedia.org/wiki/IronPython > >IPython is a front-end for the CPython interpretor, as is IDLE, etc. >"differences", "switch to"

Minimilistic Python on Linux?

2009-03-11 Thread Royce Wilson
I'm working on a minimilistic linux project and would like to include Python. However, since Python is around 17MB (compressed) and previous releases of this linux distro are under 100MB (compressed) standard Python releases are much to large. I just need the runtime libs of Python, the absoulute

Re: Question on periods in strings

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 22:35:22 -0200, Philip Bloom escribió: Hello, this is my first time posting to the list, but my curiosity here is great. Welcome! I was randomly toying with file writes and I ran into something that seemed quite odd to me. When a period is in a string, file write take

RE: Question on periods in strings

2009-03-11 Thread Philip Bloom
Thanks for the welcome :) You're right. Here's with the missed line (I was cutting out commented parts). Hopefully these are all cut/paste-able. #test A #runs in 5.8 seconds. from datetime import datetime testvar2='9a00' startTime = datetime.now() filehandle=open('testwriting.txt','w') for var

Re: Minimilistic Python on Linux?

2009-03-11 Thread Christian Heimes
Royce Wilson schrieb: > I'm working on a minimilistic linux project and would like to include > Python. However, since Python is around 17MB (compressed) and previous > releases of this linux distro are under 100MB (compressed) standard Python > releases are much to large. I just need the runtime

Re: Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread John Machin
On Mar 12, 11:57 am, scoop wrote: > On Wed, 11 Mar 2009 17:20:09 -0700 (PDT), John Machin > > > > wrote: > >Do you mean this IPython: > >http://en.wikipedia.org/wiki/IPython > >or do you mean Iron Python: > >http://en.wikipedia.org/wiki/IronPython > > >IPython is a front-end for the CPython inter

Re: Minimilistic Python on Linux?

2009-03-11 Thread Gabriel Genellina
En Wed, 11 Mar 2009 23:09:51 -0200, Royce Wilson escribió: I'm working on a minimilistic linux project and would like to include Python. However, since Python is around 17MB (compressed) and previous releases of this linux distro are under 100MB (compressed) standard Python releases are m

Re: Minimilistic Python on Linux?

2009-03-11 Thread Royce Wilson
On Wed, Mar 11, 2009 at 9:33 PM, Royce Wilson wrote: > Thanks for the quick responses. When I view sys.modules I get this: > > sre_compile _collections locale _sre functools encodings site operator io > __main__ copyreg _weakref abc builtins encodings.cp437 errno sre_constants > re encodings.lat

What happened to NASA at Python? :(

2009-03-11 Thread r
The Python home page no longer sports a promotion from NASA. What happened, did we lose NASA. Where did they go? -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to NASA at Python? :(

2009-03-11 Thread Benjamin Peterson
r gmail.com> writes: > > The Python home page no longer sports a promotion from NASA. What > happened, did we lose NASA. Where did they go? The python.org guys just decided it would be nice to have some different graphics. -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to NASA at Python? :(

2009-03-11 Thread skip
>> The Python home page no longer sports a promotion from NASA. What >> happened, did we lose NASA. Where did they go? > The python.org guys just decided it would be nice to have some > different graphics. In fact, graphics were added for several organizations. I believe they will be chosen ran

Re: Minimilistic Python on Linux?

2009-03-11 Thread Gabriel Genellina
En Thu, 12 Mar 2009 00:41:18 -0200, Royce Wilson escribió: On Wed, Mar 11, 2009 at 9:33 PM, Royce Wilson wrote: Thanks for the quick responses. When I view sys.modules I get this: sre_compile _collections locale _sre functools encodings site operator io __main__ copyreg _weakref abc buil

Re: What happened to NASA at Python? :(

2009-03-11 Thread r
On Mar 11, 10:09 pm, s...@pobox.com wrote: > In fact, graphics were added for several organizations.  I believe they will > be chosen randomly.  NASA is still there. > > --http://mail.python.org/mailman/listinfo/python-list Whew! Thats good news, i thought we had lost their support. -- http://mail

Re: What happened to NASA at Python? :(

2009-03-11 Thread Mensanator
On Mar 11, 9:55�pm, Benjamin Peterson wrote: > r gmail.com> writes: > > > > > The Python home page no longer sports a promotion from NASA. What > > happened, did we lose NASA. Where did they go? > > The python.org guys just decided it would be nice to have some > different graphics. If they were

nohup and os.system

2009-03-11 Thread Gideon
I've got a python script, batch.py that, amongst other things, executes commands: os.system('cmd1') os.system('cmd2') now, these programs output certain information at the command line, and if i execute ./batch.py it shows up as I would expect. However, if i run nohup ./batch.py & then while

  1   2   >