Is this a bug? Python intermittently stops dead for seconds

2006-09-30 Thread charlie strauss
Below is a simple program that will cause python to intermittently stop executing for a few seconds. it's 100% reproducible on my machine. I'd be tempted to say this is a nasty garbage collection performance issue except that there is no major memory to be garbage collected in this script.

Re: changing numbers to spellings

2006-09-30 Thread Paul Rubin
"MonkeeSage" <[EMAIL PROTECTED]> writes: > If you need the actual names for like "Five Hundred and Sixty Seven", I > think one of the smart people 'round here will have to help with that. > I have some ideas, but I'm not very good at creating complex > algorithms. These kinds of things are general

Re: question about scope

2006-09-30 Thread James Stroud
John Salerno wrote: > Steve Holden wrote: > >> The methods do indeed look in their enclosing class, but only for >> self-relative references. These are sought first in the instance, then >> in the instance's class, then in the instance's class's superclass, >> and so on up to the ultimate super

Re: question about scope

2006-09-30 Thread John Salerno
Steve Holden wrote: > The methods do indeed look in their enclosing class, but only for > self-relative references. These are sought first in the instance, then > in the instance's class, then in the instance's class's superclass, and > so on up to the ultimate superclass. In other words, all a

Re: changing numbers to spellings

2006-09-30 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hey, > > Sorry to bother everybody again, but this group seems to have quite a > few knowledgeable people perusing it. > > Here's my most recent problem: For a small project I am doing, I need > to change numbers into letters, for example, a person typing in the > numbe

Re: changing numbers to spellings

2006-09-30 Thread MonkeeSage
[EMAIL PROTECTED] wrote: > Hey, > > Sorry to bother everybody again, but this group seems to have quite a > few knowledgeable people perusing it. Hi Tanner, I've seen a few of those people; but let a dummy (me) try to help. ;) As to the numbers to names question: do you need to know the names of

Re: question about scope

