[ANN] pyKook 0.0.3 - a smart build tool similar to Make, Rake, or Ant

2009-08-08 Thread kwatch
Hi, I have released pyKook 0.0.3. http://pypi.python.org/pypi/Kook/0.0.3 http://www.kuwata-lab.com/kook/ http://www.kuwata-lab.com/kook/pykook-users-guide.html In this release, recipe syntax is changed (see below). Overview pyKook is a smart build tool similar to Make, Rake, Ant, or C

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread alex23
Paul Rubin wrote: > Stephen, Alex, etc.: have you actually used the php.net doc system? > Don't knock it til you've tried it.  IMO it is superior to Python's > system.   I've tried it, a lot. Is it okay for me to keep criticising it now, or would you like some time t

Re: .h files?

2009-08-08 Thread Martin v. Löwis
> Question. Seems that with python distributions you have the option to > include either "external facing, public" *.h files, and make them > available, or include the whole kit and kaboodle [all *.h files]. What python distributions are you referring to? The ones I know don't make this distincti

Re: Serial port access

2009-08-08 Thread nipun batra
Ok i managed to comunicate serially using pySerial,but only using Idle. but when i use it within Geany or Gedit,i get following errors Traceback most recent call last File "serial.py",line 3,in module import serial File"/home/nipun/serial.py",line 5,in module ser=serial.Serial() Attribute error:mod

Re: help with threads

2009-08-08 Thread Michael Mossey
On Aug 7, 5:03 pm, Piet van Oostrum wrote: > > Michael Mossey (MM) wrote: > >MM> Ah yes, that explains it. Some of these long computations are done in > >MM> pure C, so I'm sure the GIL is not being released. > > Is that C code under your own control? Or at least the glue from Python > to C?

Re: Is "feedparser" deprecated?

2009-08-08 Thread David Stanek
On Fri, Aug 7, 2009 at 3:07 PM, John Nagle wrote: >  Feedparser requires SGMLlib, which has been removed from Python 3.0. > Feedparser hasn't been updated since 2007. Does this mean Feedparser > is dead? > The release is from 2007, but there are several recent commits. http://code.google.com/p/fe

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread Zac Burns
As I understand it, the double underscores is to create a namespace "reserved for python's internal use". That way python can add more variables and methods in the future and as long as people respect the namespace their code will not break with future revisions. -- Zachary Burns (407)590-4814 Aim

Re: Is "feedparser" deprecated?

2009-08-08 Thread member thudfoo
On Fri, Aug 7, 2009 at 6:10 PM, Gabriel Genellina wrote: > En Fri, 07 Aug 2009 16:07:48 -0300, John Nagle > escribió: > >Feedparser requires SGMLlib, which has been removed from Python 3.0. >> Feedparser hasn't been updated since 2007. Does this mean Feedparser >> is dead? >> > > Since we hav

Re: Serial port access

2009-08-08 Thread nipun batra
On Sun, Aug 9, 2009 at 2:11 AM, Chris Rebert wrote: > On Sat, Aug 8, 2009 at 12:34 PM, nipun batra > wrote: > > Hi, > > How can we access serial port using usb-serial converters,using python in > > linux. > > PySerial might also be an option: > http://pyserial.sourceforge.net/index.html > > Cheer

How to do relpath implementation on 2.5

2009-08-08 Thread Brian Allen Vanderburg II
I've coded my own 'relpath' implementation for 2.5 (shown below) and I want to make sure it follows as closely as it should to 2.6 and later. I've got a question regarding that. When attempting to convert to a relative path and it is not possible for some reason (different drive or UNC share)

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Ströder
Michael Fötsch wrote: > If speed is your primary concern, this will give you even better > performance than unicode(): > > decoder = codecs.lookup("utf-8").decode > for i in xrange(100): > decoder("äöüÄÖÜß")[0] Hmm, that could be interesting. I will give it a try. > However, there'

Re: Subclass dynamically

