Re: A critique of cgi.escape

2006-09-27 Thread Georg Brandl
Anthony Baxter wrote: >> I would really rather this were a discussion than an argument. You will >> now no doubt reply telling me I wouldn't. >> >> My posting was issued as a response to the irritation engendered by your >> argumentative style of debate. Your latest response simply proves that >> t

Re: does anybody earn a living programming in python?

2006-09-27 Thread wesley chun
> From: "OKB (not okblacke)" <[EMAIL PROTECTED]> > Date: Wed, 27 Sep 2006 04:04:02 GMT > >> - at yahoo, we developed yahoo!mail in python (and some C++) >> - at synarc, i wrote software for doctors in python (and some C) >> - at ironport, most everything is in python (and some C, PyRex) > > T

Re: Makin search on the other site and getting data and writing in xml

2006-09-27 Thread Ben Finney
Steve Holden <[EMAIL PROTECTED]> writes: > Lawrence D'Oliveiro wrote: > > Steve Holden wrote: > >>The fact remains that Google can chop your searching ability off > >>at the knees ... > > No they can't. They can only chop off your ability to use Google. > > > [sigh]. Right, Lawrence, sorry I wasn

Python Lead / Developers required for a Telecom Company, Hyderabad

2006-09-27 Thread hrnetindia
World's No:1 Telecom Product Development (Billing Settlement) company urgently requires the following: Position: Team Lead / Software Engineer Skills: Essential: Python Other: Perl / XML / J2ME Experinece: 2-5 years of experience using Python. Location: Hyderabad, India Please mail the CV to

Re: One program in different GUI Toolkits

2006-09-27 Thread Franz Steinhaeusler
On Wed, 20 Sep 2006 08:27:30 +0200 (CEST), Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: >Hello NG, > >I have a suggestion. > >For simplifying learning or switching between different GUI >Toolkits, I could imagine to have one short clearly presented >program in different GUI Toolkits. > >What abo

Re: A critique of cgi.escape

2006-09-27 Thread Ben Finney
Georg Brandl <[EMAIL PROTECTED]> writes: > Anthony Baxter wrote: > >> I would really rather this were a discussion than an > >> argument. You will now no doubt reply telling me I wouldn't. > > The Complaints department is down the hall... > > Though some discussion participants seemingly want to s

Battlefield Weapon Popularity Trend (was: Computer Language Popularity Trend)

2006-09-27 Thread Mirco Wahab
Thus spoke Xah Lee (on 2006-09-27 05:03): > This page gives a visual report of computer languages's > popularity, as indicated by their traffic level in newsgroups. > ... > http://xahlee.org/lang_traf/index.html When the Samurai of medieval Japan were confronted with new 'battlefield language',

Python website bug: Wrong URL in http://www.python.org/download/releases/2.5/highlights/

2006-09-27 Thread Anand
The URL which links to "Whats New in Python 2.5" in the following text is wrong. "Here are some of the (subjective) highlights of Python 2.5. More detail on almost all of the new features can be found in the document What's New In Python 2.5" It links to http://docs.python.org/dev/whatsnew/ where

Re: QuoteSQL

2006-09-27 Thread Duncan Booth
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > def EscapeSQLWild(Str) : > """escapes MySQL pattern wildcards in Str.""" > Result = [] > for Ch in str(Str) : > if Ch == "%" or Ch == "_" : > Result.append("\\") > #end if >

RE: Starting Win32 Service

2006-09-27 Thread Tim Golden
[placid] | Using Tim Golden's wmi module you can get the service names | | import wmi | c = wmi.WMI () | stopped_services = c.Win32_Service (StartMode="Auto", State="Stopped") | if stopped_services: | for s in stopped_services: | print s.Caption, "service is not running" | else: | print "N

Re: AN Intorduction to Tkinter

2006-09-27 Thread Mikael Olofsson
The following is the answer I gave on [EMAIL PROTECTED] Perhaps Fredrik can elaborate on the status of different versions of his excellent publication. Tanner Ruschman wrote about "An Introduction to Tkinter" by Fredrik Lundh: > > When I saw that it was written > > (actually, copyrighted) in 1

Re: A critique of cgi.escape

