Re: My python annoyances so far

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Steven Howe wrote: > And before someone get's all technical, I know everything in Python is > an 'object' even None, which implies class, or is it the other way around? Objects don't imply classes. There are object oriented languages without classes like the Io language.

regex question

2007-04-26 Thread proctor
hello, i have a regex: rx_test = re.compile('/x([^x])*x/') which is part of this test program: import re rx_test = re.compile('/x([^x])*x/') s = '/xabcx/' if rx_test.findall(s): print rx_test.findall(s) i expect the output to be ['abc'] however it gives m

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
Michele Simionato wrote: > I don't see the problem. In my view EuroPython is the big event in > Europe. If you can > go to only one conference and you have the possibility to travel to > Vilnius, then go to EuroPython. > The national conferences are of interest primarily for people of that > nati

Re: Socket exceptions aren't in the standard exception hierarchy (M2Crypto issue)

2007-04-26 Thread John Nagle
On a related note, M2Crypto's exceptions are direct children of Exception. If we add NetworkError, there will be a better place to put them. Currently, you have to catch, at least, M2Crypto.SSL.Checker.SSLVerificationError M2Crypto.SSL.SSLError both of which can

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
Alex Martelli wrote: > I like the kudos, thanks!, but I'm not quite sure what you're saying > about my travel plans... just to clarify, once again I'll have to miss > EuroPython _and_ PythonUK, two events I attended most assiduously when I > was living in Europe (but then, for two years running I'v

Re: pyqt4 signal/slot using PyObject* and shortcut

2007-04-26 Thread Pradnyesh Sawant
On 4/27/07, Pradnyesh Sawant wrote: > Hello, i have the following code: > # > import time > import sys > from PyQt4 import QtGui, QtCore > > class Counter(QtCore.QThread): > def __init__(self): > QtCore.QThread.__init__(sel

Re: webbrowser.open works in IDLE and cmd shell but not from cygwin prompt

2007-04-26 Thread Paddy
On Apr 27, 5:09 am, Gregory Bloom <[EMAIL PROTECTED]> wrote: > I'm running Python 2.5 under Windows. If I fire up IDLE and enter: > > >>> import webbrowser > >>> url = 'http://www.python.org' > >>> webbrowser.open_new(url) > > it works like a champ, opening the page in Firefox. Same thing goes >

pyqt4 signal/slot using PyObject* and shortcut

2007-04-26 Thread Pradnyesh Sawant
Hello, i have the following code: # import time import sys from PyQt4 import QtGui, QtCore class Counter(QtCore.QThread): def __init__(self): QtCore.QThread.__init__(self) def run(self): cntr = 0 while

Re: Generalized range

2007-04-26 Thread Alex Martelli
Michael Hoffman <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Thanks - you have covered a fair bit of gorund here - I will modify > > myRange taking your suggestions into account. The one suggestion that > > I'm going to have to think through is repeatedly incrementing res. > > > > I

Re: Command-line option equiv of PYTHONPATH

2007-04-26 Thread Martin v. Löwis
> The '-I' option adds the path to the list of directories that > contains modules that can be included in a script. I can use it as "#!/ > usr/bin/perl -I" thereby not asking the user of > the script to set the in their environment. > > Is there any equivalent command-line option to the python b

Re: Support for new items in set type

2007-04-26 Thread Raymond Hettinger
[Alex Martelli] > In your shoes, I would write a class whose instances hold three sets: > -- the "master set" is what you originally read from the file > -- the "added set" is the set of things you've added since then > -- the "deleted set" is the set of things you've deleted since them FWIW, I've

Re: Command-line option equiv of PYTHONPATH

2007-04-26 Thread James Stroud
Rajesh wrote: > Hi, > > The '-I' option adds the path to the list of directories that > contains modules that can be included in a script. I can use it as "#!/ > usr/bin/perl -I" thereby not asking the user of > the script to set the in their environment. > > Is there any equivalent command-line

Re: Python keywords