2009-08-08 Thread Carl Banks
On Aug 8, 12:13 pm, Luis Alberto Zarrabeitia Gomez wrote: > Quoting Robert Dailey : > > > Hey, > > > I have a class that I want to have a different base class depending on > > a parameter that I pass to its __init__method. For example > > (pseudocode): > > 1- Are you sure that you want that behavi

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Carl Banks
On Aug 6, 11:36 am, Kee Nethery wrote: > As someone trying to learn the language I want to say that the tone on   > this list towards people who are trying to learn Python  feels like it   > has become anti-newbies. I don't think this NG is anti-newbie so much as anti-whining-loser. Unfortunatel

Re: Pywin32 @ windows 7

2009-08-08 Thread Elias Fotinis (eliasf)
"Dennis Lee Bieber" wrote: Has it been built under a 64-bit OS though? (I'll confess I've not looked -- I always install the ActiveState binary for my WinXP (32bit) system, and that library is part of the install) Yes, both Python x64 and pywin32 x64 are native 64-bit applications -- they can'

Re: www.python.org website is down?

2009-08-08 Thread Pouya Khankhanian
On Aug 8, 11:49 am, Sharath wrote: > On Aug 8, 11:33 am, Pouya Khankhanian wrote: > > > > > On Aug 8, 11:17 am, "Martin v. Löwis" wrote: > > > > > This is probably a stupid question, but Is there going to be any data > > > > loss if it turns out that the disk has died completely? I assume there

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread Scott David Daniels
kj wrote: ... I find it quite difficult to explain to my students (who are complete newcomers to programming) all the __underscored__ stuff that even rank noobs like them have to deal with. =C2=A0(Trust me, to most of them your reply to my post would be as clear as mud.) Believe me, it's not me

Re: python.org downtime (was Re: is it possible to overload operator "^"?)

2009-08-08 Thread Xavier Ho
On Sun, Aug 9, 2009 at 6:37 AM, Aahz wrote: > www.python.org is currently having hardware problems > So what I'm seeing is an illusion? It works as of now. - Xavier -- http://mail.python.org/mailman/listinfo/python-list

Re: Serial port access

2009-08-08 Thread Chris Rebert
On Sat, Aug 8, 2009 at 12:34 PM, nipun batra wrote: > Hi, > How can we access serial port using usb-serial converters,using python in > linux. PySerial might also be an option: http://pyserial.sourceforge.net/index.html Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman

python.org downtime (was Re: is it possible to overload operator "^"?)

2009-08-08 Thread Aahz
In article , dmitrey wrote: > >To Diez: >yes, but I haven't paid attention to xor. BTW the url is currently >unavailable (Network Timeout. The server at docs.python.org is taking >too long to respond.). www.python.org is currently having hardware problems -- Aahz (a...@pythoncraft.com)

Re: www.python.org website is down?

2009-08-08 Thread Xavier Ho
Well, it's back up now. At least for me. ;) Ching-Yun "Xavier" Ho, Technical Artist Contact Information Mobile: (+61) 04 3335 4748 Skype ID: SpaXe85 Email: cont...@xavierho.com Website: http://xavierho.com/ On Sun, Aug 9, 2009 at 4:49 AM, Sharath wrote: > On Aug 8, 11:33 am, Pouya Khankhania

Re: unique-ifying a list

2009-08-08 Thread Paul Rubin
Dennis Lee Bieber writes: > Why bother with seen? The version with seen runs in linear time because of the O(1) set lookup. Your version runs in quadratic time. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Mark Lawrence
Kee Nethery wrote: As someone trying to learn the language I want to say that the tone on this list towards people who are trying to learn Python feels like it has become anti-newbies. [snip] Kee Nethery My gut feeling (which could of course be wrong) is that many hard core Pythonistas ar

Re: Subclass dynamically

2009-08-08 Thread Luis Alberto Zarrabeitia Gomez
Quoting Robert Dailey : > Hey, > > I have a class that I want to have a different base class depending on > a parameter that I pass to its __init__method. For example > (pseudocode): 1- Are you sure that you want that behavior? Given that in python, a class is just a particular case of invocabl

Re: www.python.org website is down?