2006-09-27 Thread Brian Quinlan
John Bokma wrote: >> Why cgi.escape should NOT be changed: >> o it is current used in lots of code and changing it will almost >>certainly break some of it, test suites at minimum e.g. >>assert my_template_system("{foo}", foo='"') == '"' > > You must be kidding. Nope. How do you write you

Re: Running Python script from C++ code(.NET)

2006-09-27 Thread Gerard Flanagan
volcano wrote: > volcano wrote: > > Hello, folks! > > A trivial question - I have a working Python script that I have to > > invoke from C++ code. No fancy stuff - just run the whole script with > > its parameters. No callbacks, no signalling - nada, just > > stupid,primitive, straightforward cal

Re: ruby %w equivalent

2006-09-27 Thread Nick Craig-Wood
MonkeeSage <[EMAIL PROTECTED]> wrote: > In ruby there are several special literal notations, just like python. > In ruby it goes like this: > > %{blah} / %Q{blah} # same as "blah" but igornes " and ' > %q{blah} # same as 'blah' but no interpolation > %w{blah blah} # same as "blah blah".split

Re: What's up with site.Quitter?

2006-09-27 Thread Georg Brandl
James Stroud wrote: > Hello All, > > Still jubilantly configuring my work environment for python 2.5, I came > accross a curiosity when writing an automatic vim syntax file creator > (so I can automatically update my syntax coloring with future python > releases). > > It seems I can find a ref

Re: Running Python script from C++ code(.NET)

2006-09-27 Thread Gerard Flanagan
volcano wrote: > volcano wrote: > > Hello, folks! > > A trivial question - I have a working Python script that I have to > > invoke from C++ code. No fancy stuff - just run the whole script with > > its parameters. No callbacks, no signalling - nada, just > > stupid,primitive, straightforward cal

What's the best way to communicate between processes?

2006-09-27 Thread awmcclain . nospam
Here's my situation: I'm writing a simple reminder bot which will IM me based on input from a web server. Right now, I have a simple AIM bot written using twisted 2 words. It logs into AIM and can send/receive messages. There's part 1. I have a django server running under mod_python through apach

Re: odbc DbiDate date conversion

2006-09-27 Thread Frank Millman
flupke wrote: > Frank Millman schreef: > > > > Well waddyaknow - I get exactly the same, for dates earlier than > > 1970-01-02. Thanks for finding a bug that would have bitten me sooner > > or later. > > > > I will do some investigation. If I find an answer I will post it here, > > unless some ki

Re: Python website bug: Wrong URL in http://www.python.org/download/releases/2.5/highlights/

2006-09-27 Thread Steve Holden
Anand wrote: > The URL which links to "Whats New in Python 2.5" in the following text > is wrong. > > "Here are some of the (subjective) highlights of Python 2.5. More > detail on almost all of the new features can be found in the document > What's New In Python 2.5" > > It links to http://docs.p

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Antoon Pardon wrote: > I need this Top value in > a context where it can be used as a start or stop value > in a slice. But the only valid values allowed for indices are 0 up to the length of the array inclusive. Larger integers are not allowed, so why should Top b

Re: Makin search on the other site and getting data and writing in xml

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Ben Finney wrote: > Steve Holden <[EMAIL PROTECTED]> writes: > >> Lawrence D'Oliveiro wrote: >> > Steve Holden wrote: >> >>The fact remains that Google can chop your searching ability off >> >>at the knees ... >> > No they can't. They can only chop off your ability

Re: QuoteSQL

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >> def EscapeSQLWild(Str) : >> """escapes MySQL pattern wildcards in Str.""" >> Result = [] >> for Ch in str(Str) : >> if Ch == "%" or Ch == "_" : >>

Re: ruby %w equivalent

2006-09-27 Thread Duncan Booth
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > In python when making __slots__ or module.__all__ you end up typing > lists of objects or methods and they turn out like this which is quite > a lot of extra typing > > __slots__ = ["method1", "method2", "method3", "method4", "method5"] > > For __

Re: Battlefield Weapon Popularity Trend (was: Computer Language Popularity Trend)