2007-04-26 Thread Alex Martelli
gtb <[EMAIL PROTECTED]> wrote: > Have done some searching but have not found a place where I can look > up python keywords. >>> import keyword >>> keyword.kwlist ['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global

Re: EuroPython vs PyconUK

2007-04-26 Thread Alex Martelli
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > Alex Martelli, brilliant speaker and Python evangelist (in my Shu Ha > eyes anyway), lives in the States and is Italian. Busy as you'd expect > from someone working for Google, decides to make the trip to Europe for > a Python related conference,

Re: mysql "rows affected"

2007-04-26 Thread Carl K
John Nagle wrote: > Carl K wrote: >> using MySQLdb, I do cursor.execute("update...") >> >> How can I tell how many rows were affected ? >> >> Carl K > > cursor = db.cursor() # get cursor > cursor.execute(sqlstatement, argtuple) # do command > rowsaffected = cursor.ro

Command-line option equiv of PYTHONPATH

2007-04-26 Thread Rajesh
Hi, The '-I' option adds the path to the list of directories that contains modules that can be included in a script. I can use it as "#!/ usr/bin/perl -I" thereby not asking the user of the script to set the in their environment. Is there any equivalent command-line option to the python binary o

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 19:36:09 -0700, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... >> detail you shouldn't care about. Functions that cache the result of long >> time-consuming complications are _good_. > > Not necessarily -- Absolutely -- I didn't mean to imply that

Re: EuroPython vs PyconUK

2007-04-26 Thread Michele Simionato
On Apr 26, 6:34 pm, EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > I do realize that the UK is not really part of Europe (no polemic :P) > but I am nevertheless curious about the logic behind creating another > major Python event in Europe. Wasn't EuroPython enough? > > Like many I am sure, I pr

Re: Problem with Matplotlib and the Tk-Backend

2007-04-26 Thread James Stroud
thorstenkranz wrote: > Hi everyone, > > I'm new here and I have a question ( I guess as everybody who is new > here ;-) ), > > I'm having some strange problem with Matplotlib, using it in a Tkinter > application. > > I create a Canvas, a figure, subplot and then a toolbar. It works > fine, but

Re: How to find complementary colour for pixel

2007-04-26 Thread James Stroud
Johny wrote: > I use PIL to write some text to a picture.The text must be seen wery > clearly. > I write the text to different pictures but to the same position. As > pictures maybe different, colour, in the position where I write the > text, is also different. > Is there a way how to set the f

webbrowser.open works in IDLE and cmd shell but not from cygwin prompt

2007-04-26 Thread Gregory Bloom
I'm running Python 2.5 under Windows. If I fire up IDLE and enter: >>> import webbrowser >>> url = 'http://www.python.org' >>> webbrowser.open_new(url) it works like a champ, opening the page in Firefox. Same thing goes from a Windows cmd shell: it works as advertised. But if I open a cygwin b

Re: File not read to end

2007-04-26 Thread bruce peng
"rb",,please <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I'm trying to write a simple log parsing program. I noticed that it > isn't reading my log file to the end. > > My log is around 200,000 lines but it is stopping at line 26,428.

Re: My python annoyances so far

2007-04-26 Thread 7stud
On Apr 26, 9:08 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > 7stud wrote: > > [EMAIL PROTECTED] wrote: > >> Annoyances: > > > Every language has annoyances. Python is no exception. Post away. > > Anyone that is offended can go drink a Guinness. > > I find Guinness annoying. > -- > Michael Hof

Re: My python annoyances so far

2007-04-26 Thread John Nagle
Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... > >>detail you shouldn't care about. Functions that cache the result of long >>time-consuming complications are _good_. > > > Not necessarily -- > > asse

Re: I25 barcode generator?

2007-04-26 Thread Carsten Haese
On Thu, 26 Apr 2007 22:12:54 -0400, I wrote > On Thu, 26 Apr 2007 18:39:23 -0300, Gerardo Herzig wrote > > Hi. Im looking for an I25 barcode generator.[...] > > [...]it shouldn't be too hard to make one. > And it wasn't: def i25(x): """i25(x) -> string Encode string of digits into I25 ba

Re: My python annoyances so far

2007-04-26 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > detail you shouldn't care about. Functions that cache the result of long > time-consuming complications are _good_. Not necessarily -- asserts the exactly opposite principle, "Do

Re: If Dict Contains a particular key

2007-04-26 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > > > > if 'a' in thedict: ... > > > if thedict.has_key('a'): ... > > Why consume twice as much time with no advantages whatever?! > > Did I wander into comp.lang.perl by mistake? Of course not -- note that the faster, modern idiom is

Re: I25 barcode generator?

2007-04-26 Thread Carsten Haese
On Thu, 26 Apr 2007 18:39:23 -0300, Gerardo Herzig wrote > Hi. Im looking for an I25 barcode generator. I found a couple of > nice EAN barcode generators, but this application needs an I25 > barcode. Since this will be an web application, i need to do it in > the server side. In python, off cour

Re: mysql "rows affected"

2007-04-26 Thread John Nagle
Carl K wrote: > using MySQLdb, I do cursor.execute("update...") > > How can I tell how many rows were affected ? > > Carl K cursor = db.cursor() # get cursor cursor.execute(sqlstatement, argtuple) # do command rowsaffected = cursor.r

Re: Dedicated CPU core for Python?

2007-04-26 Thread Louise Hoffman
> Are you talking about CPU affinity > (http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that can > directory execute Python byte code? If the former, CPython only uses one > CPU core right now because it's threads are all internal, and do not spawn > system threads (IIRC). If th

Re: Correct behavior?

2007-04-26 Thread DanBishop04
On Apr 26, 8:34 pm, asker <[EMAIL PROTECTED]> wrote: > Hello: > I have next Python 2.5.1 instructions: > > >>> a=12.34 > >>> b=11.23 > >>> print a+b > > 23.57 > > >>> print "%15.2f" % (a+b) > > 23.57 > > But:>>> print "%15.2f" % a+b > > Traceback (most recent call last): > File "", line

Correct behavior?

2007-04-26 Thread asker
Hello: I have next Python 2.5.1 instructions: >>> a=12.34 >>> b=11.23 >>> print a+b 23.57 >>> print "%15.2f" % (a+b) 23.57 But: >>> print "%15.2f" % a+b Traceback (most recent call last): File "", line 1, in TypeError: cannot concatenate 'str' and 'float' objects Is this correct fo

Re: Atribute error

2007-04-26 Thread gtb
Thanks for posting. CompactTest is a class provided by MaxQ and inheritance generally works as the files below worked OK. I was trying to re-arrange things as newLogin() should be just one of many functions called by Test1. The way the inheritance is setup below seems like the tail wagging the dog

Re: My python annoyances so far

2007-04-26 Thread James Stroud
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > >> Hi all. I'm learning python these days. I'm going to use this thread >> to post, from time to time, my annoyances with python. I hope someone >> will clarify things to me where I have misunderstood them. >> >> Annoyances: >> 2. There are modules,

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Pradnyesh Sawant
> In the first version it didn't. In the second version it did. in my case, it didn't in the second version either??? > The version of PyQt? The version of SIP? The version of Qt? python2.4: 2.4.4~c1-0ubuntu1 pyqt4: 4.0.1-1ubuntu1 python-sip4: 4.4.5-2ubuntu1 qt4:

Re: Python un-plugging the Interpreter

2007-04-26 Thread cfbolz
On 25 Apr., 16:09, Steve Holden <[EMAIL PROTECTED]> wrote: > > Python as a language is in good shape. But the CPython > > implementation is holding back progress. What we need are better > > and faster implementations of the language we've got. > > Hear, hear! > > > PyPy, ShedSkin, and

Re: mysql "rows affected"

2007-04-26 Thread Ian Clark
Both cursor.execute() and cursor.executemany() return the number of rows affected. Here is a link to the documentation: http://mysql-python.sourceforge.net/MySQLdb-1.2.2/public/MySQLdb.cursors.BaseCursor-class.html#execute Ian On 4/26/07, Carl K <[EMAIL PROTECTED]> wrote: using MySQLdb, I do

Re: Python CGI and Browser timeout

2007-04-26 Thread skulka3
Thanks for the response. To further clarify the details: I am printing the empty strings in a for loop. So the processing happens in a loop when all the results from the query have been already retrieved and each record is now being processed inside the loop. I also update the display periodical

mysql "rows affected"

2007-04-26 Thread Carl K
using MySQLdb, I do cursor.execute("update...") How can I tell how many rows were affected ? Carl K -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 10:45:22 -0700, Steven Howe wrote: > [EMAIL PROTECTED] wrote: >>> Well, why do some things in the library have to be functions, and >>> other things have to be class methods? >>> > Perhaps because some things are more naturally function like? For > 'instance' (pardon the

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
Fuzzyman wrote: > I assume you have the same problem with the Italian one? Not so much because the official language of Pycon Uno Italy is Italian so I don't feel too concerned (unfortunately my Italian is not quite good enough). > Seriously though, it is *great* to see the UK Python scene flou

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 09:07:03 -0700, flifus wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. Perhaps you should read about the Kingdom of Nouns:

Re: If Dict Contains a particular key

2007-04-26 Thread [EMAIL PROTECTED]
On Apr 26, 12:47 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >... > > > > if 'a' in thedict: > > > ... > > > > There's no need for the call to keys(). > > > Why not > > > if thedict.has_key('a'): > > pass > > elde: > > pass

statistical functions for Date/Time data series

2007-04-26 Thread John Henry
I am looking for a simple Python function for handling a set of time series data. For instance, I might have the following raw data (year's worth): 1/1/200512:00 AM11.24 1/1/200512:10 AM12.31 1/1/200512:20 AM12.06 1/1/200512:30 AM11.

Re: Python CGI and Browser timeout

2007-04-26 Thread Sebastian Bassi
On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is there a better solution to avoid browser timeouts? Raising timeout in Apache, by default is 300 seconds. Limiting jobs size (both in the html form and from script size since you should not trust on client validations)

Re: EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
Steve Holden wrote: > So by this reasoning there should have been no "Python UK" conference > for the last four years (in case you didn't know it ran as a track of > the C/C++ conference, but ths track has now broadened to include all > scripting languages). And what about the people who can't

Re: Python CGI and Browser timeout

2007-04-26 Thread Sebastian Bassi
On 26 Apr 2007 14:48:29 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In order to work around this problem, I started printing empty strings > (i.e. print "") so that the browser does not timeout. How do you print something while doing the query and waiting for the results? I saw some page

Re: Feedback on Until recipe

2007-04-26 Thread MRAB
On Apr 26, 11:58 am, Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-04-24, Thomas Nelson <[EMAIL PROTECTED]> wrote: > > > Occasionally someone posts to this group complaining about the lack of > > "repeat ... until" in python. I too have occasionally wished for such > > a construct, and after

Re: Python CGI and Browser timeout

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 18:48:29 -0300, <[EMAIL PROTECTED]> escribió: > I am creating a simple cgi script which needs to retrieve and process > a huge number of records from the database (more than 11,000) and > write the results to a file on disk and display some results when > processing is complet

Re: Atribute error

2007-04-26 Thread Bjoern Schliessmann
gtb wrote: > In file Test1.py below I get a attribute error on the line > "self.logon()". Seems like the class doesn't have this attribute. > It worked earlier when Test1 was derived from > class newLogon but that does not seem logical to me. What's the definition of CompactTest? Regards,

I25 barcode generator?

2007-04-26 Thread Gerardo Herzig
Hi. Im looking for an I25 barcode generator. I found a couple of nice EAN barcode generators, but this application needs an I25 barcode. Since this will be an web application, i need to do it in the server side. In python, off course :) Anybody knows one? Thanks! Gerardo -- http://mail.python

Re: Python keywords

2007-04-26 Thread gtb
On Apr 26, 1:59 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] > [mailto:python- > > [EMAIL PROTECTED] On Behalf Of gtb > > Sent: Thursday, April 26, 2007 1:50 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Python keywords > > > On Apr

Re: Dedicated CPU core for Python?

2007-04-26 Thread Gabriel Genellina
En Thu, 26 Apr 2007 15:54:38 -0300, Joshua J. Kugler <[EMAIL PROTECTED]> escribió: > Are you talking about CPU affinity > (http://en.wikipedia.org/wiki/Processor_affinity) or an actual CPU that > can directory execute Python byte code? If the former, CPython only > uses one > CPU core right

Re: My python annoyances so far

2007-04-26 Thread Paul McGuire
More samples from that thread: fica = Percent(7) fedtax = Percent(15) medicare = Percent(3) deductions = fica + fedtax + medicare gross = 10 net = gross - deductions print net # answer: 75000 wholesale = 10 markup = Percent(35) retail = wholesale + markup print retail # answer: 13.5 yearlyAp

Python CGI and Browser timeout

2007-04-26 Thread skulka3
Hello, I am creating a simple cgi script which needs to retrieve and process a huge number of records from the database (more than 11,000) and write the results to a file on disk and display some results when processing is complete. However, nothing needs to be displayed while the processing is

Re: My python annoyances so far

2007-04-26 Thread Paul McGuire
On Apr 26, 1:22 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On 26 Apr 2007 20:05:45 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > > > > > >On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be func

Re: EuroPython vs PyconUK

2007-04-26 Thread Donald 'Paddy' McCarthy
EuGeNe Van den Bulke wrote: > I do realize that the UK is not really part of Europe (no polemic :P) > but I am nevertheless curious about the logic behind creating another > major Python event in Europe. Wasn't EuroPython enough? > > Like many I am sure, I probably won't be able to attend both (

Re: override settrace

2007-04-26 Thread Raja
On Apr 25, 8:10 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Raja wrote: > > Hi, > > I want to override the sys.settrace() call, create a way to trace > > the execution of a python program. Keep track of all objects created > > and destroyed. Keep track of the call pattern throughout the executi

Re: urlopen

2007-04-26 Thread kyosohma
On Apr 26, 12:39 pm, "Dave Dean" <[EMAIL PROTECTED]> wrote: > Hi all, > I'm running into some trouble using urllib.urlopen to grab a page from our > corporate intranet. The name of the internal site is simplyhttp://web(no > www or com). I can use urlopen to grab a site likehttp://www.google.com

Re: Store variable name in another variable

2007-04-26 Thread Laurent Pointal
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Laurent Pointal <[EMAIL PROTECTED]> wrote: >>loial a �crit : >>> I need to store a list of variable names in a dictionary or list. I >>> then later need to retrieve the names of the variables and get the >>> values from the named variables.

Re: Dedicated CPU core for Python?

2007-04-26 Thread John Nagle
Michael Hoffman wrote: > Louise Hoffman wrote: > >> I was wondering, if Python in the foerseeable future will allocate one >> CPU core just for the interpreter, so heavy Python operations does >> slow down the OS? > > > When running scripts, or loading modules, Python does not really behave > a

Atribute error

2007-04-26 Thread gtb
In file Test1.py below I get a attribute error on the line "self.logon()". It worked earlier when Test1 was derived from class newLogon but that does not seem logical to me. Any suggestions? Thanks, john #~~~ #File Test1.py # Generat

Re: My python annoyances so far

2007-04-26 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Hi. You wrote c++, didn't you? Yes :) But I mostly don't anymore and ported my main project from C++ to Python. > Well, why do some things in the library have to be functions, and > other things have to be class methods? Easy. Some things abstractly operate on all kin

Re: Python keywords

2007-04-26 Thread gtb
Thanks Marc. -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-26 Thread Fuzzyman
On Apr 25, 11:50 pm, [EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the de

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
On Apr 26, 6:07 pm, [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. A good question. Part of the answer might be that their ar

Re: Parsing HTML/XML documents

2007-04-26 Thread Max M
Stefan Behnel skrev: > [EMAIL PROTECTED] wrote: >> I need to parse real world HTML/XML documents and I found two nice python >> solution: BeautifulSoup and Tidy. > > There's also lxml, in case you want a real XML tool. > http://codespeak.net/lxml/ > http://codespeak.net/lxml/dev/parsing.html#parse

Re: EuroPython vs PyconUK

2007-04-26 Thread Fuzzyman
On Apr 26, 5:34 pm, EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > I do realize that the UK is not really part of Europe (no polemic :P) > but I am nevertheless curious about the logic behind creating another > major Python event in Europe. Wasn't EuroPython enough? > > Like many I am sure, I pr

Re: Generalized range

2007-04-26 Thread Michael Hoffman
Michael Hoffman wrote: > How about something like this: > > index = 0 > while res < maximum: > yield minimum + (step * index) > index += 1 Well it really would have to be something LIKE that since I never defined res. Let's try that again: index = 0 res = minimum while res < maximum:

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
On Apr 26, 6:07 pm, [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. A good question. Part of the answer might be that their ar

Re: Generalized range

2007-04-26 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > Thanks - you have covered a fair bit of gorund here - I will modify > myRange taking your suggestions into account. The one suggestion that > I'm going to have to think through is repeatedly incrementing res. > > I deliberately did not use this as repeated addition can c

http pipelining

2007-04-26 Thread swq22
Which python module is capable of pipelining http requests? (I know httplib can send mulitple requests per tcp connection, but in a strictly serial way. ) -- http://mail.python.org/mailman/listinfo/python-list

Re: Generalized range

2007-04-26 Thread tkpmep
Thanks - you have covered a fair bit of gorund here - I will modify myRange taking your suggestions into account. The one suggestion that I'm going to have to think through is repeatedly incrementing res. I deliberately did not use this as repeated addition can cause rounding errors to accumulate,

Re: File not read to end

2007-04-26 Thread andrew . jefferies
On Apr 26, 9:48 am, Facundo Batista <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I've attached the whole script. Thanks again for your help. > > > --Andrew > > Andrew, tip: > > If you attach the whole script, what you get is that a lot of people > goes away from the thread. Me for exam

Re: SPE

2007-04-26 Thread Glich
After posting this message I realized the stupid mistake I had made! But it was too late to change! I think patching it with py2exe would be a good idea. Greetings also, Glich -- http://mail.python.org/mailman/listinfo/python-list

RE: Python keywords

2007-04-26 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of gtb > Sent: Thursday, April 26, 2007 1:50 PM > To: python-list@python.org > Subject: Re: Python keywords > > On Apr 26, 10:16 am, Larry Bates <[EMAIL PROTECTED]> wrote: > > http://docs.python.or

Re: Dedicated CPU core for Python?

2007-04-26 Thread Joshua J. Kugler
On Thursday 26 April 2007 09:16, Louise Hoffman wrote: > Dear readers, > > I was wondering, if Python in the foerseeable future will allocate one > CPU core just for the interpreter, so heavy Python operations does > slow down the OS? > > It seams to me like a perfect use for a CPU core =) Are

Re: Python keywords

2007-04-26 Thread gtb
On Apr 26, 10:16 am, Larry Bates <[EMAIL PROTECTED]> wrote: > gtb wrote: > > Have done some searching but have not found a place where I can look > > up python keywords. I was looking at a script that contained the > > following line: > > > assert self.getResponseCode() in (200, 304, 302) > > > I c

Re: Which are your favorite UML tools?

2007-04-26 Thread hg
Anastasios Hatzis wrote: > Hello, > > I'm working on the light-weight MDA tool pyswarm, > http://pyswarm.sourceforge.net/ (it is about a code-generator for > Python/PostgreSQL-based software. I plan to add support of UML CASE tools > other than the one supported currently. > > I would like to le

Re: wtf

2007-04-26 Thread Shane Hathaway
Sergiy wrote: > print 1 / 2 > print -1 / 2 > > 0 > -1 > > correct? Yes. It works like the floor() function. >>> import math >>> math.floor(1.0 / 2) 0.0 >>> math.floor(-1.0 / 2) -1.0 Shane -- http://mail.python.org/mailman/listinfo/python-list

Re: Dedicated CPU core for Python?

2007-04-26 Thread Michael Hoffman
Louise Hoffman wrote: > I was wondering, if Python in the foerseeable future will allocate one > CPU core just for the interpreter, so heavy Python operations does > slow down the OS? When running scripts, or loading modules, Python does not really behave as an interpreter. Instead it compiles t

Re: wtf

2007-04-26 Thread Jean-Paul Calderone
On Thu, 26 Apr 2007 21:35:03 +0300, Sergiy <[EMAIL PROTECTED]> wrote: >print 1 / 2 >print -1 / 2 > >0 >-1 > >correct? Quoting http://www.python.org/doc/lib/typesnumeric.html: (1) For (plain or long) integer division, the result is an integer. The result is always rounded towards minus infin

wtf

2007-04-26 Thread Sergiy
print 1 / 2 print -1 / 2 0 -1 correct? -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-26 Thread Jean-Paul Calderone
On 26 Apr 2007 20:05:45 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote: >On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: Well, why do some things in the library have to be functions, and other things have to be class methods? >> >> Perhaps because some thi

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Phil Thompson
On Thursday 26 April 2007 6:34 pm, Pradnyesh Sawant wrote: > > > Also, in the modified code, why aint the method setLabel getting > > > called? > > > > Works for me, > > Does the "setLabel" method get called in your case? In your previous > reply, you mentioned that it doesn't. Can you tell me the

Re: My python annoyances so far

2007-04-26 Thread Neil Cerutti
On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >>> Well, why do some things in the library have to be functions, >>> and other things have to be class methods? > > Perhaps because some things are more naturally function like? > For 'instance' (pardon the pun), func

urlopen

2007-04-26 Thread Dave Dean
Hi all, I'm running into some trouble using urllib.urlopen to grab a page from our corporate intranet. The name of the internal site is simply http://web (no www or com). I can use urlopen to grab a site like http://www.google.com just fine. However, when I use urlopen to grab the internal

Re: My python annoyances so far

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, flifus wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. To which class should `sorted()` belong to then? Or the functio

Re: My python annoyances so far

2007-04-26 Thread Steven Howe
[EMAIL PROTECTED] wrote: >> Well, why do some things in the library have to be functions, and >> other things have to be class methods? >> Perhaps because some things are more naturally function like? For 'instance' (pardon the pun), functions shouldn't retain data. They perform an operation

Re: passing tuple with pyqt4 signal/slot mechanism

2007-04-26 Thread Pradnyesh Sawant
> > Also, in the modified code, why aint the method setLabel getting called? > > Works for me, Does the "setLabel" method get called in your case? In your previous reply, you mentioned that it doesn't. Can you tell me the reason why? > and I still don't know what versions you are using and on > whi

Re: EuroPython vs PyconUK

2007-04-26 Thread Steve Holden
Steve Holden wrote: > EuGeNe Van den Bulke wrote: [...] > > Diversity is good, so it isn't one vs. the other. And the UK really *is* > part of Europe (no matter how its politicians behave) :P > > regards > Steve PS: Have you seen the new "[PyCon Uno Italy] Call For Papers" post? I hope you a

problem in running python on winnt

2007-04-26 Thread Ashok
hello, I have built a standalone gui application using py2exe which works fine in my WinXp SP2 machine and another WinXp machine. When i try to run it in a Win NT SP6 machine, I get the following error. Traceback (most recent call last): File "auto.py", line 4, in ? File "zipextimporter.pyo", lin

Dedicated CPU core for Python?

2007-04-26 Thread Louise Hoffman
Dear readers, I was wondering, if Python in the foerseeable future will allocate one CPU core just for the interpreter, so heavy Python operations does slow down the OS? It seams to me like a perfect use for a CPU core =) Lots of love, Louise -- http://mail.python.org/mailman/listinfo/python-l

[PyCon Uno Italy] Call For Papers

2007-04-26 Thread Nicola Larosa
PyCon Uno: Python first Italian conference about Python. Call for Papers === Important dedalines --- * April 30, 2007 Submission of paper and tutorial abstracts. * May 5, 2007 Papers and tutorials admission notification. * June 9, 2007 Submission of pape

Re: EuroPython vs PyconUK

2007-04-26 Thread Steve Holden
EuGeNe Van den Bulke wrote: > I do realize that the UK is not really part of Europe (no polemic :P) > but I am nevertheless curious about the logic behind creating another > major Python event in Europe. Wasn't EuroPython enough? > > Like many I am sure, I probably won't be able to attend both (

http://www.t-mobileapps.com/vs/istream_int2/LinkLibrary/Go.cfm?ID=1809

2007-04-26 Thread SWEETLADYFRMBAMA
Go -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to raw command line?

2007-04-26 Thread Grant Edwards
On 2007-04-26, Donn Cave <[EMAIL PROTECTED]> wrote: >> One possible way to work around this is to get the raw command line >> and do the shell expansions ourselves from within Python. Ignoring the >> question of whether it is worth the trouble, does anybody know if it >> is possible to obtain the

Re: Access to raw command line?

2007-04-26 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Pieter Edelman <[EMAIL PROTECTED]> wrote: > One possible way to work around this is to get the raw command line > and do the shell expansions ourselves from within Python. Ignoring the > question of whether it is worth the trouble, does anybody know if it > is poss

EuroPython vs PyconUK

2007-04-26 Thread EuGeNe Van den Bulke
I do realize that the UK is not really part of Europe (no polemic :P) but I am nevertheless curious about the logic behind creating another major Python event in Europe. Wasn't EuroPython enough? Like many I am sure, I probably won't be able to attend both (and I really enjoyed the Geneva exper

Re: Access to raw command line?

2007-04-26 Thread Grant Edwards
On 2007-04-26, Pieter Edelman <[EMAIL PROTECTED]> wrote: > All your posts pretty much confirmed my own thoughts on this subject. > Every option requires a specific action from the user, and as Bjoern > points out, it would differ from what everybody is used to. I think > there's no trivial and re

  1   2   3   >