win32 timezone module available in win32all

2005-12-24 Thread Jason R. Coombs
This announcement is long overdue. The win32all package (Python for Windows Extensions, https://sourceforge.net/projects/pywin32/), from Mark Hammond, now includes a win32timezone module which implements time zones for win32 users (WinNT and later) utilizing the timezone information found in the

ANN: mountpy 0.4

2005-12-24 Thread garabik-news-2005-05
mountpy is a python script for quick automatic mounting and umounting of external filesystems, especially suited for USB removable devices. mountpy is developed on linux, and is meant for modern linux systems. This is version 0.4, changes from previous version: - do not remove the directories

[ANN] python-dateutil 1.1

2005-12-24 Thread Gustavo Niemeyer
Changes since 1.0 - - Fixed rrule byyearday handling. Abramo Bagnara pointed out that RFC2445 allows negative numbers. - Fixed --prefix handling in setup.py (by Sidnei da Silva). - Now tz.gettz() returns a tzlocal instance when not given any arguments and no other timezone

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

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 other than opening a

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 though

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

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 by having

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 is that a

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 prefer

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. --

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

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 easy

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

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 windows but I

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 nearly

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 open file '/tmp/workfile', mode 'w' at

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') print f open

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 stdin, 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 read 1024

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 represent a {

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 of

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 http://docs.python.org/lib/module-time.html specifically the time.clock() function. For memory usage see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222 /Jean Brouwers -- http://mail.python.org/mailman/listinfo/python-list

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 http://docs.python.org/lib/module-time.html specifically the time.clock() function. For memory usage see http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286222 /Jean Brouwers there was a good long discussion

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 represent a {

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 --

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') print f open

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('script [re.DOTALL]+ src=[re.DOTALL]+') I'm testing it on a page that includes the following source: script

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

2005-12-24 Thread Olivier Grisel
gene tani a écrit : 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

Re: What is unique about Python?

2005-12-24 Thread Mike Meyer
KraftDiner [EMAIL PROTECTED] writes: I like python.. Its ok.. One thing that I find a bit dangerous it the use of the tab character for indentation.. I've had copy and pasts loose indentation on me and its theoretically impossible to really figure out what the indentation should be. So

Re: Timing out arbitrary functions

2005-12-24 Thread Steven D'Aprano
On Sat, 24 Dec 2005 04:47:34 -0800, Paul Rubin wrote: 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? Pure ignorance

any Adobe Reader like apps written in python, for examination?

2005-12-24 Thread Alex Gittens
Is anyone aware of any applications that handle font and graphics display--- something like Adobe Reader--- that are written in Python, and the code is available for examination? It doesn't matter what GUI toolkit is used. Thanks, Alex -- ChapterZero: http://tangentspace.net/cz/ --

Re: Timing out arbitrary functions

2005-12-24 Thread Paul Rubin
Steven D'Aprano [EMAIL PROTECTED] writes: Is something stopping you from using sigalarm? Pure ignorance of its existence. Thanks, I'll check it out. Two things to keep in mind: - You can have only ONE alarm pending for the whole process. If different things in the program need timeouts

Re: program with raw_input prompt behaves differently after compile

2005-12-24 Thread Hans Nowak
tim wrote: I want to write a program that looks into a given folder, groups files that have a certain part of the filename in common and then copy those groups one at a time to another place, using the raw_input prompt to continue or break. [...] It works fine when I run this from

I am seeing your project HTMLTemplate

2005-12-24 Thread LocaWapp
Hi Hamish Sanderson. I am seeing your project HTMLTemplate. I like it. You see my project: LocaWapp: localhost web applications V.0.0.2 (2005 Dec 20) http://LocaWapp.blogspot.com - Run with: python run.py - and browse with: http://localhost:8080/locawapp/main.py

scrape url out of brackets?

2005-12-24 Thread homepricemaps
any idea how to scrape a url out of a file? for instance if i want to scrape out the href at the end which is www.cnn.com is there a way to do it? tr class=rulesbodytd width=183 class=rulesbodya href=www.cnn.com -- http://mail.python.org/mailman/listinfo/python-list

Re: What is unique about Python?

2005-12-24 Thread Szabolcs Nagy
i don't know if they are unique, but my favourite features are: readable and short code (consistent syntax, few keywords) iterpreter (very useful for learning) dir(obj) / vars(obj) (very useful for learning) identation dynamic typing lightweight oo (no public/protected/private) built-in types

Re: scrape url out of brackets?

2005-12-24 Thread Mike Meyer
[EMAIL PROTECTED] writes: any idea how to scrape a url out of a file? for instance if i want to scrape out the href at the end which is www.cnn.com is there a way to do it? tr class=rulesbodytd width=183 class=rulesbodya href=www.cnn.com BeautifulSoup. mike -- Mike Meyer [EMAIL

Re: What is unique about Python?

2005-12-24 Thread Roy Smith
Szabolcs Nagy [EMAIL PROTECTED] wrote: iterpreter (very useful for learning) In my mind, this is the coolest feature of all. Most of the time, I don't even bother looking stuff up in the docs; it's faster to just fire up an interpreter and try something. Functions like: dir(obj) /

Re: Indentation/whitespace

2005-12-24 Thread Joe
My original post was based on reading on Pythons developer list that it was seriously considering some alternate grouping scheme, just because so many people keep asking. But, it seems that never happened. As for me, I'm not suggesting that braces are better than indentation. In fact, requiring

Re: pyQt for windows

2005-12-24 Thread relativity
relativity [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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

Re: scrape url out of brackets?

2005-12-24 Thread Ravi Teja
Regular Expressions are the most common way. http://docs.python.org/lib/module-re.html HTML parser is another http://docs.python.org/lib/module-htmllib.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation/whitespace

2005-12-24 Thread James Tanis
On 24 Dec 2005 18:36:32 -0800, Joe [EMAIL PROTECTED] wrote: My original post was based on reading on Pythons developer list that it was seriously considering some alternate grouping scheme, just because so many people keep asking. But, it seems that never happened. As for me, I'm not

need help with python syntax

2005-12-24 Thread homepricemaps
if i have a piece of html that looks like this tr class=rulesbody td width=183 class=rulesbodycnn.com and i want to scrape out cnn.com , what syntax would i use? i have tried this and it doesn't work for incident in bs('td', {'class' : 'rulesbody'}, {'class' : 'rulesbody'} ): --

Python IDE's

2005-12-24 Thread J. D. Leach
Quick question as I am rather new to Python. What is the preferred tool amongst you gurus to use in coding Python? I have ran across Eric3 and found it to be pretty well full-featured. Any comments or suggestions for better tools/IDE's? J.D. Leach --

Re: need help with python syntax

2005-12-24 Thread gene tani
[EMAIL PROTECTED] wrote: if i have a piece of html that looks like this tr class=rulesbody td width=183 class=rulesbodycnn.com and i want to scrape out cnn.com , what syntax would i use? i have tried this and it doesn't work for incident in bs('td', {'class' : 'rulesbody'}, {'class' :

Re: Python IDE's

2005-12-24 Thread Szabolcs Nagy
it's a very common question here. try to search for an answer http://groups.google.com/group/comp.lang.python/search?q=python+idestart=0scoring=d; also see http://wiki.python.org/moin/PythonEditors and http://wiki.python.org/moin/IntegratedDevelopmentEnvironments --

Re: What is unique about Python?

2005-12-24 Thread Szabolcs Nagy
identation Feh. A red herring. At best, syntactic sugar. At worst, something for potential adopters to get hung up about. i always ident my code, but in python i don't need to bother with the {} and the ; (which is redundant if i ident anyway) so i like it because i need to type less, and i

Re: need help with python syntax

2005-12-24 Thread gene tani
gene tani wrote: [EMAIL PROTECTED] wrote: if i have a piece of html that looks like this tr class=rulesbody td width=183 class=rulesbodycnn.com and i want to scrape out cnn.com , what syntax would i use? i have tried this and it doesn't work for incident in bs('td', {'class' :

Re: need help with python syntax

2005-12-24 Thread Mike Meyer
[EMAIL PROTECTED] writes: if i have a piece of html that looks like this tr class=rulesbody td width=183 class=rulesbodycnn.com and i want to scrape out cnn.com , what syntax would i use? i have tried this and it doesn't work for incident in bs('td', {'class' : 'rulesbody'}, {'class' :

Re: [ python-Bugs-1215887 ] String and list methods deeply hidden

2005-12-24 Thread Chuck Rhode
SourceForge.net wrote this on Mon, Jun 06, 2005 at 11:16:19AM -0700. My reply is below. The way the docs are written makes perfect sense to me ~ now ~ but I too had difficulty navigating them at first, particularly with finding the methods of sequence types from the TOC. Eventually, I must

errors when trying to send mail

2005-12-24 Thread RK
I've seen another bug submission similar to this. I am using 2.3.4 and I get almost the exact same error. I'm on a linux box (2.6.9-5.ELsmp) and the same code runs fine on other machines and previous versions of python - here's the code snippet: msg = MIMEMultipart() COMMASPACE = ', '

errors while trying to send email

2005-12-24 Thread Ronald Kijewski
I've seen another bug submission similar to this. I am using 2.3.4 and I get almost the exact same error. I'm on a linux box (2.6.9-5.ELsmp) and the same code runs fine on other machines and previous versions of python - here's the code snippet: msg = MIMEMultipart() COMMASPACE = ', '

[ python-Bugs-1388949 ] Decimal sqrt() ignores rounding

2005-12-24 Thread SourceForge.net
Bugs item #1388949, was opened at 2005-12-23 12:11 Message generated for change (Comment added) made by facundobatista You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1388949group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1389673 ] Incorrectly docs for return values of set update methods

2005-12-24 Thread SourceForge.net
Bugs item #1389673, was opened at 2005-12-24 13:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1389673group_id=5470 Please note that this message will contain a full copy of

[ python-Bugs-1389673 ] Incorrect docs for return values of set update methods

2005-12-24 Thread SourceForge.net
Bugs item #1389673, was opened at 2005-12-24 13:27 Message generated for change (Settings changed) made by collinwinter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1389673group_id=5470 Please note that this message will contain a full copy of the

[ python-Bugs-1389809 ] Fxn call in _elementtree.c has incorrect signedness

2005-12-24 Thread SourceForge.net
Bugs item #1389809, was opened at 2005-12-24 15:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1389809group_id=5470 Please note that this message will contain a full copy of