Re: Why ELIF?

2009-10-11 Thread Erik Max Francis
metal wrote: I wonder the reason for ELIF. it's not aligned with IF, make code ugly IMHO OR maybe better? if foo == bar: ... or foo == baz: ... or foo == bra: ... else: ... Because that's uglier. `or` means something completely unrelated in expressions. Vari

Re: organizing your scripts, with plenty of re-use

2009-10-11 Thread Steven D'Aprano
On Sat, 10 Oct 2009 13:44:18 -0300, Gabriel Genellina wrote: >>> The frustrating thing, for me, is that all these requirements are met >>> if you leave the scripts in jumbled into a flat directory. >> >> I bet that's not true. I bet that they Just Work only if the user cd's >> into the directory f

ANN: yappi 0.1 beta : Yet Another Python Profiler

2009-10-11 Thread Sümer Cip
Hi all, After implementing a game server on which 100k people playing games per-day, it turns out to be that continuous and efficient profiling is key to improve an long-running applications like these. With this idea in mind, I am motivated to write a profiler. I am not a Python expert or even cl

Re: The rap against "while True:" loops

2009-10-11 Thread Steven D'Aprano
On Sat, 10 Oct 2009 20:15:21 +, kj wrote: > I use "while True"-loops often, and intend to continue doing this "while > True", but I'm curious to know: how widespread is the injunction against > such loops? Has it reached the status of "best practice"? Such an injunction probably made more se

Re: Why ELIF?

2009-10-11 Thread Steven D'Aprano
On Sat, 10 Oct 2009 23:47:38 -0700, metal wrote: > I wonder the reason for ELIF. it's not aligned with IF, make code ugly > IMHO > > OR maybe better? > > if foo == bar: > ... > or foo == baz: > ... > or foo == bra: > ... > else: > ... `or` has another meaning in Python,

Re: Script to complete web form fields

2009-10-11 Thread ryles
On Oct 10, 9:39 pm, Feyo wrote: > How can I use Python to complete web form fields automatically? My > work web-based email time-out is like 15 seconds. Every time I need to > access my calendar, address book, or email, I have to type in my > username and password. I'm just tired of it. > > I foun

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-11 Thread ryles
On Oct 10, 7:36 pm, Stef Mientki wrote: > hello, > > I always thought code in a module was only executed once, > but doesn't seem to be true. > > I'm using Python 2.5. > > And this is the example: > > == A.py == > My_List = [] > > == B.py == > from A import * > My_List.append ( 3 ) > print 'B', My

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-11 Thread Stef Mientki
thanks very much Stephen, This is the first time I become aware of the difference between script and module !! Starting with the wrong book "Learning Python" second edition, from Lutz and Ascher, based on Python 2.3" in combination with using Python only from a high level IDE (PyScripter), (ne

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-11 Thread Dave Angel
(please don't top-post. Put your reply *after* the message you're quoting.) Stef Mientki wrote: thanks very much Stephen, This is the first time I become aware of the difference between script and module !! Starting with the wrong book "Learning Python" second edition, from Lutz and Ascher,

Re: python performance on Solaris

2009-10-11 Thread Antoine Pitrou
inaf gmail.com> writes: > > My code seem to > return lookups from a in memory data structure I build combining bunch > of dictionaries and lists 6-8 times faster on a 32 bit Linux box than > on a Solaris zone. Well, if your workload is CPU-bound, the issue here is not really Solaris vs. Linux bu

Re: mxDateTime history (Re: mktime, how to handle dates before 01-01-1970 ?)

2009-10-11 Thread Rhodri James
On Fri, 09 Oct 2009 13:39:43 +0100, Tim Chase wrote: Month arithmetic is a bit of a mess, since it's not clear how to map e.g. Jan 31 + one month. "Jan 31 + one month" usually means "add one to the month value and then keep backing off the day if you get an exception making the date", so

Re: Script to complete web form fields