2006-09-27 Thread Ramon Diaz-Uriarte
On 9/27/06, Mirco Wahab <[EMAIL PROTECTED]> wrote: > Thus spoke Xah Lee (on 2006-09-27 05:03): > > > This page gives a visual report of computer languages's > > popularity, as indicated by their traffic level in newsgroups. > > ... > > http://xahlee.org/lang_traf/index.html > > When the Samurai of

Re: does anybody earn a living programming in python?

2006-09-27 Thread Simon Brunning
On 26 Sep 2006 13:43:24 -0700, Fuzzyman <[EMAIL PROTECTED]> wrote: > Simon Brunning is a Pythonista in his spare time but uses > Java at work. He has got Jython fairly deeply embedded though. Sure do. We also use Python for a lot of internal tools, the most complex probably being a fairly extensiv

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread John Machin
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Antoon Pardon wrote: > > > I need this Top value in > > a context where it can be used as a start or stop value > > in a slice. > > But the only valid values allowed for indices are 0 up to the length of the > array inclusive. Larger int

Re: R.S.I. solutions?

2006-09-27 Thread Eric S. Johansson
Nick Craig-Wood wrote: > This is excellent advice... I was diagnosed with tendonitis over 5 > years ago now. I found the medical people generally hopeless, but the > physios really know their stuff (this is in the UK also). some know their stuff but a vast majority of them are humming because th

Status of Router on webpage

2006-09-27 Thread Hostílio Thumbo
Hi, Anyone can help me to create this small system. I have more than 50 Cisco Routers on my network, and I am trying to display the status of them on a webpage. I want to display the status of the router on the following link http://www.x.com/test.html 1. When the serial is "up", "with li

a query on sorting

2006-09-27 Thread Satya Upadhya
Dear Friends,I am having a few issues with respect to sorting using python. I am usingPython 2.4.3 Win32 (IDLE 1.1.3).>>> x = [2,6,4]>>> x.sort()>>> x[2, 4, 6]>>> x = [2,6,4]>>> y = []>>> y = x.sort()>>> y>>> print yNoneSo the problem essentially is that i am unable to store the sortedelements of l

Re: Makin search on the other site and getting data and writing in xml

2006-09-27 Thread Steve Holden
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Ben Finney > wrote: > > >>Steve Holden <[EMAIL PROTECTED]> writes: >> >> >>>Lawrence D'Oliveiro wrote: >>> Steve Holden wrote: >The fact remains that Google can chop your searching ability off >at the knees ... >>>

Re: Starting Win32 Service

2006-09-27 Thread Gabriel Genellina
At Wednesday 27/9/2006 01:39, placid wrote: Using Tim Golden's wmi module you can get the service names but how do i start services that are stopped? Surely there are fancier ways: >net start servicename Gabriel Genellina Softlab SRL __

Re: A critique of cgi.escape

2006-09-27 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, Gabriel G wrote: > By example, I do not validate a "page". I validate that all methods > that make up pieces of a page, build them the way they should - these > are our "unit tests". Then, it's up to the templating library to join > all the pieces into the final h

Re: What's the best way to communicate between processes?

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I'm thinking about coding some sort of 'local notify server' in twisted > (basically just listening to a socket and then passing the information > to the IM bot), then connecting to it via a python socket in django and > passing some seria

Re: re.compile().split(): why it produces empty string as a first element of the list

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, alf wrote: > Fredrik Lundh wrote: >> alf wrote: >> >>> Let's run following: >>> >>> >>> re.compile('(\[.*?\])').split('[aa]bb[11]22') >>> ['', '[aa]', 'bb', '[11]', '22'] >>> >>> Why does it return '' as a first element of the list? >> >> >> because the string s

Re: Computer Language Popularity Trend

2006-09-27 Thread [EMAIL PROTECTED]
Xah Lee wrote: > Computer Language Popularity Trend > > 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.or

Re: Computer Language Popularity Trend

2006-09-27 Thread Jon Ribbens
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: >> http://xahlee.org/lang_traf/index.html > > Careful there with the sweeping generalizations and quick judgments > about languages :) I just read "PHP as a language is rather dry and business-like", and fell off my chair. -- http://mail.p

