Re: Providing 'default' value with raw_input()?

2005-12-24 Thread planetthoughtful
Hi Roger, This is exactly what I was looking for! Thank you so much! I now have a fully functioning command-line todo app. Anyone interested in why I picked that as my 2nd-ever-Python-app might like to read the post over at 43folders.com about suggested uses for Quicksilver on the Mac (http://w

Re: Find out the schema with psycopg?

2005-12-24 Thread Steve Holden
Ben Hutchings wrote: > Steve Holden <[EMAIL PROTECTED]> wrote: > >>[EMAIL PROTECTED] wrote: >> >>>I am trying to discover the schema of a PostgreSQL database >>>programatically at runtime. >>> >>>I'm using psycopg (I assume that's still the best library). Is there a >>>way to query the schema oth

Re: Indentation/whitespace

2005-12-24 Thread Steve Holden
thakadu wrote: > I consider myself a fairly experienced Python coder and although I am > not "uncomfortable" with significant whitespace there are a few places > where I do find it annoying and I wouldnt mind an alternate block > delimitation syntax. I would prefer something like the ruby "end" >

How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread Shahriar Shamil Uulu
Hi All, i want to calculate the cpu time consumption and memory consuption of any program written in python during runtime on Linux Fedora Core - 2, P4, RAM-512 MB. Actually i have written one database program in two ways, 1) Inprocedural way 2) in object oriented way. Now i want to check how effi

hello python

2005-12-24 Thread liigo
-- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-24 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Steve Holden wrote: > > >>Far answers to this and all other (as far as I can determine) >>hypothetical questions please refer to the license. > > > But note that no OSI certified open source license will grant the right > to use a trademark. You gain trademark rights

Re: Herds of cats

2005-12-24 Thread Steve Holden
Alex Martelli wrote: [...] > Still, I'm not disputing that CA "got screwed"... though it looks like > they did it to themselves -- they didn't stop to consider the need to > WOO developers to actually get them onboard as a part of the overall > deal, just sort of assumed they "came with the package

Re: Indentation/whitespace

2005-12-24 Thread Björn Lindström
"thakadu" <[EMAIL PROTECTED]> writes: > I consider myself a fairly experienced Python coder and although I am > not "uncomfortable" with significant whitespace there are a few places > where I do find it annoying and I wouldnt mind an alternate block > delimitation syntax. The problem with that i

Microsoft's JavaScript doc's newfangled problem

2005-12-24 Thread Xah Lee
sometimes in the last few months, apparently Microsoft made changes to their JavaScript documentation website: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/1e9b3876-3d38-4fd8-8596-1bbfe2330aa9.asp so that, one has to goddamn press the "expand" button to view the

Re: Indentation/whitespace

2005-12-24 Thread Steven D'Aprano
On Fri, 23 Dec 2005 15:31:55 -0800, thakadu wrote: > I consider myself a fairly experienced Python coder and although I am > not "uncomfortable" with significant whitespace there are a few places > where I do find it annoying and I wouldnt mind an alternate block > delimitation syntax. I would pr

Passwords in cron scripts

2005-12-24 Thread Mark Carter
I have some python scripts that run as cron jobs. They connect to external resources (like a newsserver) - for which passwords are required. I currently have them stored in the scripts themselves (ouch!) - and was wondering if there was a more secure solution. -- http://mail.python.org/mailman/

Re: Microsoft's JavaScript doc's newfangled problem

2005-12-24 Thread VK
Xah Lee wrote: > sometimes in the last few months, apparently Microsoft made changes to > their JavaScript documentation website: Their *JScript* documentation website - here's the keyword. See:

Timing out arbitrary functions

2005-12-24 Thread Steven D'Aprano
I have a problem and I don't know where to start looking for a solution. I have a class that needs to call an arbitrary function and wait for a result. The function, being completely arbitrary and not under my control, may be very time consuming and possibly may not even halt. My class needs to be

Re: Providing 'default' value with raw_input()?

2005-12-24 Thread Kent Johnson
planetthoughtful wrote: > My intention is to build a GUI for this app, yes, but given that I'm > about a week old in my learning of Python, I thought a command-line app > was a better place to start. > > I had thought to build GUIs in wxPython - is Tkinter any easier to > learn? Tkinter is quite

Re: Timing out arbitrary functions

2005-12-24 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > How do others handle something like this? What should I be looking for? > I'm after a lightweight solution, if any such thing exists. Is something stopping you from using sigalarm? -- http://mail.python.org/mailman/listinfo/python-list

Re: Passwords in cron scripts

2005-12-24 Thread Peter Hansen
Mark Carter wrote: > I have some python scripts that run as cron jobs. They connect to > external resources (like a newsserver) - for which passwords are > required. I currently have them stored in the scripts themselves (ouch!) > - and was wondering if there was a more secure solution. Secure

Re: Indentation/whitespace

2005-12-24 Thread thakadu
>That's hardly Python's fault. That's a problem with lousy browsers, >editors etc. which add word-wrapping or remove whitespace. >Complain to the >browser developers. While I have no doubt that there are lousy browsers out there, the problem is not only with browsers, but also I agree with you its

Re: Microsoft's JavaScript doc's newfangled problem

2005-12-24 Thread BR
Zif wrote: > In a file called 'whidbey/script.js' they still use document.all > without any fall back to getElementById. Isn't whidbey the code name > for Visual Studio .NET 2005?  Does it use document.all exclusively? I'm wondering if they meant for that documentation to be read in VS 2005? --