2009-10-11 Thread Diez B. Roggisch
Feyo schrieb: How can I use Python to complete web form fields automatically? My work web-based email time-out is like 15 seconds. Every time I need to access my calendar, address book, or email, I have to type in my username and password. I'm just tired of it. I found the ClientForm module and

Writing to function arguments during execution

2009-10-11 Thread John O'Hagan
I'm writing a (music-generating) program incorporating a generator function which takes dictionaries as its arguments. I want to be able to change the values of the arguments while the program is running. I have it working as in this toy example (python 2.5): from sys import argv from threadin

Re: except KeyError: print("this was not a key error?")

2009-10-11 Thread gert
On Oct 11, 7:48 am, Michel Alexandre Salim wrote: > On Oct 10, 7:59 pm, gert wrote: > > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi > > > I screwed up some sql statement > > > INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW'))", > > (v['pid']),s.UID)

interfacing python & haskell code with ctypes on linux

2009-10-11 Thread Alia Khouri
Hi Folks, Just in case anyone is interested, I've just added a very simple example for linux showing how to access haskell functions from python code using ctypes. It's on the wiki: http://wiki.python.org/moin/PythonVsHaskell AK -- http://mail.python.org/mailman/listinfo/python-list

Re: strange behaviour when inheriting from tuple

2009-10-11 Thread metal
On 10月11日, 下午5时30分, ryles wrote: > On Oct 11, 3:04 am, metal wrote: > > > > > Environment: > > > PythonWin 2.5.4 (r254:67916, Apr 27 2009, 15:41:14) [MSC v.1310 32 bit > > (Intel)] on win32. > > Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' > > for further copyright infor

Re: Writing to function arguments during execution

2009-10-11 Thread Rhodri James
On Sun, 11 Oct 2009 14:18:25 +0100, John O'Hagan wrote: Now I can change the output of the "work" function while it's running via raw_input(). However it's very crude, not least because the terminal echo of the new options is interspersed with the output of the program. In future I hope t

Re: The rap against "while True:" loops

2009-10-11 Thread Grant Edwards
On 2009-10-11, Hendrik van Rooyen wrote: > > It is often necessary, in long running applications, to set up > loops that you would really like to run until the end of time. > - the equivalent of a "serve forever" construct. Then while > True is the obvious way to spell it. Once upon a time I was

Re: Why ELIF?

2009-10-11 Thread Grant Edwards
On 2009-10-11, metal wrote: > I wonder the reason for ELIF. it's not aligned with IF, make code ugly It most certainly is aligned with IF: if cond1: do this elif cond2: do that else: do the other The "if" "elif" and "else" are all aligned in all of the code I've ever s

Re: Why ELIF?

2009-10-11 Thread TerryP
On Oct 11, 7:07 am, Erik Max Francis wrote: > Because that's uglier.  `or` means something completely unrelated in > expressions.  Variations of `else if` in `if ... else if ...` chains is > routine in computer languages.  Choosing a deliberately different syntax > just for the sake it of is obtus

run exe and create exe

2009-10-11 Thread daved170
Hi everybody, I have 2 questions: 1) I created my python application. It has QT Gui. How can I make exe of it? I don't want everytime I run the file it'll open the command line window which does nothing. 2) My Application suppose to be a client server app. Anyhow, for now It's running only on loca

Re: Why ELIF?

2009-10-11 Thread Esmail
Steven D'Aprano wrote: By the way, if you're testing a single name against a series of alternatives, it is often better to look up the value in a dictionary: table = {bar: 23, baz: 42, boop: 73, beep: 124} value = table[foo] instead of: if foo == bar: value = 23 elif foo == baz: val

Re: Why ELIF?

2009-10-11 Thread MRAB
Grant Edwards wrote: On 2009-10-11, metal wrote: I wonder the reason for ELIF. it's not aligned with IF, make code ugly It most certainly is aligned with IF: if cond1: do this elif cond2: do that else: do the other The "if" "elif" and "else" are all aligned in all

Re: run exe and create exe