2009-08-08 Thread Sharath
On Aug 8, 11:33 am, Pouya Khankhanian wrote: > On Aug 8, 11:17 am, "Martin v. Löwis" wrote: > > > > This is probably a stupid question, but Is there going to be any data > > > loss if it turns out that the disk has died completely? I assume there > > > are backups of the repo that are geographica

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread kj
In David Cournapeau writes: >On Sat, Aug 8, 2009 at 9:11 PM, kj wrote: >> In Chris Rebert p...@rebertia.com> writes: >> >>>The double-underscores indicate that the Python interpreter itself >>>usually is the caller of the method, and as such some level of "magic" >>>may be associated with it.

Re: www.python.org website is down?

2009-08-08 Thread Pouya Khankhanian
On Aug 8, 11:17 am, "Martin v. Löwis" wrote: > > This is probably a stupid question, but Is there going to be any data > > loss if it turns out that the disk has died completely? I assume there > > are backups of the repo that are geographically distributed. > > Yes, we have backups, and are resto

Re: www.python.org website is down?

2009-08-08 Thread Martin v. Löwis
> This is probably a stupid question, but Is there going to be any data > loss if it turns out that the disk has died completely? I assume there > are backups of the repo that are geographically distributed. Yes, we have backups, and are restoring them at the moment. However, we still haven't give

Re: [Diversity] Language note

2009-08-08 Thread Rami Chowdhury
Most indian languages have a different grammer (compared to English). So i'm curious to see how that would be implemented in a parser +1 -- I'd be interested in seeing this too, although we have drifted OT here and perhaps this conversation would be better had on Python- list. The closest I

Re: convert non-delimited to delimited

2009-08-08 Thread MRAB
John wrote: I am not really a CS person, but I have a task to import a non-delimited text to an access database. After some research, I *think* the best way to do this is by first converting the non-delimited text to delimited text, and then import it to the database. Is this the best way to

Re: Bug or feature: double strings as one

2009-08-08 Thread Jan Kaliszewski
08-08-2009 Steven D'Aprano wrote: On Fri, 07 Aug 2009 17:35:28 +, kj wrote: I fail to see why x = ("first part of a very long string " "second part of a very long string") That's done by the compiler at compile time and is fast. Moreover, it's also more readable, when you use st

problem

2009-08-08 Thread sumit
i want 2 hav the header files for regular expression to non deterministin autometa so whr should i find it?plz help -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* Michael Ströder (Fri, 07 Aug 2009 03:25:03 +0200) > Thorsten Kampe wrote: > > * Michael Ströder (Thu, 06 Aug 2009 18:26:09 +0200) > > timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000) > >> 17.23644495010376 > > timeit.Timer("'äöüÄÖÜß'.decode('utf8')").timeit(1000) > >> 72.08

HTTP_RANGE

2009-08-08 Thread gert
def application(environ, response): range=environ.get('HTTP_RANGE','bytes=0-').replace ('bytes=','').split(',') offset=[] for r in range: offset.append(r.split('-')) out='0123456789' lengthF=len(out) lengthC=str(lengthF-int(offset[0][0])) bitS=int(offset[0][0]) bitE=

Re: unicode() vs. s.decode()