Re: Indentation/whitespace

2005-12-24 Thread Alex Martelli
James Tanis <[EMAIL PROTECTED]> wrote: ... > syntax. Honestly I wonder how so many coders actually came to be > interested in the field -- one that pretty much thrives in part on its > neverending ability to vary, grow, and change -- if something so small > can warrant so much attention. An obs

Re: pyQt for windows

2005-12-24 Thread relativity
"Bill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > relativity wrote: >> I have downloaded and installed pyQt 3.14 educational but when I run any >> of >> the examples I get an error saying qt-mtedu333.dll was not found. I have >> also installed the qt4 opensource version for wi

Re: Indentation/whitespace

2005-12-24 Thread Lee Harr
On 2005-12-23, Gary Herron <[EMAIL PROTECTED]> wrote: > You've got the visible/invisible aspect of things > *exactly* backwards. > The point on a line of text where things change > from white space to > non-white space is *highly* visible. The several > pixels that represent a > { or } are nearl

Linux > python > file-I/O ?

2005-12-24 Thread news
I've just started to test/learn python. I've got Linux > mandrake9 > python & documentation. What I'll initially want to be doing needs file I/O, so I wanted to confirm file I/O early in my tests. Following the examples : >>> f=open('/tmp/workfile', 'w') >>> print f <-- OK But: >>> f.read(siz

Re: Linux > python > file-I/O ?

2005-12-24 Thread David Wahler
[EMAIL PROTECTED] wrote: > I've just started to test/learn python. > I've got Linux > mandrake9 > python & documentation. > What I'll initially want to be doing needs file I/O, so I > wanted to confirm file I/O early in my tests. > > Following the examples : > >>> f=open('/tmp/workfile', 'w') > >>

Re: Linux > python > file-I/O ?

2005-12-24 Thread Grant Edwards
On 2005-12-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: f.read(size) > Traceback (most recent call last): > File "", line 1, in ? > NameError: name 'size' is not defined <-- ?? Obj-method unknown ?? > > > What's wrong ? You haven't defined anything named "size". Assuming you want to

Re: Timing out arbitrary functions

2005-12-24 Thread David Wahler
Steven D'Aprano wrote: > I have a problem and I don't know where to start looking for a solution. > > I have a class that needs to call an arbitrary function and wait for a > result. The function, being completely arbitrary and not under my control, > may be very time consuming and possibly may not

Re: Indentation/whitespace

2005-12-24 Thread André
Lee Harr wrote: > On 2005-12-23, Gary Herron <[EMAIL PROTECTED]> wrote: > > You've got the visible/invisible aspect of things > > *exactly* backwards. > > The point on a line of text where things change > > from white space to > > non-white space is *highly* visible. The several > > pixels that re

Re: Passwords in cron scripts

2005-12-24 Thread David Wahler
Mark Carter wrote: > I have some python scripts that run as cron jobs. They connect to > external resources (like a newsserver) - for which passwords are > required. I currently have them stored in the scripts themselves (ouch!) > - and was wondering if there was a more secure solution. Any form o

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread MrJean1
For CPU time usage, see the standard time module specifically the time.clock() function. For memory usage see /Jean Brouwers -- http://mail.python.org/mailman/listinfo/python-l

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread gene tani
MrJean1 wrote: > For CPU time usage, see the standard time module > > > > specifically the time.clock() function. For memory usage see > > > > > /Jean Brouwers there was a good long

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread Shahriar Shamil Uulu
Thank you, for your directions and advices. shahriar ... gene tani wrote: > MrJean1 wrote: > > For CPU time usage, see the standard time module > > > > > > > > specifically the time.clock() function. For memory usage see > > > >

Re: Indentation/whitespace

2005-12-24 Thread gene tani
Lee Harr wrote: > On 2005-12-23, Gary Herron <[EMAIL PROTECTED]> wrote: > > You've got the visible/invisible aspect of things > > *exactly* backwards. > > The point on a line of text where things change > > from white space to > > non-white space is *highly* visible. The several > > pixels that re

Re: How to calculate the CPU time consumption and memory consuption of any python program in Linux

2005-12-24 Thread gene tani
Shahriar Shamil Uulu wrote: > Thank you, for your directions and advices. > shahriar ... also look: http://spyced.blogspot.com/2005/09/how-well-do-you-know-python-part-9.html whihc mentions twisted.python.reflect.findInstances(sys.modules, str) and objgrep, which i didn't know about -- http:/

Re: Linux > python > file-I/O ?

2005-12-24 Thread gene tani
[EMAIL PROTECTED] wrote: > I've just started to test/learn python. > I've got Linux > mandrake9 > python & documentation. > What I'll initially want to be doing needs file I/O, so I > wanted to confirm file I/O early in my tests. > > Following the examples : > >>> f=open('/tmp/workfile', 'w') > >

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-24 Thread Rich Teer
On Fri, 23 Dec 2005, Xah Lee wrote: His usual clap trap. ___ /| /| | | ||__|| | Please do | / O O\__ NOT |

Re: Trying to find regex for any script in an html source

2005-12-24 Thread Mike Meyer
"28tommy" <[EMAIL PROTECTED]> writes: > Hi, > I'm trying to find scripts in html source of a page retrieved from the > web. > I'm trying to use the following rule: > > match = re.compile('') > > I'm testing it on a page that includes the following source: > >