Re: the one python book

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 4, 8:23 am, "dhr" <[EMAIL PROTECTED]> wrote: > newbie question: > > Is there a 'K&R" type of Python book? The book that you'd better have on > your shelf if you are going into Python? I thought Python Essential Reference was helpfull but It doesn't work that well without another book to go

Re: Comparing RFC1123 based Dates

2007-08-04 Thread Phoe6
Phoe6 wrote: > I would like to parse RFC 1123 date format and compare two dates. I > find that > datetime module does not specifically confirms to any RFC. Any > suggestions as how I can handle the RFC 1123 date format using > standard libraries before I go to re based parsing? Well, >>> import ti

Re: Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 4, 9:21?pm, "Jim Langston" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > > > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote: > >> Hi All. > >> Let's say I have some badly formatted text called doc: > > >> doc= > >> """ > >> fri

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread Cousin Stanley
> Cousin Stanley <[EMAIL PROTECTED]> wrote: >... >> for i , item in reversed( enumerate( sorted( single_list ) ) ) : >... >> TypeError: argument to reversed() must be a sequence > > Oops, right. Well then, > > aux_seq = list(enumerate(sorted(single_list))) > for i, item in r

Comparing RFC1123 based Dates

2007-08-04 Thread Phoe6
I would like to parse RFC 1123 date format and compare two dates. I find that datetime module does not specifically confirms to any RFC. Any suggestions as how I can handle the RFC 1123 date format using standard libraries before I go to re based parsing? Thanks, Senthil -- http://mail.python.or

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread Alex Martelli
Cousin Stanley <[EMAIL PROTECTED]> wrote: ... > for i , item in reversed( enumerate( sorted( single_list ) ) ) : ... > TypeError: argument to reversed() must be a sequence Oops, right. Well then, aux_seq = list(enumerate(sorted(single_list))) for i, item in reversed(aux_seq):

Re: Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread Jim Langston
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote: >> Hi All. >> Let's say I have some badly formatted text called doc: >> >> doc= >> """ >> friendid >> Female >> >> 23 years old >> >>

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread Cousin Stanley
> > "beginner"'s advice to use a dictionary is also good > and may turn out to be faster, just because dicts are > SO fast in Python -- but you need to try and measure > both alternatives. > > One way to use a dict ( warning, untested code ) : def rank_list( single_list ) : d =

Re: libpq.dll for pgdb

2007-08-04 Thread Tim Roberts
ekzept <[EMAIL PROTECTED]> wrote: > >the module PGDB which gives Python access to PostgreSql currently >wants for a copy of a properly located or proper libpq.dll library, on >Windows. > >anyone know what the current story on this is? The story? libpq.dll is the Postgres API interface library on

Re: Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 4, 6:35?pm, SMERSH009 <[EMAIL PROTECTED]> wrote: > Hi All. > Let's say I have some badly formatted text called doc: > > doc= > """ > friendid > Female > > 23 years old > > Los Gatos > > United States > friend

Re: os.listdir path error

2007-08-04 Thread Tim Roberts
[EMAIL PROTECTED] wrote: > >I get "SyntaxError: EOL while scanning single-quoted string", which is >what should happen when you escape the double-quotes at the end. Not >sure how you're getting that WindowsErrors. > >If I do os.listdir('c:\python24') instead, it works fine. Yes, but only by acci

Re: The Modernization of Emacs: keyboard shortcuts pain

2007-08-04 Thread Xah Lee
The following article a extended version of previous post. A HTML version can be found at http://xahlee.org/emacs/emacs_kb_shortcuts_pain.html --- WHY EMACS'S KEYBOARD SHORTCUTS ARE PAINFUL Xah Lee, 2007-07 A important aspect in designing a keyboard shortcut set,

Re: Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread John Machin
On Aug 5, 9:35 am, SMERSH009 <[EMAIL PROTECTED]> wrote: > Hi All. > Let's say I have some badly formatted text called doc: > > doc= > """ > friendid > Female > > 23 years old > > Los Gatos > > United States > friend

Re: [pygame] pyweek is happening august 02 - august 09