2009-10-11 Thread r
On Oct 11, 10:15 am, daved170 wrote: > Hi everybody, > I have 2 questions: > 1) I created my python application. It has QT Gui. How can I make exe > of it? I don't want everytime I run the file it'll open the command > line window which does nothing. If you want to run your script without the com

Re: mxDateTime history (Re: mktime, how to handle dates before 01-01-1970 ?)

2009-10-11 Thread MRAB
Rhodri James wrote: On Fri, 09 Oct 2009 13:39:43 +0100, Tim Chase wrote: Month arithmetic is a bit of a mess, since it's not clear how to map e.g. Jan 31 + one month. "Jan 31 + one month" usually means "add one to the month value and then keep backing off the day if you get an exception ma

Re: run exe and create exe

2009-10-11 Thread MRAB
daved170 wrote: Hi everybody, I have 2 questions: 1) I created my python application. It has QT Gui. How can I make exe of it? I don't want everytime I run the file it'll open the command line window which does nothing. 2) My Application suppose to be a client server app. Anyhow, for now It's ru

Re: The rap against "while True:" loops

2009-10-11 Thread Gabriel Genellina
En Sat, 10 Oct 2009 19:32:25 -0300, Björn Lindqvist escribió: I have many times screwed up "while True"-loops. When I thought I had a safe exit condition which turned out to be never reached in some rare corner cases. Leading to weird bugs with hanging threads. I have seen colleges screw up i

Re: Persistent Distributed Objects

2009-10-11 Thread John Haggerty
Does pyro work inside of stackless? On Sat, Oct 10, 2009 at 9:54 AM, Simon Forman wrote: > On Fri, Oct 9, 2009 at 1:11 AM, John Haggerty wrote: > > I am interested in seeing how it would be possible in python to have > > persistent objects (basically be able to save objects midway through a > >

Re: code in a module is executed twice (cyclic import problems) ?

2009-10-11 Thread Stephen Fairchild
ryles wrote: >> I always thought code in a module was only executed once, >> but doesn't seem to be true. >> >> I'm using Python 2.5. >> >> And this is the example: >> >> == A.py == >> My_List = [] >> >> == B.py == >> from A import * >> My_List.append ( 3 ) >> print 'B', My_List >> import C >> >>

Re: postprocessing in os.walk

2009-10-11 Thread jordilin
Well, you could use the alternative os.path.walk instead. You can pass a callback as a parameter, which will be invoked every time you bump into a new directory. The signature is os.path.walk (path,visit,arg). Take a look at the python library documentation. On 11 Oct, 00:12, kj wrote: > Perl's

getting equal behavior for scripts and modules ?

2009-10-11 Thread Stef Mientki
hello, I do agree that circular references should preferable be avoided. In languages like Delphi, you get an error message, trying to use circular references, but solving them in large programs with a lot of history can be very painful. Now I finally (after 2 years) knowing there's a differ

Re: getting equal behavior for scripts and modules ?

2009-10-11 Thread Stephen Hansen
On Sun, Oct 11, 2009 at 10:50 AM, Stef Mientki wrote: [...] > In languages like Delphi, you get an error message, trying to use circular > references, > but solving them in large programs with a lot of history can be very > painful. > [...] > === solution 1 === Inserting a launcher into the IDE

Re: A new Internet-search website written in Python

2009-10-11 Thread hrg...@gmail.com
On 10/10/09, John Nagle wrote: > hrg...@gmail.com wrote: >> The purpose of this email is to inform the Python-list mailing-list >> subscribers of an Internet-search website that is run by software >> written in Python. > > All the site seems to do is frame the results from other search engines

Re: Why ELIF?

2009-10-11 Thread TerryP
On Oct 11, 3:42 pm, Esmail wrote: > cool .. I hadn't seen that. Not working quite at the 'pythonic' level yet > I am not sure I think it's more readable that the if statement. Also, curious > if the dictionary approach is more efficient. > Somehow I doubt that "Look up X in dictionary D" could ev

Re: getting equal behavior for scripts and modules ?

2009-10-11 Thread Gabriel Genellina
En Sun, 11 Oct 2009 14:50:31 -0300, Stef Mientki escribió: I do agree that circular references should preferable be avoided. In languages like Delphi, you get an error message, trying to use circular references, but solving them in large programs with a lot of history can be very painful

Re: Why ELIF?

2009-10-11 Thread Simon Forman
On Sun, Oct 11, 2009 at 2:15 PM, TerryP wrote: > On Oct 11, 3:42 pm, Esmail wrote: >> cool .. I hadn't seen that. Not working quite at the 'pythonic' level yet >> I am not sure I think it's more readable that the if statement. Also, curious >> if the dictionary approach is more efficient. >> > >

Re: Persistent Distributed Objects

2009-10-11 Thread Simon Forman
On Sun, Oct 11, 2009 at 12:46 PM, John Haggerty wrote: > Does pyro work inside of stackless? I have no idea, but you wouldn't need both. Only one or the other. ~Simon > On Sat, Oct 10, 2009 at 9:54 AM, Simon Forman wrote: >> >> On Fri, Oct 9, 2009 at 1:11 AM, John Haggerty wrote: >> > I am

Re: run exe and create exe

2009-10-11 Thread Benjamin Kaplan
On Sun, Oct 11, 2009 at 11:15 AM, daved170 wrote: > > Hi everybody, > I have 2 questions: > 1) I created my python application. It has QT Gui. How can I make exe > of it? I don't want everytime I run the file it'll open the command > line window which does nothing. > Two things about this.. One,