Re: A critique of cgi.escape

2006-09-27 Thread Duncan Booth
Brian Quinlan <[EMAIL PROTECTED]> wrote: > Actually, I wasn't kidding. I was basing this belief on greping through > the Python standard library where only the quote=None form is ever used. > It also matches my experience. But I don't have a large enough sample to > make any claim either way. >

Re: QuoteSQL

2006-09-27 Thread Duncan Booth
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > In message <[EMAIL PROTECTED]>, Duncan Booth > wrote: > >> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >> >>> def EscapeSQLWild(Str) : >>> """escapes MySQL pattern wildcards in Str.""" >>> Result = [] >>> for Ch in

Re: Makin search on the other site and getting data and writing in xml

2006-09-27 Thread altemurbugra
ok i close this discussion i understand everybody no problem -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >> In message <[EMAIL PROTECTED]>, Duncan Booth >> wrote: >> >>> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >>> def EscapeSQLWild(Str) : """escapes MySQL pattern wild

Re: Python/MySQL problem on Windows

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Eric Smith wrote: > I could have sworn that I got the use of connection() from published > sample code, but I must be mistaken. If all else fails, read the documentation , -- http://mail.python.org/mailman/listinfo/python-

Re: does anybody earn a living programming in python?

2006-09-27 Thread Magnus Lycka
walterbyrd wrote: > If so, I doubt there are many. Depends on what you compare with. I'm pretty sure there are thousands of people working as Python programmers, and many more using it as a smaller tool in their work. Of course this is small compared to Java or C++. In the US, it seems a lot of

Re: I need some tips to begin a simple project

2006-09-27 Thread Magnus Lycka
dutche wrote: > Hi, I'm new in Python and I'm learning with "Learning Python" oreilly's > book which is very good written and explanatory. You're not saying how new you are to programming (particularly GUI programming) in general. Python itself is probably not the tricky part here. > And I can us

Re: MySQLdb and mod_python issue (Steve Holden)

2006-09-27 Thread Alvin Delagon
Thanks for the reply. Fixing it seems a tedious task. I opted in rewriting the application to a HTTPServer and is working now. I've noticed this problem on CentOS 4 I might as well report to them the possible version conflict. -- http://mail.python.org/mailman/listinfo/python-list

Re: QuoteSQL

2006-09-27 Thread Ben
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > > > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > > > >> In message <[EMAIL PROTECTED]>, Duncan Booth > >> wrote: > >> > >>> Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>> > def EscapeSQLWild(Str)

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Peter Otten
Antoon Pardon wrote: > I had written my own module, which works similarly but > is somewhat extended. Here is an example of how it can > be used and how I would like to use it but get stuck. > > from extreme import Top Top > Top Top + 1 > Top Top - 30 > Top Top > 1e99 > True >

Re: What's up with site.Quitter?

2006-09-27 Thread James Stroud
Fredrik Lundh wrote: > James Stroud wrote: > >> Yes, but I was speaking more consistency than convenience (see above >> for what I mean by consistency). > > why would having access to a type object for exit/quit help you do > proper syntax coloring, btw? if you want to generate a syntax table,

Re: Battlefield Weapon Popularity Trend

2006-09-27 Thread Mirco Wahab
Thus spoke Ramon Diaz-Uriarte (on 2006-09-27 11:01): >> When the Samurai of medieval Japan were confronted >> with new 'battlefield language', e.g. early Shotguns, >> they resisted because one could push any peasant > > shouldn't this be "they [the Samurai] did not resist"? The "resisted" believ

Re: What's up with site.Quitter?

2006-09-27 Thread skip
Georg> Not really, but what would you do with it? It's an internal Georg> object used for only exit() and quit(), and of no real use Georg> elsewhere. In fact, I would argue that objects placed in builtins as a convenience in inteactive mode shouldn't be colorized at all (dir, help,

Re: What's up with site.Quitter?

2006-09-27 Thread James Stroud
Georg Brandl wrote: > James Stroud wrote: >> Hello All, >> >> Still jubilantly configuring my work environment for python 2.5, I >> came accross a curiosity when writing an automatic vim syntax file >> creator (so I can automatically update my syntax coloring with future >> python releases). >>

Re: One program in different GUI Toolkits

2006-09-27 Thread Paul Boddie
Franz Steinhaeusler wrote: > > What about a small text editor using the scintilla control? > It should be available for Pythoncard, wxPython, pygtk and pyQt > (qtscintilla). > With a small find dialog, open, save should be enough for the beginning. You might be interested in this page: http://wik

Re: Battlefield Weapon Popularity Trend

2006-09-27 Thread Ramon Diaz-Uriarte
On 9/27/06, Mirco Wahab <[EMAIL PROTECTED]> wrote: > Thus spoke Ramon Diaz-Uriarte (on 2006-09-27 11:01): > > >> When the Samurai of medieval Japan were confronted > >> with new 'battlefield language', e.g. early Shotguns, > >> they resisted because one could push any peasant > > > > shouldn't this

Re: does anybody earn a living programming in python?

2006-09-27 Thread Jeff Hagen
I do... but then I'm a grad student so I'm not sure what extent you would call it "a living" I know that Python is used __extensively__ in academia for running experiments where speed is not important. -Jeff Magnus Lycka wrote: > walterbyrd wrote: >> If so, I doubt there are many -- http://ma

Re: ruby %w equivalent

2006-09-27 Thread Piet van Oostrum
> hg <[EMAIL PROTECTED]> (A) wrote: >A> Antoine De Groote wrote: >>> Hi everybody, >>> >>> is there a python equivalent for the ruby %w operator? >>> %w{a b c} creates an array with strings "a", "b", and "c" in ruby... >>> >>> Thanks a lot >>> Regards, >>> antoine >A> Why would they want to

Re: What's up with site.Quitter?

2006-09-27 Thread skip
James> But then again, maybe the consistency I perceive for the rest of James> __builtins__ is more or less illusory. This might have been the James> point of Fredrik's question. As I implied in my note, there is a difference between fundamental builtins like open and Exception, and c

Re: QuoteSQL

2006-09-27 Thread Duncan Booth
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >> You are still missing the point. I'm not talking about generating a >> MySQL string literal, I'm talking about preventing wildcards >> characters having their special meaning when using the string as a >> parameter in cursor.execute. > > But that'

Re: Computer Language Popularity Trend

2006-09-27 Thread James Stroud
[EMAIL PROTECTED] wrote: > Xah Lee wrote: >> Computer Language Popularity Trend >> >> 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 >> popular

Re: What's up with site.Quitter?

2006-09-27 Thread James Stroud
[EMAIL PROTECTED] wrote: > James> But then again, maybe the consistency I perceive for the rest of > James> __builtins__ is more or less illusory. This might have been the > James> point of Fredrik's question. > > As I implied in my note, there is a difference between fundamental built

Re: Replace single character at given position

2006-09-27 Thread Magnus Lycka
Larry Bates wrote: >> How do I replace a single character in a string at a given position? You can't. Strings can't be mutated in Python how ever hard you try. The string type is immutable. (Of course, I suspect you can write a horrible C extension that would help you cheat. Yuk!) You need to cre

Re: One program in different GUI Toolkits

2006-09-27 Thread Franz Steinhaeusler
On 27 Sep 2006 03:42:17 -0700, "Paul Boddie" <[EMAIL PROTECTED]> wrote: >Franz Steinhaeusler wrote: >> >> What about a small text editor using the scintilla control? >> It should be available for Pythoncard, wxPython, pygtk and pyQt >> (qtscintilla). >> With a small find dialog, open, save should

Re: iterator question

2006-09-27 Thread Neal Becker
George Sakkis wrote: > [EMAIL PROTECTED] wrote: > >> def transform(seq, size): >> i = 0 >> while i < len(seq): >> yield tuple(seq[i:i+size]) >> i += size > > Or for arbitrary iterables, not just sequences: > > from itertools import islice > def transform(iterable, size):

Re: QuoteSQL

2006-09-27 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Duncan Booth wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > >>> You are still missing the point. I'm not talking about generating a >>> MySQL string literal, I'm talking about preventing wildcards >>> characters having their special meaning when using th

Re: What's the best way to communicate between processes?

2006-09-27 Thread grahamd
[EMAIL PROTECTED] wrote: > I'm thinking about coding some sort of 'local notify server' in twisted > (basically just listening to a socket and then passing the information > to the IM bot), then connecting to it via a python socket in django and > passing some serialized/pickled data. Use the XML-

Re: a query on sorting

2006-09-27 Thread Steve Holden
Satya Upadhya wrote: > Dear Friends, > I am having a few issues with respect to sorting using python. I am using > Python 2.4.3 Win32 (IDLE 1.1.3). > x = [2,6,4] x.sort() x > [2, 4, 6] x = [2,6,4] y = [] y = x.sort() y print y > None > > So the problem esse

Re: QuoteSQL

2006-09-27 Thread Duncan Booth
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > I'm assuming you mean, how would you get from a Python expression to a > MySQL clause that looks like > > name like "%%%" > > (wildcard % followed by literal backslash \\ followed by literal > percent \% followed by wildcard %.) That's eas

Re: odbc DbiDate date conversion

2006-09-27 Thread flupke
Frank Millman schreef: > Not that I know of. The results of my investigations so far seem to > indicate that we have a problem :-( > > Here is a link to an article dated 1998 - > https://svn.python.org/www/trunk/pydotorg/windows/OdbcHints.html > > Among other interesting stuff, it states -

Re: IDLE - Customizing output format

2006-09-27 Thread Ilias Lazaridis
James Stroud wrote: > Ilias Lazaridis wrote: ... > Well, for example, the output (I'm indenting manually for visual clarity): > > >>> print 'bob' > : bob > >>> print [i for i in xrange(3)] > : [0, 1, 2] > > > Would create the following selection in "doctest" mode (again

Re: Computer Language Popularity Trend

2006-09-27 Thread cartercc
I, too, attempt to track the popularity of computer languages, but I like to look at the job boards. My theory is that the number of employers looking for particular skills indicates the relative popularity of the language. This is a somewhat crude measure, particularly with Microsoft technologies

Re: does anybody earn a living programming in python?

2006-09-27 Thread codefire
Mike C. Fletcher wrote: > Job security and easy availability is not the be-all and end-all of > happiness in life. That said, if you know anyone who "just wants a > job", please, push them at Java, someone has to spend the next 30 > years maintaining the Struts and J*EE sites peop

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Antoon Pardon
On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: > >> I had written my own module, which works similarly but >> is somewhat extended. Here is an example of how it can >> be used and how I would like to use it but get stuck. >> >> from extreme import Top > Top >> Top

baffling sql string

2006-09-27 Thread DarkBlue
Following is a code snippet from a pythoncard app the problem is with the sql string called iq1 If either mysubject or mytalktext contains an apostrophe the update fails : Example: mysubject="Let's Eat" this fails mysubject="Lets Eat" this works fine What options do I have to avoid th

Re: How to apply text changes to HTML, keeping it intact if inside "a" tags

2006-09-27 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hello, > > I have HTML input to which I apply some changes. > > Feature 1: > === > I want to tranform all the text, but if the text is inside > an "a href" tag, I want to leave the text as it is. > > The HTML is not necessarily well-formed, so > I would like to do

Re: ruby %w equivalent

2006-09-27 Thread Antoine De Groote
Thorsten Kampe wrote: > * Antoine De Groote (Tue, 26 Sep 2006 12:06:38 +0200) >> Thorsten Kampe wrote: >>> * John Machin (24 Sep 2006 15:32:20 -0700) Antoine De Groote wrote: > is there a python equivalent for the ruby %w operator? > %w{a b c} creates an array with strings "a", "b", an

Re: IDLE - Customizing output format

2006-09-27 Thread Ilias Lazaridis
Gabriel Genellina wrote: > At Tuesday 26/9/2006 15:29, Ilias Lazaridis wrote: > > > > >>> def f(obj): > > > print '' + repr(obj) > > > > > > >>> sys.displayhook = f > > > >I've placed this code within /Lib/sitecustomize.py, but have one > >strange result: ... > > >>> t.sayHello() > >Hel

Re: baffling sql string

2006-09-27 Thread Duncan Booth
DarkBlue <[EMAIL PROTECTED]> wrote: > iq1="update MSGTALK set msgdate='NOW',subject='%s',talktext='%s' where > msgno= %d " % (mysubject,mytalktext,mymsgno) > try: >self.cur.execute(iq1) Use parameterised queries and get rid of the quotes in the SQL: iq1="update MSGTALK set msgdate='NOW',sub

Re: does anybody earn a living programming in python?

2006-09-27 Thread GHUM
walterbyrd, Answer: Yes. Definitely. And, to be correct, there are some who earn a rather comfortable living programming in Python. > If so, I doubt there are many. depending on your definition of "many". if "many" is something around "1% of population of earth", you are right. If "many" is "mo

Re: baffling sql string

2006-09-27 Thread skip
DarkBlue> Following is a code snippet from a pythoncard app DarkBlue> the problem is with the sql string called iq1 DarkBlue> If either mysubject or mytalktext contains an DarkBlue> apostrophe the update fails : DarkBlue> Example: mysubject="Let's Eat" this fails DarkBlue

Re: baffling sql string

2006-09-27 Thread Paul Boddie
DarkBlue wrote: > > Example: mysubject="Let's Eat" this fails > mysubject="Lets Eat" this works fine > > What options do I have to avoid this issue but still > can use apostrophes in my input data ? Use proper "bind parameters" or "bind variables" when executing the statement, rather t

Re: baffling sql string

2006-09-27 Thread John Machin
DarkBlue wrote: > Following is a code snippet from a pythoncard app > the problem is with the sql string called iq1 > If either mysubject or mytalktext contains an > apostrophe the update fails : > Example: mysubject="Let's Eat" this fails > mysubject="Lets Eat" this works fine > > What

Re: baffling sql string

2006-09-27 Thread DarkBlue
Duncan Booth wrote: > ... > > depending on your actual database you might need to use something other > than %s to specify the parameters. Check out 'paramstyle' for your > database connection. Thank you all for prompt suggestions I am using firebird 1.5.3 with kinterbasdb Db -- http://mail.p

Re: a different question: can you earn a living with *just* python?

2006-09-27 Thread Roy Smith
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > SQL I don't class as a programming language, but it's certainly worth > learning for most modern programmers. I suppose it's not a *programming* language in the sense that it's not Turning Complete, but it *is* a language, with a complex syntax.

Re: identifying new not inherited methods

2006-09-27 Thread John Roth
[EMAIL PROTECTED] wrote: > Hi, > > I am writing a library in which I need to find the names of methods > which are implemented in a class, rather than inherited from another > class. To explain more, and to find if there is another way of doing > it, here is what I want to do: I am defining two cl

Re: a query on sorting

2006-09-27 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >>> [x for x in enumerate(a)] [(0, 9), (1, 4), (2, 3), (3, 5), (4, 2), (5, 6), (6, 7), (7, 1), (8, 2)] Just curious, Steve, but why do this list comprehension when: list(enumerate(a)) works just as well? In the in

Re: does anybody earn a living programming in python?

2006-09-27 Thread Steven D'Aprano
On Tue, 26 Sep 2006 22:00:55 +1000, Anthony Baxter wrote: > This seems to be a very, very silly original post. I know of plenty of > people who make a living programming Python. It's been the vast > majority of the programming (for money) I've done in the last ten > years, and there's countless ot

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Paul McGuire
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >> >>> I had written my own module, which works similarly but >>> is somewhat extended. Here is an example of how it can >>> be used and how I

Re: does anybody earn a living programming in python?

2006-09-27 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Tue, 26 Sep 2006 22:00:55 +1000, Anthony Baxter wrote: > > > This seems to be a very, very silly original post. I know of plenty of > > people who make a living programming Python. It's been the vast > > majority of

Re: iterator question

2006-09-27 Thread [EMAIL PROTECTED]
Simple list comprehension? >>> l = [1,2,3,4,5,6,7,8,9,0] >>> [(x, x+1) for x in l if x%2 == 1] [(1, 2), (3, 4), (5, 6), (7, 8), (9, 10)] Danny Neal Becker wrote: > George Sakkis wrote: > > > [EMAIL PROTECTED] wrote: > > > >> def transform(seq, size): > >> i = 0 > >> while i < len(seq): >

How to change menu text with Tkinter?

2006-09-27 Thread Phil Schmidt
I am making a little Tkinter GUI app that needs to be in several languages (english, french, etc.), adjustable at runtime via a menu pick to select the language. The only way I can see to change text in the menus entries is to destroy them and recreate them usiing different labels. This seems very

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Paul McGuire
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >> >>> I had written my own module, which works similarly but >>> is somewhat extended. Here is an example of how it can >>> be used and how I

Re: f2py on windows tutorials

2006-09-27 Thread Flavio
Ok, I tried that and it seems we are making progress so here is my command: python setup.py build_ext --compiler=mingw32 --fcompiler=gnu Now it is complaining about my pyf!! error: unknown file type '.pyf' here is my setup .py: import setuptools, os from numpy.distutils.core import setup, Ex

Re: iterator question

2006-09-27 Thread [EMAIL PROTECTED]
Er, whoops. That would work if the last item in the list was 10 (and, of course, this doesn't work for any arbitrary sequence). Is there any "look-ahead" function for list comprehensions? Danny [EMAIL PROTECTED] wrote: > Simple list comprehension? > > >>> l = [1,2,3,4,5,6,7,8,9,0] > >>> [(x, x+

Re: How to change menu text with Tkinter?

2006-09-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Phil Schmidt wrote: > I am making a little Tkinter GUI app that needs to be in several > languages (english, french, etc.), adjustable at runtime via a menu > pick to select the language. The only way I can see to change text in > the menus entries is to destroy them and re

Re: a different question: can you earn a living with *just* python?

2006-09-27 Thread John Salerno
[EMAIL PROTECTED] wrote: > Yes, and making sure that the first several you learn are disparate in > their common idioms and programming models is incredibly worthwile to > your development as a programmer IMO. You're right about that. While I'm definitely no expert in it, I did start learning C#

Re: 2.5 updates for syntax file

2006-09-27 Thread John Salerno
Fuzzyman wrote: >> Who is using FAR and isn't happy ? > > What is FAR ? I'm glad I'm not the only one who doesn't know :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to change menu text with Tkinter?

2006-09-27 Thread Rob Wolfe
Phil Schmidt wrote: > I am making a little Tkinter GUI app that needs to be in several > languages (english, french, etc.), adjustable at runtime via a menu > pick to select the language. The only way I can see to change text in > the menus entries is to destroy them and recreate them usiing diffe

Re: How to change menu text with Tkinter?

2006-09-27 Thread Eric Brunel
On Wed, 27 Sep 2006 15:29:32 +0200, Phil Schmidt <[EMAIL PROTECTED]> wrote: > I am making a little Tkinter GUI app that needs to be in several > languages (english, french, etc.), adjustable at runtime via a menu > pick to select the language. The only way I can see to change text in > the menus

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Sion Arrowsmith
Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: >In message <[EMAIL PROTECTED]>, Antoon Pardon wrote: >> I need this Top value in >> a context where it can be used as a start or stop value >> in a slice. >But the only valid values allowed for indices are 0 >>> range(5)[:-1] [0, 1, 2, 3] > up to

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

2006-09-27 Thread Ben Sizer
[EMAIL PROTECTED] wrote: > metaperl> I'm wondering if anyone has ever found a practical use for the > metaperl> else branch? > > Yeah, I use it from time to time: > > for foo in bar: > if foo matches some condition: > print "sail to tahiti!" > break > els

Re: does anybody earn a living programming in python?

2006-09-27 Thread Steven D'Aprano
On Wed, 27 Sep 2006 09:17:28 -0400, Roy Smith wrote: > In article > <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> On Tue, 26 Sep 2006 22:00:55 +1000, Anthony Baxter wrote: >> >> > This seems to be a very, very silly original post. I know of plenty of >> > people who ma

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Antoon Pardon
On 2006-09-27, Paul McGuire <[EMAIL PROTECTED]> wrote: > "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: >>> Antoon Pardon wrote: >>> I had written my own module, which works similarly but is somewhat

  1   2   3   >