2007-08-04 Thread Laura Creighton
In a message of Sat, 04 Aug 2007 14:25:29 CDT, Luke Paireepinart writes: >Laura Creighton wrote: >> 00:00 UTC 2007-09-02 to 00:00 UTC 2007-09-09 exactly. See >> www.pyweek.org >> >> PyconUK is happening. http://www.pyconuk.org/ 8th and 9th September. >> >> This means that those of us who generall

Re: Encoding DeprecationWarning

2007-08-04 Thread Carsten Haese
On Sat, 2007-08-04 at 15:52 -0700, [EMAIL PROTECTED] wrote: > On Aug 4, 11:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > >>> from wt.lib.misc_lists import all_countries > > > > __console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file / > > Django/wt/../wt/lib/misc_lists.py

Formatting Results so that They Can be Nicely Imported into a Spreadsheet.

2007-08-04 Thread SMERSH009
Hi All. Let's say I have some badly formatted text called doc: doc= """ friendid Female 23 years old Los Gatos United States friendid Male 24 years old

Re: sqlite3 create table col width?

2007-08-04 Thread Ben Finney
jim-on-linux <[EMAIL PROTECTED]> writes: > PY help, > > Using sqlite3 v3.1.3 You made this message a reply to an existing discussion, so your message is now part of that existing discussion. Please start a new discussion thread by composing a new message. -- \ "True greatness is measu

Re: how to run os.execv() to run command pslq dbname < gen.command

2007-08-04 Thread Alex Popescu
Steve Holden <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Sonu wrote: >> hello all , >> > I want to watch my TV, but it's not working. Can you tell me how to > fix it? ... > I can help you... but only with a couple of channels :-). >> i need to run psql from my py file,, >> for that

Re: Eclipse/PyDev question.

2007-08-04 Thread king kikapu
Ah, and i think that the working set of Eclipse is smaller now... -- http://mail.python.org/mailman/listinfo/python-list

Re: Eclipse/PyDev question.

2007-08-04 Thread king kikapu
News" (or, news to me :) ) The creator of PyDev, contacted me and told me that latest version of PyDev need not require the whole SDK but only the Runtime Platfom is OK. That means that we download only the 40MB file (and not the 120 one) and this does not include all the Java stuff that we see in

Re: Encoding DeprecationWarning

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 4, 11:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >>> from wt.lib.misc_lists import all_countries > > __console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file / > Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding > declared; seehttp://www.python.org/peps

Re: Client-side HTML form processing with Python?

2007-08-04 Thread goldtech
Looks like Tkinter is the way to do it. There's always a way with Python - good stuff! -- http://mail.python.org/mailman/listinfo/python-list

Re: Encoding DeprecationWarning

2007-08-04 Thread [EMAIL PROTECTED]
>>> from wt.lib.misc_lists import all_countries __console__:1: DeprecationWarning: Non-ASCII character '\xc3' in file / Django/wt/../wt/lib/misc_lists.py on line 141, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details -- http://mail.python.org/mailman/listinfo/pyth

Re: Submit web form only client-side with Python? COM?

2007-08-04 Thread Jay Loden
Paul Rubin wrote: > goldtech <[EMAIL PROTECTED]> writes: >> So I can present the user with an HTML form in it - but how can I >> write the form data to a local file on my work station? > > The simplest way is with the cgi and CGIHTTPServer modules. You'd > write your form in an html file, with th

Re: Client-side HTML form processing with Python?

2007-08-04 Thread Jay Loden
goldtech wrote: > I want to have an HTML form from a local local html file write a text > field's data to a local text file. > > I have no client or server side tools like PHP, JAVA. I don't know > JavaScript. I can not add anything to the workstation I am using. It's > going to have to be a clien

Re: the one python book

2007-08-04 Thread rgrdev
Michael Tobis <[EMAIL PROTECTED]> writes: > On Aug 4, 9:32 am, Neil Cerutti <[EMAIL PROTECTED]> wrot > >> With Python, you won't find anything like that. Python is too >> huge. > > That's silly. Python is small in the sense that C is small. The Python > standard library is probably much bigger tha

Re: Client-side HTML form processing with Python?

2007-08-04 Thread Paul Rubin
goldtech <[EMAIL PROTECTED]> writes: > I have no client or server side tools like PHP, JAVA. I don't know > JavaScript. I can not add anything to the workstation I am using. It's > going to have to be a client-side solution - there's no CGI on the > server, no PHP. Oh wait, you're trying to write