Re: Why ELIF?

2009-10-11 Thread Mick Krippendorf
TerryP schrieb: > Note: let Commands be a dictionary, such that { "ham" : ..., > "spam" : ..., "eggs" : ... }. > > args = re.split('\s', line) > cmd = args.pop(0) > > if cmd in Commands: > Commands[cmd](args) > else: > raise SyntaxWarning("Syntax error in above program") > >

Re: Why ELIF?

2009-10-11 Thread MRAB
Simon Forman wrote: [snip] I'll often do that this way: args = re.split('\s', line) This has the same result, but is shorter and quicker: args = line.split() -- http://mail.python.org/mailman/listinfo/python-list

Re: datetime.datetime. or datetime. ?

2009-10-11 Thread niklasr
On Oct 10, 8:43 pm, Carl Banks wrote: > On Oct 10, 2:26 am, niklasr wrote: > > > > > On Oct 8, 10:17 pm, Carl Banks wrote: > > > > On Oct 8, 3:11 pm, niklasr wrote: > > > > > On Oct 8, 5:25 pm, "Diez B. Roggisch" wrote: > > > > > > NiklasRTZ schrieb: > > > > > > > Hello, my basic question is w

Re: getting equal behavior for scripts and modules ?

2009-10-11 Thread Stef Mientki
Stephen Hansen wrote: On Sun, Oct 11, 2009 at 10:50 AM, Stef Mientki > wrote: [...] In languages like Delphi, you get an error message, trying to use circular references, but solving them in large programs with a lot of history can be very painf

"Error en el bus" from python

2009-10-11 Thread Yusniel
Hi. I did installed a library for python named pyswip-0.2.2 but when I run a python example with the next lines, the python interpreter, it throw me the following error: "Error en el bus". The code lines are: from pyswip.prolog import Prolog from pyswip.easy import getList, registerForeign N = 3

Re: getting equal behavior for scripts and modules ?

2009-10-11 Thread Stef Mientki
Gabriel Genellina wrote: En Sun, 11 Oct 2009 14:50:31 -0300, Stef Mientki escribió: I do agree that circular references should preferable be avoided. In languages like Delphi, you get an error message, trying to use circular references, but solving them in large programs with a lot of histo

Re: Why ELIF?