2009-08-08 Thread garabik-news-2005-05
Thorsten Kampe wrote: > lines". That *is* *exactly* nothing. > > Another guy claims he gets times between 2.9 and 6.2 seconds when > running decode/unicode in various manifestations over "18 million over a sample of 60 words (sorry for not being able to explain myself clear enough so th

FCC Amateur Radio database -> SQLite

2009-08-08 Thread joseph armbruster
Here is a quick way to get the amateur radio database from the FCC put into sqlite. If anyone has insight into a pure-python import, please comment. http://libjoe.blogspot.com/2009/08/loading-up-fcc-license-database.html Joseph Armbruster http://www.joevial.com -- http://mail.python.org/mailman

Re: Bug or feature: double strings as one

2009-08-08 Thread Elias Fotinis (eliasf)
"Carl Banks" wrote: http://www.geocities.com/connorbd/tarpit/magentaaarm.html (It's on Geocities, yikes, someone better archive that) http://web.archive.org/web/*/http://www.geocities.com/connorbd/tarpit/magentaaarm.html :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with regex

2009-08-08 Thread Nobody
On Thu, 06 Aug 2009 17:02:44 +0100, MRAB wrote: > The character class \d is equivalent to [0-9] Not for Unicode, which is the default in 3.x. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-08 Thread garabik-news-2005-05
Thorsten Kampe wrote: > * garabik-news-2005...@kassiopeia.juls.savba.sk (Fri, 7 Aug 2009 > 17:41:38 + (UTC)) >> Thorsten Kampe wrote: >> > If you increase the number of loops to one million or one billion or >> > whatever even the slightest completely negligible difference will >> > occur. T

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* alex23 (Fri, 7 Aug 2009 06:53:22 -0700 (PDT)) > Thorsten Kampe wrote: > > Bollocks. No one will even notice whether a code sequence runs 2.7 or > > 5.7 seconds. That's completely artificial benchmarking. > > But that's not what you first claimed: > > > I don't think any measurable speed increa

Re: how to overload operator "< <" (a < x < b)?

2009-08-08 Thread alex23
"Diez B. Roggisch" wrote: > Not really. I didn't get the chaining, and Peter is right that for that > there is no real overloading. I'm sorry, I don't really get why overloading lt & gt isn't an answer to the OP's question... His terminology may not have been correct but I'm not sure why it's not

Re: how to overload operator "< <" (a < x < b)?

2009-08-08 Thread Peter Otten
dmitrey wrote: > is it possible to overload operator "< <"? (And other like this one, > eg "<= <=", "> >", ">= >=") No. a < x < b is a shortcut for a < x and x < b where x is of course evaluated only once. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Survey: Does your company use Python? Do you know a company that uses Python?

2009-08-08 Thread Giampaolo Rodola'
On 7 Ago, 21:15, VanL wrote: > This is a survey to find as many companies using Python as we can. You > can see the survey below: > > > > You don't need to work at the company to add it to this list! We will > filter for

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Roel Schroeven
Paul Rubin schreef: > Steven D'Aprano writes: >> As for the rest, you're right that the current bug-tracker puts up >> barriers to people submitting comments and bugs. That's actually a good >> thing. The only thing worse than not enough information is too much >> information, and the current s

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread r
On Aug 7, 12:41 am, alex23 wrote: ...(snip) > How about a secondary site that embeds the docs and provides > commenting functionality around it? That's certainly a finitely scoped > project that those with issues about the docs could establish and > contribute to, with the possibility of it gainin

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Sion Arrowsmith
Terry Reedy wrote: >RayS wrote: >> http://www.php.net/manual/en/language.types.array.php is a prime example >> [ ... ] >I consider consider this to an unreadable mishmash. [compared to] > something compact and readable. Are you talking about the language or the documentation? 9-) (Actually, th

Re: PEP 8 exegetics: conditional imports?

2009-08-08 Thread Steven D'Aprano
On Fri, 07 Aug 2009 16:50:12 +, kj wrote: > I seek the wisdom of the elders. Is there a consensus on the matter of > conditional imports? Are they righteous? Or are they the way of the > wicked? Being an elder doesn't grant you wisdom. It just might mean you've been stupid and ignorant fo

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread Kee Nethery
As someone trying to learn the language I want to say that the tone on this list towards people who are trying to learn Python feels like it has become anti-newbies. Learning a new language is difficult enough without seeing other newbies getting shamed for not knowing everything there is

Re: Subclass dynamically

2009-08-08 Thread Gary Herron
Robert Dailey wrote: Hey, I have a class that I want to have a different base class depending on a parameter that I pass to its __init__method. For example (pseudocode): class MyDerived( self.base ): def __init__( self, base ): self.base = base Something like that... and then I would do

Subclass dynamically

2009-08-08 Thread Robert Dailey
Hey, I have a class that I want to have a different base class depending on a parameter that I pass to its __init__method. For example (pseudocode): class MyDerived( self.base ): def __init__( self, base ): self.base = base Something like that... and then I would do this: foo = MyDerived

Re: Need help in refactoring my python script

2009-08-08 Thread MRAB
n179911 wrote: I have a python script which process a file line by line, if the line matches a regex, it calls a function to handle it. My question is is there a better write to refactor my script. The script works, but as it is, i need to keep indent to the right of the editor as I add more and

Re: Need help in refactoring my python script

2009-08-08 Thread Peter Otten
n179911 wrote: > I have a python script which process a file line by line, if the line > matches a regex, it calls a function to handle it. > > My question is is there a better write to refactor my script. The > script works, but as it is, i need to keep indent to the right of the > editor as I a

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* Michael Ströder (Sat, 08 Aug 2009 15:09:23 +0200) > Thorsten Kampe wrote: > > * Steven D'Aprano (08 Aug 2009 03:29:43 GMT) > >> But why assume that the program takes 8 minutes to run? Perhaps it takes > >> 8 seconds to run, and 6 seconds of that is the decoding. Then halving > >> that reduces t

Re: www.python.org website is down?

2009-08-08 Thread the hatter
> A.M. Kuchling said: > > """ > Bothwww.python.organd svn.python.org are down.  They're hosted on > the same machine, and it seems to have run into disk problems and > hasn't rebooted even after power-cycling.  Thomas Wouters will be > visiting the machine physically tomorrow to try to diagnose the

Re: Serial port access

2009-08-08 Thread exarkun
On 04:34 pm, nipunredde...@gmail.com wrote: Hi, How can we access serial port using usb-serial converters,using python in linux.I want to further use pyGTK for Gui development after accessing serial data. Twisted supports serial ports and has good Gtk integration. http://twistedmatrix.com/p

Need help in refactoring my python script

2009-08-08 Thread n179911
I have a python script which process a file line by line, if the line matches a regex, it calls a function to handle it. My question is is there a better write to refactor my script. The script works, but as it is, i need to keep indent to the right of the editor as I add more and more regex for m

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread Yongjian Xu
These "special" methods are not meant to be used or known to beginners. They aren't even meant to be called directly (in most cases). They are either operator overloading methods or behavior customization methods. In my opinion, in the meta programming realm. Should probably in advanced topic or so

.h files?

2009-08-08 Thread rogerdpack
Question. Seems that with python distributions you have the option to include either "external facing, public" *.h files, and make them available, or include the whole kit and kaboodle [all *.h files]. Any word on how python does this currently? Just wondering as ruby runs into the same question

Serial port access

2009-08-08 Thread nipun batra
Hi, How can we access serial port using usb-serial converters,using python in linux.I want to further use pyGTK for Gui development after accessing serial data. -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Fötsch
Michael Ströder wrote: > >>> timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000) > 17.23644495010376 > >>> timeit.Timer("'äöüÄÖÜß'.decode('utf8')").timeit(1000) > 72.087096929550171 > > That is significant! So the winner is: > > unicode('äöüÄÖÜß','utf-8') Which proves that benchmark r

Re: www.python.org website is down?

2009-08-08 Thread Elias Fotinis (eliasf)
"Caezar" wrote: I cannot connect to the official Python website. [snip] Are you experiencing the same problem? Yes, it's been down for a while. A useful site to check in such occasions is http://downforeveryoneorjustme.com/. -- http://mail.python.org/mailman/listinfo/python-list

Re: www.python.org website is down?

2009-08-08 Thread Daniel Wong
> > A.M. Kuchling said: > > """ > Bothwww.python.organd svn.python.org are down.  They're hosted on > the same machine, and it seems to have run into disk problems and > hasn't rebooted even after power-cycling.  Thomas Wouters will be > visiting the machine physically tomorrow to try to diagnose t

Re: www.python.org website is down?

2009-08-08 Thread Byung-Hee HWANG
Caezar writes: > I cannot connect to the official Python website. I get the following > error message: > > "Connection Interrupted > The connection to the server was reset while the page was loading. > The network link was interrupted while negotiating a connection. > Please try again." > > Are y

Re: www.python.org website is down?

2009-08-08 Thread Craig
Yes the same prob. --- On Sat, 8/8/09, Mark Lawrence wrote: > From: Mark Lawrence > Subject: Re: www.python.org website is down? > To: python-list@python.org > Date: Saturday, August 8, 2009, 8:41 AM > Caezar wrote: > > I cannot connect to the official Python website. I get > the following > >

Re: www.python.org website is down?

2009-08-08 Thread MRAB
Caezar wrote: I cannot connect to the official Python website. I get the following error message: "Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again." Are you experiencing t

Re: www.python.org website is down?

2009-08-08 Thread Mark Lawrence
Caezar wrote: I cannot connect to the official Python website. I get the following error message: "Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again." Are you experiencing t

www.python.org website is down?

2009-08-08 Thread Caezar
I cannot connect to the official Python website. I get the following error message: "Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again." Are you experiencing the same problem?

Re: String to valid Python identifier

2009-08-08 Thread Vlastimil Brom
2009/8/8 Дамјан Георгиевски : > > >>> Is there any easy function in the stdlib to convert any random string >>> in a valid Python identifier .. possibly by replacing non-valid >>> characters with _ ? ... > > ps. > by "convert" I didn't mean a full transformation... I was more hoping > for the least

ANN: gnupg v0.2.1 released

2009-08-08 Thread Vinay Sajip
A new version of the Python module which wraps GnuPG has been released. What Changed? = This is a minor bug-fix release. See the project website ( http://code.google.com/p/python-gnupg/ ) for more information. The current version passes all tests on Windows (Python 2.4, 2.5, 2.6, 3.1,

Re: unicode() vs. s.decode()

2009-08-08 Thread Michael Ströder
Thorsten Kampe wrote: > * Steven D'Aprano (08 Aug 2009 03:29:43 GMT) >> But why assume that the program takes 8 minutes to run? Perhaps it takes >> 8 seconds to run, and 6 seconds of that is the decoding. Then halving >> that reduces the total runtime from 8 seconds to 5, which is a noticeable >

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread David Cournapeau
On Sat, Aug 8, 2009 at 9:11 PM, kj wrote: > In Chris Rebert > writes: > >>The double-underscores indicate that the Python interpreter itself >>usually is the caller of the method, and as such some level of "magic" >>may be associated with it. Other languages have you do the equivalent >>of `def

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* garabik-news-2005...@kassiopeia.juls.savba.sk (Fri, 7 Aug 2009 17:41:38 + (UTC)) > Thorsten Kampe wrote: > > If you increase the number of loops to one million or one billion or > > whatever even the slightest completely negligible difference will > > occur. The same thing will happen if yo

Re: String to valid Python identifier

2009-08-08 Thread Дамјан Георгиевски
>> Is there any easy function in the stdlib to convert any random string >> in a valid Python identifier .. possibly by replacing non-valid >> characters with _ ? > > I think this is fairly underspecified as a problem statement. A > solution that would meet your specification would be True, I w

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* alex23 (Fri, 7 Aug 2009 10:45:29 -0700 (PDT)) > garabik-news-2005...@kassiopeia.juls.savba.sk wrote: > > I am not sure I understood that. Must be my English :-) > > I just parsed it as "blah blah blah I won't admit I'm wrong" and > didn't miss anything substantive. Alex, there are still a numbe

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread kj
In Chris Rebert writes: >The double-underscores indicate that the Python interpreter itself >usually is the caller of the method, and as such some level of "magic" >may be associated with it. Other languages have you do the equivalent >of `def +():` or `def operator +()` to override an operator

Re: Database query execution times in Python?

2009-08-08 Thread Kushal Kumaran
On Sat, Aug 8, 2009 at 12:12 AM, pwnedd wrote: > > Hi all, > > I've been writing some code using libraries based on the Python Database API > 2.0 (MySQLdb & pg), and so far things are working really well. There is one > thing that I have not been able to figure out how to do, however: > > Retrieve

Re: unicode() vs. s.decode()

2009-08-08 Thread Thorsten Kampe
* Steven D'Aprano (08 Aug 2009 03:29:43 GMT) > On Fri, 07 Aug 2009 17:13:07 +0200, Thorsten Kampe wrote: > > One guy claims he has times between 2.7 and 5.7 seconds when > > benchmarking more or less randomly generated "one million different > > lines". That *is* *exactly* nothing. > > We agree th

Re: unique-ifying a list

2009-08-08 Thread ryles
On Aug 7, 4:53 pm, kj wrote: > Suppose that x is some list.  To produce a version of the list with > duplicate elements removed one could, I suppose, do this: > >     x = list(set(x)) > > but I expect that this will not preserve the original order of > elements. > OrderedSet is most likely on the

Re: Windows 7 : any problems installing or running Python ?

2009-08-08 Thread Michel Claveau - MVP
Hi! I use, all days, Python 2.6 + Pywin32 on Win-7-64 bits. Without problem (I confirm : pywin 32 on 64 bits). @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to overload operator "^"?

2009-08-08 Thread Diez B. Roggisch
dmitrey schrieb: the operator precedence will seem wrong So, are there any ways to change operator precedence (for my class)? No. Those are built-in. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to overload operator "^"?

2009-08-08 Thread dmitrey
> the operator precedence will seem wrong So, are there any ways to change operator precedence (for my class)? To Diez: yes, but I haven't paid attention to xor. BTW the url is currently unavailable (Network Timeout. The server at docs.python.org is taking too long to respond.). On Aug 8, 12:06 p

Re: Bug or feature: double strings as one

2009-08-08 Thread Mark Lawrence
Unknown wrote: On 2009-08-07, Scott David Daniels wrote: Grant Edwards wrote: On 2009-08-07, durumdara wrote: In other languages, like Delphi (Pascal), Javascript, SQL, etc., I must concatenate the strings with some sign, like "+" or "||". In other languages like Ruby, awk, C, C++, etc. adj

Re: Pywin32 @ windows 7

2009-08-08 Thread Elias Fotinis (eliasf)
"Algirdas Brazas" wrote: Did anyone manage to get windows extensions installet on windows 7 64 bit? As far as I try I get only "Setup program invalid or damaged". Try downloading the installer again. It should work then. I haven't tested it on Win7, but my Vista machine has Python and pywin32

Re: Pywin32 @ windows 7

2009-08-08 Thread Elias Fotinis (eliasf)
"Dennis Lee Bieber" wrote: Ever consider that the name has WIN32 in, and not WIN64, for a reason? Win32 is a misnomer; it just means "non-Win16". The same API exists in Windows x64 (with pointers expanded to 64-bit, of course). -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to overload operator "^"?

2009-08-08 Thread Diez B. Roggisch
dmitrey schrieb: hi all, is it possible to overload operator "^"? (AFAIK __pow__ overloads ** instead of ^) Thank you in advance, D. Did you read the link I gave you for your last question? It shows __xor__ as special method. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to overload operator "^"?

2009-08-08 Thread Gary Herron
dmitrey wrote: hi all, is it possible to overload operator "^"? (AFAIK __pow__ overloads ** instead of ^) Thank you in advance, D. The ^ operator is not an exponentiation, but rather the xor operator. Thus you can override it with the __xor__ method. Beware, if you are thinking of ^ as a

Re: unique-ifying a list

2009-08-08 Thread Elias Fotinis (eliasf)
"kj" wrote: I suppose that I could write something like def uniquify(items): seen = set() ret = [] for i in items: if not i in seen: ret.append(i) seen.add(i) return ret But this seems to me like such a commonly needed operation that I find it hard to be

is it possible to overload operator "^"?

2009-08-08 Thread dmitrey
hi all, is it possible to overload operator "^"? (AFAIK __pow__ overloads ** instead of ^) Thank you in advance, D. -- http://mail.python.org/mailman/listinfo/python-list

Re: syntax checker in python

2009-08-08 Thread Carl Banks
On Aug 7, 1:39 pm, horos11 wrote: > ps - I just realized that it isn't enough to do: > > python -c 'import /path/to/script' > > since that actually executes any statement inside of the script > (wheras all I want to do is check syntax) > > So - let me reprhase that - exactly how can you do a synta

Re: Python docs disappointing - group effort to hire writers?

2009-08-08 Thread koranthala
On Aug 7, 5:15 pm, Dave Angel wrote: > alex23 wrote: > > Paul Rubin wrote: > > >> The PHP docs as I remember are sort of regular (non-publically > >> editable) doc pages, each of which has a public discussion thread > >> where people can post questions and answers ab