Re: Submit web form only client-side with Python? COM?

2007-08-04 Thread Paul Rubin
goldtech <[EMAIL PROTECTED]> writes: > So I can present the user with an HTML form in it - but how can I > write the form data to a local file on my work station? The simplest way is with the cgi and CGIHTTPServer modules. You'd write your form in an html file, with the target set to a Python scr

Re: Question -- Running Programming Python Examples

2007-08-04 Thread chernevik
That fixed it, and Gary's item on pointing my browser to the proper port answered the next question percolating in my mind. It now runs as advertised. Thanks to you both! -- http://mail.python.org/mailman/listinfo/python-list

Re: the one python book

2007-08-04 Thread Paul Rubin
"dhr" <[EMAIL PROTECTED]> writes: > Is there a 'K&R" type of Python book? The book that you'd better have on > your shelf if you are going into Python? I don't think so, at least not if you are starting Python with experience in other languages. There are some books that are useful but none are

Re: Best way to capture output from an exec'ed (or such) script?

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 3, 11:14 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Aug 2, 7:32 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:> If your > web server is multithreaded (or you use some other way to process > > many simultaneous requests) you have to be more careful - remember that > > sys.st

Re: Question -- Running Programming Python Examples

2007-08-04 Thread Gary Herron
[EMAIL PROTECTED] wrote: > Here is a newbie question: how do I get the server examples in the > Preview chapter of "Progamming Python" (Lutz) to run? The code is > supposed to be a little webserver on which to run examples, but when I > run it it I get "permission denied". Running it as root get

Client-side HTML form processing with Python?

2007-08-04 Thread goldtech
I want to have an HTML form from a local local html file write a text field's data to a local text file. I have no client or server side tools like PHP, JAVA. I don't know JavaScript. I can not add anything to the workstation I am using. It's going to have to be a client-side solution - there's no

Re: Question -- Running Programming Python Examples

2007-08-04 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: > Here is a newbie question: how do I get the server examples in the > Preview chapter of "Progamming Python" (Lutz) to run? The code is > supposed to be a little webserver on which to run examples, but when I > run it it I get "permission denied". Running it as root ge

Question -- Running Programming Python Examples

2007-08-04 Thread chernevik
Here is a newbie question: how do I get the server examples in the Preview chapter of "Progamming Python" (Lutz) to run? The code is supposed to be a little webserver on which to run examples, but when I run it it I get "permission denied". Running it as root gets "address already in use". Here

Re: wxpython with python 2.5

2007-08-04 Thread Cappy2112
On Aug 2, 9:34 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/2/07, G <[EMAIL PROTECTED]> wrote: > > Any help in getting wxpython to run in 2.5 would be greatly appreciated. > Have you tried posting a request for help on the wx list? -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to find zip codes/rest example

2007-08-04 Thread Van Lindberg
Jay Loden wrote: > I don't remember the demo, but a little creative googling turned up > > http://bitworking.org/news/132/REST-Tips-URI-space-is-infinite > > Which matches the description above perfectly, so I assume it's what you were > after :-) That is exactly what I was trying to find! I bow

Submit web form only client-side with Python? COM?

2007-08-04 Thread goldtech
Say I have have an HTML form , the user hits the submit button and I what text they enetered into a HTML form field is written to a file. But I don't have PHP, JAVA the usual client or server sided layers to write the data to a file, and I'm not to keen on JavaScript. Note: I can not add or downlo

Re: sqlite3 create table col width?

2007-08-04 Thread jim-on-linux
On Saturday 04 August 2007 14:05, Carsten Haese wrote: > On Sat, 2007-08-04 at 13:51 -0400, jim-on-linux wrote: > > PY help, > > > > Using sqlite3 v3.1.3 > > > > When I create a table collumn using; > > > > newcollum VARCHAR(35), > > > > I get a default of 10 spaces. > > > > No matter what I set

Re: [pygame] pyweek is happening august 02 - august 09

2007-08-04 Thread Luke Paireepinart
Laura Creighton wrote: > 00:00 UTC 2007-09-02 to 00:00 UTC 2007-09-09 exactly. See > www.pyweek.org > > PyconUK is happening. http://www.pyconuk.org/ 8th and 9th September. > > This means that those of us who generally do not see each other but are > going to PyconUK could put together an entry a