2009-10-11 Thread Steven D'Aprano
On Sun, 11 Oct 2009 11:15:06 -0700, TerryP wrote: > On Oct 11, 3:42 pm, Esmail wrote: >> cool .. I hadn't seen that. Not working quite at the 'pythonic' level >> yet I am not sure I think it's more readable that the if statement. >> Also, curious if the dictionary approach is more efficient. >> >

Re: The rap against "while True:" loops

2009-10-11 Thread bartc
Mensanator wrote: On Oct 10, 3:15�pm, kj wrote: I'm coaching a group of biologists on basic Python scripting. �One of my charges mentioned that he had come across the advice never to use loops beginning with "while True". �Of course, that's one way to start an infinite loop, but this seems hard

Re: Why ELIF?

2009-10-11 Thread Carl Banks
On Oct 11, 7:10 am, Grant Edwards wrote: > On 2009-10-11, metal wrote: > > > I wonder the reason for ELIF. it's not aligned with IF, make code ugly > > It most certainly is aligned with IF: > >   if cond1: >       do this >   elif cond2: >       do that >   else: >       do the other > > The "if"

Re: getting equal behavior for scripts and modules ?

2009-10-11 Thread Steven D'Aprano
On Sun, 11 Oct 2009 19:50:31 +0200, Stef Mientki wrote: > Now I finally (after 2 years) knowing there's a difference between > modules and scripts, > I want to guarantee that I always get the same functional behavior. You are confused. Scripts *are* modules. What makes a script a script is that

Re: "Error en el bus" from python

2009-10-11 Thread Steven D'Aprano
On Sun, 11 Oct 2009 13:45:54 -0700, Yusniel wrote: > Hi. I did installed a library for python named pyswip-0.2.2 but when I > run a python example with the next lines, the python interpreter, it > throw me the following error: "Error en el bus". ... > where "hanoy.pl" is a program with python cod

Re: The rap against "while True:" loops

2009-10-11 Thread Mensanator
On Oct 11, 4:51�pm, "bartc" wrote: > Mensanator wrote: > > On Oct 10, 3:15 pm, kj wrote: > >> I'm coaching a group of biologists on basic Python scripting. One > >> of my charges mentioned that he had come across the advice never > >> to use loops beginning with "while True". Of course, that's on

Re: The rap against "while True:" loops

2009-10-11 Thread Philip Semanchuk
On Oct 11, 2009, at 5:51 PM, bartc wrote: Mensanator wrote: On Oct 10, 3:15�pm, kj wrote: I'm coaching a group of biologists on basic Python scripting. �One of my charges mentioned that he had come across the advice never to use loops beginning with "while True". �Of course, that's one way t

What do I do now?

2009-10-11 Thread Someone Something
I've been programming since about 3 years, and come to think of it never written anything large. I know a few languages: c, python, perl, java. Right now, I just write little IRC bots that basically don't do anything. I have two questions: 1) What should I start programming (project that takes 1-

Re: Why ELIF?

2009-10-11 Thread Mensanator
On Oct 11, 5:05�pm, Carl Banks wrote: > On Oct 11, 7:10�am, Grant Edwards wrote: > > > On 2009-10-11, metal wrote: > > > > I wonder the reason for ELIF. it's not aligned with IF, make code ugly > > > It most certainly is aligned with IF: > > > � if cond1: > > � � � do this > > � elif cond2: > >

Re: Why ELIF?

2009-10-11 Thread Carl Banks
On Oct 11, 4:12 pm, Mensanator wrote: > On Oct 11, 5:05 pm, Carl Banks wrote: > > > > > > > On Oct 11, 7:10 am, Grant Edwards wrote: > > > > On 2009-10-11, metal wrote: > > > > > I wonder the reason for ELIF. it's not aligned with IF, make code ugly > > > > It most certainly is aligned with IF:

Inserting into a database

2009-10-11 Thread aditya shukla
Hello Guy's I am using python 2.6 on windows 7 and MySQLdb to make connections to the database.The issue here is that I am not able to insert from the python script to the database.When I run the same query in mysql query brower then the insert statement works .I am able to select from the databa

Re: Inserting into a database

2009-10-11 Thread Stephen Hansen
On Sun, Oct 11, 2009 at 4:46 PM, aditya shukla wrote: > Hello Guy's > > I am using python 2.6 on windows 7 and MySQLdb to make connections to the > database.The issue here is that I am not able to insert from the python > script to the database.When I run the same query in mysql query brower then

Re: Inserting into a database

2009-10-11 Thread aditya shukla
Hello Guys I am using python 2.6 on windows 7 and MySQLdb to make connections to the database.The issue here is that I am not able to insert from the python script to the database.When I run the same query in mysql query brower then the insert statement works .I am able to select from the databa

Re: Inserting into a database

2009-10-11 Thread aditya shukla
On Sun, Oct 11, 2009 at 5:06 PM, aditya shukla wrote: > Hello Stephen, > > > I have put the code and the traceback.Can you please help me now? .I am > scratching my head :) > > I am using python 2.6 on windows 7 and MySQLdb to make connections to the > database.The issue here is that I am no