2006-09-30 Thread Steve Holden
John Salerno wrote: > I have the following code: > > > > class DataAccessFrame(wx.Frame): > > menu_items = [('File', 'New Database', 'New Record', 'Open > Database...', > 'Open Record...', 'Save Record', 'Save All Records', > 'Close Record', 'Close

Re: does anybody earn a living programming in python?

2006-09-30 Thread Alex Martelli
Blair P. Houghton <[EMAIL PROTECTED]> wrote: > I happen to know that Google does most of its admin scripting in > Python. It can't be a small job, running a few hundred thousand > servers worldwide and keeping them all up to date for system and > security. It's not a small job (as uber-tech-lead

Re: does anybody earn a living programming in python?

2006-09-30 Thread Alex Martelli
Magnus Lycka <[EMAIL PROTECTED]> wrote: ... > stuff in the world, so my standard extrapolation technique would yield > 3 python programmers globally. I think this estimate is low, based on three piece of data I know (but, sorry, are all confidential;-) and thus one I can infer: -- I know ho

changing numbers to spellings

2006-09-30 Thread [EMAIL PROTECTED]
Hey, Sorry to bother everybody again, but this group seems to have quite a few knowledgeable people perusing it. Here's my most recent problem: For a small project I am doing, I need to change numbers into letters, for example, a person typing in the number '3', and getting the output 'Three'. So

Re: AN Intorduction to Tkinter

2006-09-30 Thread [EMAIL PROTECTED]
Sorry about that. As far as I can tell, its not anything to do with your code. I think its something with tkinter modules. Sorry about misleading you. Thanks for the help, I'm sure you'll hear from me soon again. In fact... FlyingIsFun1217 -- http://mail.python.org/mailman/listinfo/python-list

question about scope

2006-09-30 Thread John Salerno
I have the following code: class DataAccessFrame(wx.Frame): menu_items = [('File', 'New Database', 'New Record', 'Open Database...', 'Open Record...', 'Save Record', 'Save All Records', 'Close Record', 'Close Database'), ('Edit',

Re: How to Catch 2 Exceptions at once?

2006-09-30 Thread John Machin
Gregory Piñero wrote: > How can I catch 2 exceptions at once for example: > > try: > self.gses = opener.open(req) > except (urllib2.HTTPError,urllib2.URLError): > do something.. > > Seems to work, but how do I also get information about the error? Errr .. t

Re: How to Catch 2 Exceptions at once?

2006-09-30 Thread James Stroud
Gregory Piñero wrote: > How can I catch 2 exceptions at once for example: > >try: >self.gses = opener.open(req) >except (urllib2.HTTPError,urllib2.URLError): >do something.. > > Seems to work, but how do I also get information about the error? > py> try: .

Weekly Python Patch/Bug Summary

2006-09-30 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 422 open ( +2) / 3415 closed ( +5) / 3837 total ( +7) Bugs: 933 open (+18) / 6212 closed (+26) / 7145 total (+44) RFE : 237 open ( +2) / 239 closed ( +1) / 476 total ( +3) New / Reopened Patches __ platform.

Re: How to Catch 2 Exceptions at once?

2006-09-30 Thread Gregory Piñero
On 9/30/06, Steve Holden <[EMAIL PROTECTED]> wrote: > As usual, by adding an additional name after the exception specification: > > try: > self.gses = opener.open(req) > except (urllib2.HTTPError,urllib2.URLError), exdata: > do something with exdata ... >

Re: storing variable names in a list before they are used?

2006-09-30 Thread John Salerno
Dennis Lee Bieber wrote: > Look toward the potential future... Wherein your entire GUI is > defined with something like XML. Basically you'd be parsing the XML into > some structure (of structures) in which the only real access to the data > requires looking up the substructure using some fi

Re: How to Catch 2 Exceptions at once?

2006-09-30 Thread Steve Holden
Gregory Piñero wrote: > How can I catch 2 exceptions at once for example: > > try: > self.gses = opener.open(req) > except (urllib2.HTTPError,urllib2.URLError): > do something.. > > Seems to work, but how do I also get information about the error? > As usu

How to Catch 2 Exceptions at once?

2006-09-30 Thread Gregory Piñero
How can I catch 2 exceptions at once for example: try: self.gses = opener.open(req) except (urllib2.HTTPError,urllib2.URLError): do something.. Seems to work, but how do I also get information about the error? -- Gregory Piñero Chief Innovation Officer Bl

Re: Python/UNO/OpenOffice?

2006-09-30 Thread John Machin
Sybren Stuvel wrote: > [EMAIL PROTECTED] enlightened us with: > > Are then any currently active and reasonably mature Python plugins/ > > apis/whatever for programming/scripting OpenOffice? The page I've > > found is http://udk.openoffice.org/python/python-bridge.html, but it > > was last updated m

Re: builtin regular expressions?

2006-09-30 Thread bearophileHUGS
Thorsten Kampe: > And the simple reason why Regular Expressions are not a part of the > core Python language is that Regular Expressions are overrated. They > are simply not the preferred tool for every kind of text manipulation > and extraction. And their syntax is ugly and low level, they are di

Re: builtin regular expressions?

2006-09-30 Thread MonkeeSage
Roy Smith wrote: > More to the point: > > You can stick it in a bottle, you can hold it in your hand, AMEN! That's simply an implementation detail of perl regexps; it doesn't really address the issue. For example, in ruby a regexp is an object. Matches are also objects when one uses the String#mat

Re: does anybody earn a living programming in python?

2006-09-30 Thread DaveM
On Thu, 28 Sep 2006 00:20:11 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >The >dictionary definition of countless is "too many to count" (Pocket Oxford), >which I suppose could be 11 for some people if they didn't take their >shoes and socks off. Mathematically, any finite integer is able to

Re: loop over list and modify in place

2006-09-30 Thread Paul Rubin
"Daniel Nogradi" <[EMAIL PROTECTED]> writes: > Is looping over a list of objects and modifying (adding an attribute > to) each item only possible like this? > > mylist = [ obj1, obj2, obj3 ] > > for i in xrange( len( mylist ) ): > mylist[i].newattribute = 'new value' for m in mylist: m.ne

Re: builtin regular expressions?

2006-09-30 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Mirco Wahab wrote: > > > I fail to see the benefit of a re-object, I consider these to > > be just there because regexes aren't in the core language. > > One benefit is that it's an obj

Re: for: else: - any practical uses for the else clause?

2006-09-30 Thread MonkeeSage
BJörn Lindqvist wrote: > The code that you write in the positions A and B really are misplaced. > They arent part of the iteration of list. The two tasks, find item and > do something with item should be separated. I think it is useful to have them joined. Consider a contrived example: for i in (

Re: preemptive OOP?

2006-09-30 Thread MonkeeSage
John Salerno wrote: > LOL. Yeah, I guess so. I kind of expected the answer to be "yes, always > go with OOP in preparation for future expansion", but I should have > known that Python programmers would be a little more pragmatic than that. :) Depends on the design philosophy of a particular progra

Re: "Wiki in 10 minutes"

2006-09-30 Thread Steve Holden
Michiel Sikma wrote: > Hello everybody. > > I recently had a bit of data loss and, among some other minor things, > lost my bookmarks. I once bookmarked this video tutorial which > allegedly showed how to make a wiki in 10 minutes with some Python > network framework. Does anybody know which

Re: where the extra space comes from on the stdout

2006-09-30 Thread Steve Holden
alf wrote: > Hi, > > I can not find out where the extra space comes from. Run following: > > import os,sys > while 1: > print 'Question [Y/[N]]?', > if sys.stdin.readline().strip() in ('Y','y'): > #do something > pass > > $ python q.py > Question [Y/[N]]?y > Questio

Re: builtin regular expressions?

2006-09-30 Thread Steve Holden
Mirco Wahab wrote: > Thus spoke MRAB (on 2006-09-30 20:54): > >>Antoine De Groote wrote: >> >>>I just have to learn accept the fact that Python is more verbose more >>>often than Ruby (I don't know Perl really). >> >>One of the differences between the Python way and the Perl way is that >>the Per

Re: Escapeism

2006-09-30 Thread Steve Holden
Kay Schluehr wrote: > Steve Holden wrote: > >>Kay Schluehr wrote: >> >>>Sybren Stuvel wrote: >>> >>> Kay Schluehr enlightened us with: >Usually I struggle a short while with \ and either succeed or give up. >Today I'm in a different mood and don't give up. So here is my >

Re: Mark Lutz Python interview

2006-09-30 Thread Steve Holden
Mark Lutz wrote: > Fuzzyman wrote: > >>Mark Lutz wrote: >> >>>Python author and trainer Mark Lutz will be interviewed >>>on the radio show Tech Talk this Sunday, October 1st, >>>at 6PM Eastern time. He'll be answering questions about >>>Python, his books, and his Python training services. >>> >>

"Wiki in 10 minutes"

2006-09-30 Thread Michiel Sikma
Hello everybody. I recently had a bit of data loss and, among some other minor things, lost my bookmarks. I once bookmarked this video tutorial which allegedly showed how to make a wiki in 10 minutes with some Python network framework. Does anybody know which one it might have been? I've b

Re: preemptive OOP?

2006-09-30 Thread John Salerno
Kent Johnson wrote: > You struck a nerve here, I have seen so clearly at work the difference > between projects that practice YAGNI and those that are designed to meet > any possible contingency. It's the difference between running with > running shoes on or wet, muddy boots. LOL. Yeah, I gues

where the extra space comes from on the stdout

2006-09-30 Thread alf
Hi, I can not find out where the extra space comes from. Run following: import os,sys while 1: print 'Question [Y/[N]]?', if sys.stdin.readline().strip() in ('Y','y'): #do something pass $ python q.py Question [Y/[N]]?y Question [Y/[N]]?y Question [Y/[N]]?y Ques

Re: loop over list and modify in place

2006-09-30 Thread Daniel Nogradi
> Call me crazy, but isn't the simple construct > for obj in mylist: > obj.newattribute = 'new value' > what the OP was looking for? Yes, of course. That's why my follow-up post was this: > Please consider the previous question as an arbitrary random brain > cell fluctuation whose pro

Re: loop over list and modify in place

2006-09-30 Thread James Stroud
John Machin wrote: > James Stroud wrote: > >>Daniel Nogradi wrote: >> >>>Is looping over a list of objects and modifying (adding an attribute >>>to) each item only possible like this? >>> >>>mylist = [ obj1, obj2, obj3 ] >>> >>>for i in xrange( len( mylist ) ): >>> mylist[i].newattribute = 'new

Re: PyXML not supported, what to use next?

2006-09-30 Thread Paul Boddie
John Salerno wrote: > Paul Watson wrote: > > It would appear that xml.dom.minidom or xml.sax.* might be the best > > thing to use since PyXML is going without support. Best of all it is > > included in the base Python distribution, so no addition hunting required. > > > > Is this right thinking?

Re: The Python world tries to be polite [formerly offensive to another language]

2006-09-30 Thread Robert Hicks
Steve Holden wrote: > Istvan Albert wrote: > [...] > > ps. as for the title of this post, it is ironic that you are insulting > > another community while asking for no insults > > > Perhaps so, but none the less comp.lang.perl has a demonstrable history > of newbie-flaming. Don't know what it's li

Re: Leave the putdowns in the Perl community, the Python world does not need them

2006-09-30 Thread Ilias Lazaridis
metaperl wrote: > I was shocked to see the personal insults hurled in this thread: > http://groups.google.com/group/comp.lang.python/browse_thread/thread/d0758cb9545cad4b > > I have been very pleased with Python developers regardless of skill > levels in both the IRC channel as well as here - no ho

Re: loop over list and modify in place

2006-09-30 Thread John Machin
James Stroud wrote: > Daniel Nogradi wrote: > > Is looping over a list of objects and modifying (adding an attribute > > to) each item only possible like this? > > > > mylist = [ obj1, obj2, obj3 ] > > > > for i in xrange( len( mylist ) ): > >mylist[i].newattribute = 'new value' > > > > > > I'

Re: preemptive OOP?

2006-09-30 Thread Kent Johnson
John Salerno wrote: > So my question in general is, is it a good idea to default to an OOP > design like my second example when you aren't even sure you will need > it? I know it won't hurt, and is probably smart to do sometimes, but > maybe it also just adds unnecessary code to the program. In

Re: storing variable names in a list before they are used?

2006-09-30 Thread John Salerno
Dennis Lee Bieber wrote: > Longer answer... "names" is a list of strings which can be used as > keys into a dictionary. Thanks for all that! I like the idea of a dictionary, so I might try that, although it does seem to be overcomplicating things a bit (almost by necessity, though, given

Re: builtin regular expressions?

2006-09-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Mirco Wahab wrote: > I fail to see the benefit of a re-object, I consider these to > be just there because regexes aren't in the core language. One benefit is that it's an object. You can stuff it into a dictionary or give it as argument to a function. Ciao, Marc

RE: Making sure script only runs once instance at a time.

2006-09-30 Thread Matthew Warren
Apologies for repost. not sure what happened.   This email is confidential and may be privileged. If you are not the intended recipient please notify the sender immediately and delete the email from your computer. You should not copy the email, use it for any purpose or disclose its contents

Re: Escapeism

2006-09-30 Thread Leonhard Vogt
> But there is some ambiguity due to the the fact that applying '\7' to > rawform() yields r'\a' and not r'\7'. So one needs more specification > for disambiguation using e.g. an extra parameter. > >>> '\a'=='\7' True The two are actually the same thing, so how could a function decide whether to

Re: PyXML not supported, what to use next?

2006-09-30 Thread John Salerno
Paul Watson wrote: > It would appear that xml.dom.minidom or xml.sax.* might be the best > thing to use since PyXML is going without support. Best of all it is > included in the base Python distribution, so no addition hunting required. > > Is this right thinking? Is there a better solution?

Upgrading Problems

2006-09-30 Thread Javier Subervi
Hi;I have python 2.3.5 and I'd like to upgrade to 2.5.0. I've tried installing from FreeBSD ports and the oldfashioned way from source code, with the "configure && make && make install" dance, and still when I call up my python interpreter it tells me I'm in 2.3.5! Why? I didn't do "altinstall"! Wh

Re: Native MP3 Decoder?

2006-09-30 Thread floguy
I did see that, but that seems to only work on Lin/Unix. In fact, the only way that I can see to install that package is using distutils and the config_unix.py script, which indicates to me that it works only on Lin/Unix. If I'm mistaken, please let me know. MonkeeSage wrote: > [EMAIL PROTECTED]

PyXML not supported, what to use next?

2006-09-30 Thread Paul Watson
It would appear that xml.dom.minidom or xml.sax.* might be the best thing to use since PyXML is going without support. Best of all it is included in the base Python distribution, so no addition hunting required. Is this right thinking? Is there a better solution? -- http://mail.python.org/mai

Re: Computer Language Popularity Trend

2006-09-30 Thread Arne Vajhøj
Danno wrote: > Xah Lee wrote: >> This page gives a visual report of computer languages's popularity, as >> indicated by their traffic level in newsgroups. This is not a >> comprehensive or fair survey, but does give some indications of >> popularity trends. >> >> http://xahlee.org/lang_traf/index.h

Re: builtin regular expressions?

2006-09-30 Thread Mirco Wahab
Thus spoke MRAB (on 2006-09-30 20:54): > Antoine De Groote wrote: >> I just have to learn accept the fact that Python is more verbose more >> often than Ruby (I don't know Perl really). > > One of the differences between the Python way and the Perl way is that > the Perl way has a side-effect: Per

Re: Native MP3 Decoder?

2006-09-30 Thread MonkeeSage
[EMAIL PROTECTED] wrote: > If anyone knows of another project like this, an alternative that I > haven't found yet, or has experience in mp3 decoding, please respond > with your thoughts. There's pymad ( http://spacepants.org/src/pymad/ ); haven't tried but it should work everywhere libmad does.

Re: Typing UTF-8 characters in IDLE

2006-09-30 Thread [EMAIL PROTECTED]
thanks, it is useful. but ,why this line "encoding = locale.getdefaultlocale()[1]" in original file"IOBinding.py " , don't work? it should be work kazuo fujimoto wrote: > Ricky, > > I found your message now, because I also would encounter the same > problem. > > > > A few unicode tutorials on

Re: loop over list and modify in place

2006-09-30 Thread James Stroud
Daniel Nogradi wrote: > Is looping over a list of objects and modifying (adding an attribute > to) each item only possible like this? > > mylist = [ obj1, obj2, obj3 ] > > for i in xrange( len( mylist ) ): >mylist[i].newattribute = 'new value' > > > I'm guessing there is a way to do this wi

Re: Mark Lutz Python interview

2006-09-30 Thread Mark Lutz
Fuzzyman wrote: > Mark Lutz wrote: > > Python author and trainer Mark Lutz will be interviewed > > on the radio show Tech Talk this Sunday, October 1st, > > at 6PM Eastern time. He'll be answering questions about > > Python, his books, and his Python training services. > > > > Does he always talk

Re: builtin regular expressions?

2006-09-30 Thread Mirco Wahab
Thus spoke Jorge Godoy (on 2006-09-30 19:04): > Mirco Wahab <[EMAIL PROTECTED]> writes: >> sub print_message { >> if (/^track="(.+?)"/ ){ print "Your track is $1\n" } >> ... > > Specially the non-greedy part. :-) I don't believe that non-greedyness would > be adequate here since I be

Re: for: else: - any practical uses for the else clause?

2006-09-30 Thread BJörn Lindqvist
> How do you transform this? > > height = 0 > for block in stack: >if block.is_marked(): >print "Lowest marked block is at height", height >break >height += block.height > else: >raise SomeError("No marked block") def get_height_of_first_marked_bock(stack): height =

Re: builtin regular expressions?

2006-09-30 Thread Thorsten Kampe
* Steve Holden (Sat, 30 Sep 2006 17:46:03 +0100) > Mirco Wahab wrote: > > Thus spoke Antoine De Groote (on 2006-09-30 11:24): > Tim Peters frequently says something along the lines of "If you have a > problem and you try to solve it with regexes, then you have TWO > problems". It's originally f

Re: Escapeism

2006-09-30 Thread Kay Schluehr
Steve Holden wrote: > Kay Schluehr wrote: > > Sybren Stuvel wrote: > > > >>Kay Schluehr enlightened us with: > >> > >>>Usually I struggle a short while with \ and either succeed or give up. > >>>Today I'm in a different mood and don't give up. So here is my > >>>question: > >>> > >>>You have an unk

Native MP3 Decoder?

2006-09-30 Thread floguy
I've been working on a simple cross-platform alarm clock application in Python. I took the time to learn wxPython for the frontend, and figured there would be some backend for decoding mp3s to play at alarm time. So far, I have found 3 viable options. 1) pyMedia, which works great, but only work

Re: builtin regular expressions?

2006-09-30 Thread MRAB
Antoine De Groote wrote: > Just to get it clear at the beginning, I started this thread. I'm not a > newbie (don't get me wrong, I don't see this as an insult whatsoever, > after all, you couldn't know, and I appreciate it being so nice to > newbies anyway). I'm not an expert either, but I'm quite

Re: storing variable names in a list before they are used?

2006-09-30 Thread John Salerno
John Salerno wrote: > Here is what I want to do more specifically: Ok, I'm sure you all get the idea by now, but here's a simpler way to look at it: Instead of first_name = wx.TextCtrl(self) last_name = wx.TextCtrl(self) job_title = wx.TextCtrl(self) etc. and subsequently: sizer.Add(first_na

Re: DAT file compilation

2006-09-30 Thread Roger Upole
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Roger Upole wrote: >> On Windows NTFS file systems, you can add data to a file using named streams. >> The extra streams aren't visible from Explorer so the average end-user won't >> even know they're there. >> > I hadn't

Re: builtin regular expressions?

2006-09-30 Thread Antoine De Groote
Jorge Godoy wrote: > Antoine De Groote <[EMAIL PROTECTED]> writes: > >> Just to get it clear at the beginning, I started this thread. I'm not a >> newbie > > Sorry :-) I got to this wrong conclusion because of the way I read your > message. no problem ;-) maybe my formulation was a bit naive,

Re: loop over list and modify in place

2006-09-30 Thread Daniel Nogradi
> Is looping over a list of objects and modifying (adding an attribute > to) each item only possible like this? > > mylist = [ obj1, obj2, obj3 ] > > for i in xrange( len( mylist ) ): > mylist[i].newattribute = 'new value' > > > I'm guessing there is a way to do this without introducing the (in

Re: Escapeism

2006-09-30 Thread Steve Holden
Kay Schluehr wrote: > Sybren Stuvel wrote: > >>Kay Schluehr enlightened us with: >> >>>Usually I struggle a short while with \ and either succeed or give up. >>>Today I'm in a different mood and don't give up. So here is my >>>question: >>> >>>You have an unknown character string c such as '\n' ,

Re: Python/UNO/OpenOffice?

2006-09-30 Thread wesley chun
as others have said, that project provides a working interface to OOo (OpenOffice 2 on Ubuntu Breezy and Dapper). i've made several posts to this regard over the summer here on CLP. i was mostly using it to "mess around" with documents in StarWriter. cheers, -- wesley - - - - - - - - - - - - - -

Re: DAT file compilation

2006-09-30 Thread Steve Holden
Roger Upole wrote: > On Windows NTFS file systems, you can add data to a file using named streams. > The extra streams aren't visible from Explorer so the average end-user won't > even know they're there. > I hadn't realised how easy it is to access alternate data streams from Python. A filename

loop over list and modify in place

2006-09-30 Thread Daniel Nogradi
Is looping over a list of objects and modifying (adding an attribute to) each item only possible like this? mylist = [ obj1, obj2, obj3 ] for i in xrange( len( mylist ) ): mylist[i].newattribute = 'new value' I'm guessing there is a way to do this without introducing the (in principle unnec

Re: creating a small test server on my local computer

2006-09-30 Thread Steve Holden
John Salerno wrote: > Ant wrote: > >>Mirco Wahab wrote: >> >>>Thus spoke John Salerno (on 2006-09-29 21:13): >> >>... >> >>>My advice would be (because Apache installations on >>>WinXP don't usually support Python (except pulling >>>the whole thing into each CGI invocation) - download >>>and insta

Re: builtin regular expressions?

2006-09-30 Thread Jorge Godoy
Antoine De Groote <[EMAIL PROTECTED]> writes: > Just to get it clear at the beginning, I started this thread. I'm not a newbie Sorry :-) I got to this wrong conclusion because of the way I read your message. > an expert either, but I'm quite comfortable with the language by now. It's > just tha

Re: The Python world tries to be polite [formerly offensive to another language]

2006-09-30 Thread A.M. Kuchling
On Sat, 30 Sep 2006 09:10:14 +0100, Steve Holden <[EMAIL PROTECTED]> wrote: > My God, Perl 6 is going to be even less comprehensible that Perl 5, > which was at least usable. Is »=>« really a Perl6 operator? That's too > funny! While we poor Python people have to cope with writing:

Re: Escapeism

2006-09-30 Thread Duncan Booth
"Kay Schluehr" <[EMAIL PROTECTED]> wrote: >> try "print repr(c)". > > This yields the hexadecimal representation of the ASCII character and > does not simply echo the keystrokes '\' and 'a' for '\a' ignoring the > escape semantics. But you yourself noted earlier that '\a' and '\x07' are the same

Re: builtin regular expressions?

2006-09-30 Thread Antoine De Groote
Just to get it clear at the beginning, I started this thread. I'm not a newbie (don't get me wrong, I don't see this as an insult whatsoever, after all, you couldn't know, and I appreciate it being so nice to newbies anyway). I'm not an expert either, but I'm quite comfortable with the language

Re: builtin regular expressions?

2006-09-30 Thread Jorge Godoy
Mirco Wahab <[EMAIL PROTECTED]> writes: > sub print_message { > if (/^track="(.+?)"/ ){ print "Your track is $1\n" } > ... > > which has a "more complicated" regex that is usually > not understood easily by newbies. Specially the non-greedy part. :-) I don't believe that non-greedyn

Re: Escapeism

2006-09-30 Thread Kay Schluehr
Sybren Stuvel wrote: > Kay Schluehr enlightened us with: > > Usually I struggle a short while with \ and either succeed or give up. > > Today I'm in a different mood and don't give up. So here is my > > question: > > > > You have an unknown character string c such as '\n' , '\a' , '\7' etc. > > > >

PyCon 2007: What talks/tutorials/panels do you want to see?

2006-09-30 Thread Brad Allen
This thread is for posting ideas and general brainstorming about what kinds of talks folks would be interested in seeing at PyCon 2007. The idea is to inspire volunteer speakers to propose talks that they might not otherwise realize would be popular, and to give PyCon organizers a whiff of fresh co

Re: MySQLdb for Python 2.5

2006-09-30 Thread Jan Dries
Martin v. Löwis wrote: > Harold Trammel schrieb: >> Does anyone know the status of a version of MySQLdb that will work with >> Python 2.5? > > AFAICT, MySQLdb 1.2.1 builds and works just fine. > Does anyone know if Windows binaries for 2.5 are available somewhere? Regards, Jan -- http://mail

Re: DAT file compilation

2006-09-30 Thread Roger Upole
On Windows NTFS file systems, you can add data to a file using named streams. The extra streams aren't visible from Explorer so the average end-user won't even know they're there. Roger "Jay" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > That cgi idea is really cool, but

Re: storing variable names in a list before they are used?

2006-09-30 Thread John Salerno
John Salerno wrote: > (the variables would store whatever information is entered in the text > boxes to the right of each label. I'm doing it this way so I can write a > loop to construct my GUI components). Thanks very much for the responses guys. I actually tried something similar with a dic

Re: does anybody earn a living programming in python?

2006-09-30 Thread Brad Allen
I'll attest that we have a shortage of Python developers in the Dallas area; in the DFW Python user group (dfwpython.org) we occasionally encounter local employers who have trouble finding local Python developers who can take on new work. Most of the group members are already employed, so the stand

Re: for: else: - any practical uses for the else clause?

2006-09-30 Thread Carl Banks
[EMAIL PROTECTED] wrote: > I'm wondering if anyone has ever found a practical use for the else > branch? Say you have code that looks like this: if command.startswith("set"): do_set_action(command) elif command.startswith("input"): do_input_action(command) elif command.startswith("print")

Re: Mark Lutz Python interview

2006-09-30 Thread John Salerno
Fuzzyman wrote: > Mark Lutz wrote: >> Python author and trainer Mark Lutz will be interviewed >> on the radio show Tech Talk this Sunday, October 1st, >> at 6PM Eastern time. He'll be answering questions about >> Python, his books, and his Python training services. >> > > Does he always talk in t

Re: creating a small test server on my local computer

2006-09-30 Thread John Salerno
Ant wrote: > Mirco Wahab wrote: >> Thus spoke John Salerno (on 2006-09-29 21:13): > ... >> My advice would be (because Apache installations on >> WinXP don't usually support Python (except pulling >> the whole thing into each CGI invocation) - download >> and install a VMWare Player > > This sound

Re: _gtk

2006-09-30 Thread Paul Boddie
[EMAIL PROTECTED] wrote: > Hello, > Where to I download module: _gtk I would suggest starting here: http://www.pygtk.org/downloads.html It looks like you need the PyGTK package. Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: windev vs python SOS

2006-09-30 Thread Amanda
> Can Windev interface with .net? YES > Can Windev interface with Java? YES > Can Windev interface natively with nearly every relational database on the > planet? YES > Does Windev interface with JMS, Java RMI, SAP RFC, mqseries and other > middleware?>> YES > Can you easily

Re: _gtk

2006-09-30 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hello, > Where to I download module: _gtk is google dead today? google: python module gtk download windows something like the fifth link. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: builtin regular expressions?

2006-09-30 Thread Mirco Wahab
Thus spoke Jorge Godoy (on 2006-09-30 17:50): > Mirco Wahab <[EMAIL PROTECTED]> writes: > > I could make it shorter in Python as well. But for a newbie that haven't seen > the docs for strings in Python I thought the terse version would be more > interesting. OK > At least he'll see that there

_gtk

2006-09-30 Thread vedran_dekovic
Hello, Where to I download module: _gtk -- http://mail.python.org/mailman/listinfo/python-list

Re: Storing records from a parsed file

2006-09-30 Thread Ben
Finally got it all sorted :-) I got slightly confused because it seems that if you refer to class variables from methods within that class you need to explicitly state that they are self, otherwise, since class variables are all public in python, things could get quite confusing. Ben Ben wrote:

Re: builtin regular expressions?

2006-09-30 Thread Jorge Godoy
Duncan Booth <[EMAIL PROTECTED]> writes: > Or you could make it even clearer by using a loop: Oops. Should have read your message before replying to Mirco. But again, since the OP didn't read the docs for string operations I tried the terse approach so that he actually sees the correspondence f

Re: builtin regular expressions?

2006-09-30 Thread Jorge Godoy
Mirco Wahab <[EMAIL PROTECTED]> writes: > I don't see the point here, this example can be > translated amost 1:1 to Perl and gets much more > readable in the end, consider: I could make it shorter in Python as well. But for a newbie that haven't seen the docs for strings in Python I thought the

Re: builtin regular expressions?

2006-09-30 Thread Steve Holden
Mirco Wahab wrote: > Thus spoke Antoine De Groote (on 2006-09-30 11:24): > > >>Can anybody tell me the reason(s) why regular expressions are not built >>into Python like it is the case with Ruby and I believe Perl? Like for >>example in the following Ruby code >>I'm sure there are good reasons,

Re: builtin regular expressions?

2006-09-30 Thread Duncan Booth
Jorge Godoy <[EMAIL PROTECTED]> wrote: > See if this isn't better to read: > > > > def print_message(some_str): > if some_str.startswith('track='): > print "Your track is", some_str[6:] > elif some_st

Re: builtin regular expressions?

2006-09-30 Thread Mirco Wahab
Thus spoke Jorge Godoy (on 2006-09-30 14:37): > Antoine De Groote <[EMAIL PROTECTED]> writes: >> I'm sure there are good reasons, but I just don't see them. >> Python Culture says: 'Explicit is better than implicit'. May it be related to >> this? > > See if this isn't better to read: > > def prin

Re: builtin regular expressions?

2006-09-30 Thread Mirco Wahab
Thus spoke Antoine De Groote (on 2006-09-30 11:24): > Can anybody tell me the reason(s) why regular expressions are not built > into Python like it is the case with Ruby and I believe Perl? Like for > example in the following Ruby code > I'm sure there are good reasons, but I just don't see them

Re: Storing records from a parsed file

2006-09-30 Thread Ben
Ah - I think I've sorted it out. I can now have data1.function() or data2.function() etc However, I can still call function() directly: function() which seems very odd Indeed. The only instances of function are within classes data1 and data2, and these definitions are different, so I don'

cx_Freeze and Python

2006-09-30 Thread BM
Hi. Does somebody used cx_Freeze, especially on Mac? I have a trouble to make *standalone* program. If I use dynamically compiled Python as it done by default, I always have an "hardcoded" URL inside the Python binary something like /usr/local/Python2.5/lib/libpython so after I freeze stuff and

Re: Storing records from a parsed file

2006-09-30 Thread Ben
Ah I see. So istead of creating the classes diectly I use a facroty class as a buffer - I tell it what I want and it makes the appropriate instances. I am not enitely sure that applies here though (I may be wrong) Currently I have: camera_list[] class camera: def __init__(self,alpha,beta,ga

  1   2   >