Re: Encoding DeprecationWarning

2007-08-04 Thread Carsten Haese
On Sat, 2007-08-04 at 12:07 -0700, [EMAIL PROTECTED] wrote: > Hey There, > > Sorry if I am missing something here, but I get a DeprecationWarning > when importing a list which has some unicode characters in it Please copy and paste the full text of the warning. -- Carsten Haese http://informixd

Encoding DeprecationWarning

2007-08-04 Thread [EMAIL PROTECTED]
Hey There, Sorry if I am missing something here, but I get a DeprecationWarning when importing a list which has some unicode characters in it (it's a list of countries -- it's being raised on Åland), and I am left wondering why. I am using the syntax u' to denote a unicode string. If anyone would

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-08-04 Thread Todd Wade
On Jul 22, 2:20 am, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > Python is a better language, with php support, > > Python has php support ? My, I'm a professional web developper using > both, and I didn't knew this. > As an aside, perl DOES support PHP: http

pyweek is happening august 02 - august 09

2007-08-04 Thread Laura Creighton
00:00 UTC 2007-09-02 to 00:00 UTC 2007-09-09 exactly. See www.pyweek.org PyconUK is happening. http://www.pyconuk.org/ 8th and 9th September. This means that those of us who generally do not see each other but are going to PyconUK could put together an entry and then sprint together on it befor

Re: frequency analysis of a DB column

2007-08-04 Thread goldtech
Just wanted to thank the Posters for the help! Thanks. Lee G. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with headers in email.message