Re: Inserting into a database

2009-10-11 Thread Stephen Hansen
On Sun, Oct 11, 2009 at 5:06 PM, aditya shukla wrote: > this what the code looks like. > > > db = MySQLdb.connect("localhost","root","juventus12","factoids",charset = > "utf8", use_unicode = True ) > cursor= db.cursor() # i added charset = "utf8", use_unicode = True just > now and changed the ch

Re: An assessment of Tkinter and IDLE

2009-10-11 Thread r
A few things i forgot to mention... +--+ Things i forgot... IDLE Editor +--+ 1. class and path browsers should be available in a tabbed widget located in the left side of the Editor window. Should also have a show/ hide button or have them

Re: Why ELIF?

2009-10-11 Thread John Machin
MRAB mrabarnett.plus.com> writes: > > Simon Forman wrote: > [snip] > > > > I'll often do that this way: > > > > args = re.split('\s', line) > > This has the same result, but is shorter and quicker: > > args = line.split() > HUH? Shorter and quicker, yes, but provides much better functiona

Re: The rap against "while True:" loops

2009-10-11 Thread RDrewD
On Oct 11, 6:46 pm, Philip Semanchuk wrote: > On Oct 11, 2009, at 5:51 PM, bartc wrote: > > > > > Mensanator wrote: > >> On Oct 10, 3:15 pm, kj wrote: > >>> I'm coaching a group of biologists on basic Python scripting. One > >>> of my charges mentioned that he had come across the advice never > >

Re: The rap against "while True:" loops

2009-10-11 Thread Gabriel Genellina
En Sun, 11 Oct 2009 19:46:06 -0300, Philip Semanchuk escribió: On Oct 11, 2009, at 5:51 PM, bartc wrote: Mensanator wrote: On Oct 10, 3:15�pm, kj wrote: I'm coaching a group of biologists on basic Python scripting. �One of my charges mentioned that he had come across the advice never to u

Re: "Error en el bus" from python

2009-10-11 Thread Yusniel
On 11 oct, 18:29, Steven D'Aprano wrote: > On Sun, 11 Oct 2009 13:45:54 -0700, Yusniel wrote: > > Hi. I did installed a library for python named pyswip-0.2.2 but when I > > run a python example with the next lines, the python interpreter, it > > throw me the following error: "Error en el bus". > .

Re: "Error en el bus" from python

2009-10-11 Thread Philip Semanchuk
On Oct 11, 2009, at 4:45 PM, Yusniel wrote: Hi. I did installed a library for python named pyswip-0.2.2 but when I run a python example with the next lines, the python interpreter, it throw me the following error: "Error en el bus". The code lines are: from pyswip.prolog import Prolog from pys

Re: The rap against "while True:" loops

2009-10-11 Thread Gabriel Genellina
En Sun, 11 Oct 2009 23:01:47 -0300, RDrewD escribió: On Oct 11, 6:46 pm, Philip Semanchuk wrote: On Oct 11, 2009, at 5:51 PM, bartc wrote: > Mensanator wrote: >> On Oct 10, 3:15 pm, kj wrote: >>> I'm coaching a group of biologists on basic Python scripting. One >>> of my charges mentioned th