2007-08-04 Thread Slippy
Carsten, changing to m.as_string() worked perfectly - Thanks for the help. The actual project I'm working on is a lot more complex than the simple case I've shown you, and does warrant the use of the message parser, honest! :-) On Aug 4, 5:14 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Sat,

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 3, 5:53 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-08-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > A naive approach to rank ordering (handling ties as well) of nested > > lists may be accomplished via: > > >def rankLists(nestedList): > > def rankList(single

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 3, 9:20 am, [EMAIL PROTECTED] wrote: > On Aug 2, 10:20 pm, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > A naive approach to rank ordering (handling ties as well) of nested > > lists may be accomplished via: > > >def rankLists(nestedList): > > def rankList(singleList):

Re: Efficient Rank Ordering of Nested Lists

2007-08-04 Thread [EMAIL PROTECTED]
On Aug 3, 8:38 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > A naive approach to rank ordering (handling ties as well) of nested > > lists may be accomplished via: > > >def rankLists(nestedList): > > def rankList(singleList): > >

Re: Website data-mining.

2007-08-04 Thread Miki
Hello, > >> I'm using Python for the first time to make a plug-in for Firefox. > >> The goal of this plug-in is to take the source code from a website > >> and use the metadata and body text for different kinds of analysis. > >> My question is: How can I retrieve data from a website? I'm not even

Re: sqlite3 create table col width?

2007-08-04 Thread Carsten Haese
On Sat, 2007-08-04 at 13:51 -0400, jim-on-linux wrote: > PY help, > > Using sqlite3 v3.1.3 > > When I create a table collumn using; > > newcollum VARCHAR(35), > > I get a default of 10 spaces. > > No matter what I set the size to I get 10 spqces, > even using varchar(0) defaults to 10 spaces.

Re: sqlite3 create table col width?

2007-08-04 Thread Paddy
On Aug 4, 6:51 pm, jim-on-linux <[EMAIL PROTECTED]> wrote: > PY help, > > Using sqlite3 v3.1.3 > > When I create a table collumn using; > > newcollum VARCHAR(35), > > I get a default of 10 spaces. > > No matter what I set the size to I get 10 spqces, > even using varchar(0) defaults to 10 spaces. >

Re: regexp problem in Python

2007-08-04 Thread Sönmez Kartal
On 4 A ustos, 17:10, Ehsan <[EMAIL PROTECTED]> wrote: > On Aug 4, 1:22 pm, Sönmez Kartal <[EMAIL PROTECTED]> wrote: > > > > > > > > > On 4 A ustos, 00:41, Ehsan <[EMAIL PROTECTED]> wrote: > > > > I want to find "http://www.2shared.com/download/1716611/e2000f22/ > > > Jadeed_Mlak14.wmv?tsid=20070803

Re: regexp problem in Python

2007-08-04 Thread Fabio Z Tessitore
Il Fri, 03 Aug 2007 14:41:52 -0700, Ehsan ha scritto: maybe you can use this to solve your prob: myurl = "http://www.2shared.com/download/1716611/e2000f22/ Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11" if myurl.startswith('http') and ('wmv' in myurl or '3pg' in myurl): # myurl is the

sqlite3 create table col width?

2007-08-04 Thread jim-on-linux
PY help, Using sqlite3 v3.1.3 When I create a table collumn using; newcollum VARCHAR(35), I get a default of 10 spaces. No matter what I set the size to I get 10 spqces, even using varchar(0) defaults to 10 spaces. I would appreciae the help if someone could tell me what I'm missing, I want

Re: Auto run/Timer

2007-08-04 Thread Irmen de Jong
Rohan wrote: > Hello, > I would like my script to run once a week with out any external > interference. > More like a timer. Can it be done in python or should some other shell > scripting be used. > If anyone knows anything please let me know. > Have a look at my 'kronos' task scheduler, availab

Re: (no) fast boolean evaluation ?

2007-08-04 Thread Paddy
On Aug 4, 4:18 pm, Paddy <[EMAIL PROTECTED]> wrote: > On Aug 2, 10:47 pm, Stef Mientki <[EMAIL PROTECTED]> > wrote: > > > hello, > > > I discovered that boolean evaluation in Python is done "fast" > > (as soon as the condition is ok, the rest of the expression is ignored). > > > Is this standard be

Re: Problems with headers in email.message

2007-08-04 Thread Carsten Haese
On Sat, 2007-08-04 at 17:10 +0100, Tim Williams wrote: > Your script (as posted) works fine for me. > > I did need to change one import line to: from email.Message import > Message (note the capitalization) The modules inside the email package appear to have changed from capitalized names to l

Re: something wrong with wxPython list ?

2007-08-04 Thread kyosohma
On Aug 4, 11:01 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > All my posts to >[EMAIL PROTECTED] > seems to be rejected since today ? > > Is there anything wrong with that list ? > > thanks, > Stef Mientki Somehow I doubt the people on this list will know. I checked the ASPN archive

Re: Problems with headers in email.message

2007-08-04 Thread Carsten Haese
On Sat, 2007-08-04 at 15:38 +, Slippy wrote: > [...] > import smtplib, email > from email.message import Message > m = Message( ) > m['From'] = 'Slippy <[EMAIL PROTECTED]>' > m['To'] = '[EMAIL PROTECTED]' > m['Subject'] = 'A Test Message' > m.set_payload('This is a test email. Please ignore') >

Re: Problems with headers in email.message

2007-08-04 Thread Tim Williams
On 04/08/07, Slippy <[EMAIL PROTECTED]> wrote: > Hi, python newbie, struggling to learn here. I'm trying to write a > simple program which posts messages to my google group (via email). > I'm using smtplib, email and email.message to build and send a > message, but all the header attributes are app

Re: the one python book

2007-08-04 Thread marduk
On Sat, 2007-08-04 at 15:10 +, Michael Tobis wrote: > Like most people I eventually plan to read Moby Dick, War and Peace, > and Lutz's Programming Python. Maybe when I retire. LOL. Lutz's Programming Python is actually how I learned Python. -- http://mail.python.org/mailman/listinfo/python

Re: the one python book

2007-08-04 Thread kyosohma
On Aug 4, 8:23 am, "dhr" <[EMAIL PROTECTED]> wrote: > newbie question: > > Is there a 'K&R" type of Python book? The book that you'd better have on > your shelf if you are going into Python? I would recommend "Programming Python 3rd Ed." by Lutz or "Core Python Programming" by Chun. Lutz has more

something wrong with wxPython list ?

2007-08-04 Thread Stef Mientki
hello, All my posts to [EMAIL PROTECTED] seems to be rejected since today ? Is there anything wrong with that list ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: the one python book

2007-08-04 Thread Neil Cerutti
On 2007-08-04, Michael Tobis <[EMAIL PROTECTED]> wrote: > On Aug 4, 9:32 am, Neil Cerutti <[EMAIL PROTECTED]> wrot >> With Python, you won't find anything like that. Python is too >> huge. > > That's silly. Python is small in the sense that C is small. What way of measuring makes that true? > Th

Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-08-04 Thread grocery_stocker
On Jul 25, 12:45 pm, [EMAIL PROTECTED] wrote: > Python is a better language, with php support, anyway, but I am fed up > with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin > Perl experience for everyone. Instead of being helpful, snide remarks, > back-biting, scare tactings, and

Problems with headers in email.message

2007-08-04 Thread Slippy
Hi, python newbie, struggling to learn here. I'm trying to write a simple program which posts messages to my google group (via email). I'm using smtplib, email and email.message to build and send a message, but all the header attributes are appearing in the message body, so my messages are arriving

Re: (no) fast boolean evaluation ?

2007-08-04 Thread Paddy
On Aug 2, 10:47 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I discovered that boolean evaluation in Python is done "fast" > (as soon as the condition is ok, the rest of the expression is ignored). > > Is this standard behavior or is there a compiler switch to turn it on/off ? > > thank

Re: the one python book

2007-08-04 Thread Michael Tobis
On Aug 4, 9:32 am, Neil Cerutti <[EMAIL PROTECTED]> wrot > With Python, you won't find anything like that. Python is too > huge. That's silly. Python is small in the sense that C is small. The Python standard library is probably much bigger than the C standard library, but Kernghan and Richie don

Re: the one python book

2007-08-04 Thread Neil Cerutti
On 2007-08-04, dhr <[EMAIL PROTECTED]> wrote: > newbie question: > > Is there a 'K&R" type of Python book? The book that you'd > better have on your shelf if you are going into Python? C is such a small language that the same slim volume can be both a great tutorial and an awesome language refere

Re: the one python book

2007-08-04 Thread BartlebyScrivener
On Aug 4, 8:23 am, "dhr" <[EMAIL PROTECTED]> wrote: > newbie question: > > Is there a 'K&R" type of Python book? The book that you'd better have on > your shelf if you are going into Python? I second the comment about the Official Python Tutorial, however you did say, "on the shelf" in which case

Re: the one python book

2007-08-04 Thread O.R.Senthil Kumaran
> > newbie question: > > > > Is there a 'K&R" type of Python book? The book that you'd better have on Official Python Tutorial and all Library reference document is somewhat similar to K&R for C. You cannot expect the same kind of book, although a variety of good books are available in Python. De

Re: Relative-importing *

2007-08-04 Thread Ben Finney
[EMAIL PROTECTED] writes: > Yes, I'm importing * for a reason, a good one, I think. Reading your description, I must say I don't see a good reason. > I have a set of modules (the number planned to reach about 400) that > would be dynamically loaded by my program as needed, and they're > somewhat

Re: regexp problem in Python

2007-08-04 Thread Ehsan
On Aug 4, 1:22 pm, Sönmez Kartal <[EMAIL PROTECTED]> wrote: > On 4 A ustos, 00:41, Ehsan <[EMAIL PROTECTED]> wrote: > > > > > > > I want to find "http://www.2shared.com/download/1716611/e2000f22/ > > Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11" or 3gp instead of > > wmv in the text file like t

Re: the one python book

2007-08-04 Thread Aahz
In article <[EMAIL PROTECTED]>, dhr <[EMAIL PROTECTED]> wrote: > >newbie question: > >Is there a 'K&R" type of Python book? The book that you'd better have on >your shelf if you are going into Python? There really aren't any, assuming you're comfortable reading web-based material. If it's impor

[DISLIN] Polar Grid

2007-08-04 Thread MASI
Hi, in a polar graph if I define the position of the first label TOP or BOTTOM,the grid doesn't show. Is this a bug? e.g. dislin.polmod('top', 'clockwise') dislin.polar (1.,0., 0.2, 0., 30.) dislin.grdpol(3,16) -- http://mail.python.org/mailman/listinfo/python-list

Re: the one python book

2007-08-04 Thread markacy
On 4 Sie, 15:23, "dhr" <[EMAIL PROTECTED]> wrote: > newbie question: > > Is there a 'K&R" type of Python book? The book that you'd better have on > your shelf if you are going into Python? There are actually two of them: "How to Think Like a Computer Scientist: Learning with Python" by Allen B. D

the one python book

2007-08-04 Thread dhr
newbie question: Is there a 'K&R" type of Python book? The book that you'd better have on your shelf if you are going into Python? -- http://mail.python.org/mailman/listinfo/python-list

Re: Website data-mining.

2007-08-04 Thread Paul Boddie
Jay Loden wrote: > Miki wrote: > > Have a look at > > http://www.myinterestingfiles.com/2007/03/playboy-germany-ads.html > > Well, it's certainly interesting, but I'm not sure how it might help the OP > get data from a website... A case of the Freudian clipboard, perhaps? ;-) Paul -- http://m

Re: how to run os.execv() to run command pslq dbname < gen.command

2007-08-04 Thread Steve Holden
Sonu wrote: > hello all , > i need to run psql from my py file,, > for that i am using : os.execv(path for psql ,['psql dbname < > gen.command']) > but its not working .. > I want to watch my TV, but it's not working. Can you tell me how to fix it? ... > the command wht i want to run fr

Re: bias in random.normalvariate??

2007-08-04 Thread Steve Holden
Robert Kern wrote: > [EMAIL PROTECTED] wrote: >> I'm a Python newbie and certainly no expert on statistics, but my wife >> was taking a statistics course this summer and to illustrate that >> sampling random numbers from a distribution and taking an average of >> the samples gives you a random numb

how to run os.execv() to run command pslq dbname < gen.command

2007-08-04 Thread Sonu
hello all , i need to run psql from my py file,, for that i am using : os.execv(path for psql ,['psql dbname < gen.command']) but its not working .. the command wht i want to run from this py file is :>>>psql dbname < gen.command where gen.command file contain some command to create csv

Re: regexp problem in Python

2007-08-04 Thread Sönmez Kartal
On 4 A ustos, 00:41, Ehsan <[EMAIL PROTECTED]> wrote: > I want to find "http://www.2shared.com/download/1716611/e2000f22/ > Jadeed_Mlak14.wmv?tsid=20070803-164051-9d637d11" or 3gp instead of > wmv in the text file like this : > > ""some code"" > function reportAbuse() { > var windowname="abus

Re: How to pass a reference to the current module

2007-08-04 Thread Paul Rubin
James Stroud <[EMAIL PROTECTED]> writes: > FunctionUser.do_something_with(globals(), 'doit', 7) How about instead of "import FunctionUser", require from FunctionUser import do_something In FunctionUser.py, write: frob = (some object that gets necessary stuff from module environment)

Re: How to pass a reference to the current module

2007-08-04 Thread Peter Otten
James Stroud wrote: > Yes, those were typos. And to be consistent, the whole listing of the > configuration file should be (note: 'doit'->do_something_with): > > [foo] > param1 = float > param2 = 4 > > [option1] > __module__ = UserDefined1 > __function__ = do_something_with > param1 = str > para

Re: How to pass a reference to the current module

2007-08-04 Thread James Stroud
Steven D'Aprano wrote: > I suggest you're falling for the anti-pattern of "Big Design Up Front", > and are overly complicating your system "just in case it's useful". Why > not just _insist_ that main.py and UserDefined1.py must be different > modules? You're the application developer, you're allow

Re: Auto run/Timer

2007-08-04 Thread Stargaming
On Sat, 04 Aug 2007 08:27:05 +, Rohan wrote: > Hello, > I would like my script to run once a week with out any external > interference. > More like a timer. Can it be done in python or should some other shell > scripting be used. > If anyone knows anything please let me know. `cron` should be

Auto run/Timer

2007-08-04 Thread Rohan
Hello, I would like my script to run once a week with out any external interference. More like a timer. Can it be done in python or should some other shell scripting be used. If anyone knows anything please let me know. -- http://mail.python.org/mailman/listinfo/python-list

Re: Help: GIS

2007-08-04 Thread momobear
On Aug 3, 11:46 am, zxo102 <[EMAIL PROTECTED]> wrote: > Hi, > I am new in GIS area and need your suggestions for where I can > start from. I have a python based web application with a database. > Now I would like to add a GIS map into my application. When a user > clicks a certain area in the

Registration is open for the 5th Python game challenge!

2007-08-04 Thread Richard Jones
The fifth PyWeek is only a month away. Come along and join the fun: write a video game in a week! There's some really interesting new libraries that have popped up recently. Have a gander on the pyweek message board for more info. REGISTRATION IS OPEN Visit the PyWeek website for more informati