Re: Why ELIF?

2009-10-11 Thread Mensanator
On Oct 11, 6:43�pm, Carl Banks wrote: > On Oct 11, 4:12�pm, Mensanator wrote: > > > > > > > On Oct 11, 5:05 pm, Carl Banks wrote: > > > > On Oct 11, 7:10 am, Grant Edwards wrote: > > > > > On 2009-10-11, metal wrote: > > > > > > I wonder the reason for ELIF. it's not aligned with IF, make code

Re: Delete all list entries of length unknown

2009-10-11 Thread r
On Oct 4, 11:05 pm, "Mark Tolonen" wrote: > "Chris Rebert" wrote in message > > Tuples are immutable (i.e. they cannot be modified after creation) and > > are createdusingparentheses. > > Slight correction: tuples are createdusingcommas.  Parentheses are only > needed to disambiguate from other u

Re: "Error en el bus" from python

2009-10-11 Thread Philip Semanchuk
On Oct 11, 2009, at 11:56 PM, Dennis Lee Bieber wrote: On Sun, 11 Oct 2009 13:45:54 -0700 (PDT), Yusniel > declaimed the following in gmane.comp.python.general: prolog.consult("hanoi.pl") where "hanoy.pl" is a program with python code. Any solution for this error?. Thanks.

Re: Inserting into a database

2009-10-11 Thread Stephen Hansen
On Sun, Oct 11, 2009 at 8:56 PM, Dennis Lee Bieber wrote: > On Sun, 11 Oct 2009 17:00:42 -0700, Stephen Hansen > declaimed the following in > gmane.comp.python.general: > > > Otherwise, the only thing anyone will be able to do is guess wildly. > Which > > no one is likely to do :) > > > A

Re: What do I do now?

2009-10-11 Thread Donn
On Monday 12 October 2009 00:53:42 Someone Something wrote: > 1) What should I start programming (project that takes 1-2 months, not very > short term)? > 2) Whtat are some good open source projects I can start coding for? These kinds of questions amaze me. Surely you are a kid in a candy shop when

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-11 Thread TerryP
On Oct 9, 5:59 pm, Joshua Kugler wrote: > ryniek90 wrote: > > So maybe someone, someday decide to > > put in Python an alternative, really great implementation ofscanf() ? > > My idea of a "greatscanf() function" would be a clever combination of > re.match(), int(), and float(). > > j Actually, t

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-11 Thread r
On Oct 3, 8:17 pm, Grant Edwards wrote: (--snip--) > One of the fist things I remember being taught as a C progrmmer > was to never use scanf.  Programs that use scanf tend to fail > in rather spectacular ways when presented with simple typos and > other forms of unexpected input.   > > Given the

Re: python performance on Solaris

2009-10-11 Thread inaf
On Oct 11, 6:59 am, Antoine Pitrou wrote: > inaf gmail.com> writes: > > > > > My code seem to > > return lookups from a in memory data structure I build combining bunch > > of dictionaries and lists 6-8 times faster on a 32 bit Linux box than > > on a Solaris zone. > > Well, if your workload is C

Re: Why ELIF?

2009-10-11 Thread TerryP
On Oct 11, 9:43 pm, Steven D'Aprano wrote: > On Sun, 11 Oct 2009 11:15:06 -0700, TerryP wrote: > > I might take flak here, for writing something like 'dict[key] > > (func_args)' instead of something more Pythonic, > > Looking up a first-class function in a dictionary and passing arguments > to it

Re: An assessment of Tkinter and IDLE

2009-10-11 Thread TerryP
On Aug 27, 9:22 pm, r wrote: > - > from Tkinter import * > - > *Too many noobs start out with the "from Tkinter import *" idiom, > unknowing that they are horribly polluting their namespace. I feel > that all