Re: name capitalization of built-in types, True, and False

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 17:37:48 -0300, <[EMAIL PROTECTED]> escribió: > I see that naming conventions are such that classes usually get named > CamelCase. So why are the built-in types named all lowercase (like > list, dict, set, bool, etc.)? Because most of them originally were types and factory fun

Re: Recursion limit problems

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 19:17:57 -0300, elventear <[EMAIL PROTECTED]> escribió: > I am runing into recursion limit problems. I have found that the > culprit was related to the __hash__ function that I had assigned to > the objects that were added to a set. As T. Reedy said, probably you have a recu

Re: searching algorithm

2007-05-11 Thread Michael Bentley
On May 11, 2007, at 3:50 AM, Michael Bentley wrote: > > Here's an idea: use a rats' nest of dictionaries and do all the > lookup work up front when you build the rats' nest. Maybe something > like this: ... Oops! This is better :-) #! /usr/bin/env python import pprint dictionary = """absinth

Re: py2exe LoadLibrary question

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 19:22:53 -0300, <[EMAIL PROTECTED]> escribió: > Yep, it's the old LoadLibrary failed problem. > > I understand that python24.dll is required for the executable to run, > but I'm going to be building a few of these executables and I don't > want to have to bundle python24 along

Re: help with Python C-API, tuple object

2007-05-11 Thread fabian . conrad
On May 12, 2:49 pm, "Carsten Haese" <[EMAIL PROTECTED]> wrote: > On 11 May 2007 21:11:06 -0700, fabian.conrad wrote > > > Hi, > > sorry for the rather basic question but I've searched everywhere and > > don't find an answer. > > I want to call PyObject_CallObject from the Python C-API and pass a >

Re: Recursion limit problems

2007-05-11 Thread Terry Reedy
"elventear" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hello everyone, | | I am runing into recursion limit problems. I have found that the | culprit was related to the __hash__ function that I had assigned to | the objects that were added to a set. | | Basically my __hash__ fu

Re: help with Python C-API, tuple object

2007-05-11 Thread Carsten Haese
On 11 May 2007 21:11:06 -0700, fabian.conrad wrote > Hi, > sorry for the rather basic question but I've searched everywhere and > don't find an answer. > I want to call PyObject_CallObject from the Python C-API and pass a > tuple I've created from a C-array > > How can I pass the tuple as an objec

Re: os.popen on windows: loosing stdout of child process

2007-05-11 Thread half . italian
On May 11, 8:46 pm, Greg Ercolano <[EMAIL PROTECTED]> wrote: > When I use os.popen(cmd,'w'), I find that under windows, the stdout > of the child process disappears, instead of appearing in the DOS > window > the script is invoked from. eg: > > C:\> type foo.py > import os

Re: name capitalization of built-in types, True, and False

2007-05-11 Thread James Stroud
[EMAIL PROTECTED] wrote: > I see that naming conventions are such that classes usually get named > CamelCase. So why are the built-in types named all lowercase (like > list, dict, set, bool, etc.)? > > And names for instances of classes are usually written in lowercase, > like foo in ``foo = Camel

Re: os.popen on windows: loosing stdout of child process

2007-05-11 Thread Gabriel Genellina
En Sat, 12 May 2007 00:46:16 -0300, Greg Ercolano <[EMAIL PROTECTED]> escribió: > When I use os.popen(cmd,'w'), I find that under windows, the stdout > of the child process disappears, instead of appearing in the DOS window > the script is invoked from. eg: [...] > When I

help with Python C-API, tuple object

2007-05-11 Thread fabian . conrad
Hi, sorry for the rather basic question but I've searched everywhere and don't find an answer. I want to call PyObject_CallObject from the Python C-API and pass a tuple I've created from a C-array How can I pass the tuple as an object rather then having to declare the python function with the numb

Re: path stuff

2007-05-11 Thread Gabriel Genellina
En Fri, 11 May 2007 13:25:55 -0300, fscked <[EMAIL PROTECTED]> escribió: >> import os, sys, os.path, fnmatch >> >> def findinterestingfiles(root_dir): >>for dirpath, dirnames, filenames in os.walk(root_dir): >> if "Archived" in dirnames: >>dirnames.remove("Archived") >> for

Re: need help with python

2007-05-11 Thread Paul McGuire
On May 11, 10:37 pm, [EMAIL PROTECTED] wrote: > On May 11, 10:16 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > > > > On May 11, 9:41 pm, [EMAIL PROTECTED] wrote: > > > > On May 11, 9:34 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > > On May 11, 8:47 pm, [EMAIL PROTECTED] wrote: > > > >

Re: Newbie look at Python and OO

2007-05-11 Thread Steven D'Aprano
On Fri, 11 May 2007 20:07:36 -0700, walterbyrd wrote: >> He's thinking in Pascal, not C. >> > > Actually, I have programmed in many languages. I just first learned in > Pascal. > > For me, going from Pascal, to basic,c,cobol,fortran . . was not that > difficult. Python, however, feels strange.

os.popen on windows: loosing stdout of child process

2007-05-11 Thread Greg Ercolano
When I use os.popen(cmd,'w'), I find that under windows, the stdout of the child process disappears, instead of appearing in the DOS window the script is invoked from. eg: C:\> type foo.py import os import sys file = os.popen("nslookup", 'w') file.write("google.com\n") file

Re: need help with python

2007-05-11 Thread adamurbas
On May 11, 10:16 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 11, 9:41 pm, [EMAIL PROTECTED] wrote: > > > > > On May 11, 9:34 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > On May 11, 8:47 pm, [EMAIL PROTECTED] wrote: > > > > > ya so im pretty much a newb to this whole python thing...

Re: Newbie question about string(passing by ref)

2007-05-11 Thread Steven D'Aprano
On Thu, 10 May 2007 14:53:46 -0700, Gary Herron wrote: > Strings *are* passed by reference *always*. There is no copy and no > overhead. Efficiency is not based on length. Since the string is > immutable, nothing you do inside the function can change the string > outside the function. Python d

Re: Simple Python REGEX Question

2007-05-11 Thread Steven D'Aprano
On Fri, 11 May 2007 08:54:31 -0700, johnny wrote: > I need to get the content inside the bracket. > > eg. some characters before bracket (3.12345). > > I need to get whatever inside the (), in this case 3.12345. > > How do you do this with python regular expression? Why would you bother? If yo

Re: stealth screen scraping with python?

2007-05-11 Thread Steven D'Aprano
On Fri, 11 May 2007 12:32:55 -0700, different.engine wrote: > Folks: > > I am screen scraping a large volume of data from Yahoo Finance each > evening, and parsing with Beautiful Soup. > > I was wondering if anyone could give me some pointers on how to make > it less obvious to Yahoo that this i

Re: Newbie look at Python and OO

2007-05-11 Thread Grant Edwards
On 2007-05-12, walterbyrd <[EMAIL PROTECTED]> wrote: >> He's thinking in Pascal, not C. > > Actually, I have programmed in many languages. I just first learned in > Pascal. > > For me, going from Pascal, to basic,c,cobol,fortran . . was not that > difficult. That's because those languages are al

Re: Newbie look at Python and OO

2007-05-11 Thread Grant Edwards
On 2007-05-12, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Thu, 10 May 2007 16:25:35 +, Grant Edwards wrote: > >>> I know why, but this is not what I would ordinarilly expect, >> >> Stop thinking in "C". ;) > > Dude! Did you miss the Original Poster's VERY FIRST SENTENCE??? > > "I learned

Re: need help with python

2007-05-11 Thread Paul McGuire
On May 11, 9:41 pm, [EMAIL PROTECTED] wrote: > On May 11, 9:34 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > > > > > > > On May 11, 8:47 pm, [EMAIL PROTECTED] wrote: > > > > ya so im pretty much a newb to this whole python thing... its pretty > > > cool but i just started today and im already havin

Re: Newbie look at Python and OO

2007-05-11 Thread walterbyrd
> He's thinking in Pascal, not C. > Actually, I have programmed in many languages. I just first learned in Pascal. For me, going from Pascal, to basic,c,cobol,fortran . . was not that difficult. Python, however, feels strange. As crazy as this may sound: Python, in some ways, reminds me of asse

Re: OMG BRITNEYS AT IT AGAIN AGAIN!!!!!!

2007-05-11 Thread mykey
On May 11, 3:03 pm, notbob <[EMAIL PROTECTED]> wrote: > On 2007-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > >http://britneyboobs.blogspot.com/2007/05/britney-spears-slips-up-agai... > > - Exclusive pics of Britney Spears.. > > Britneyboobs what?... you take pride in being one? >

Re: need help with python

2007-05-11 Thread adamurbas
On May 11, 9:34 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 11, 8:47 pm, [EMAIL PROTECTED] wrote: > > > > > ya so im pretty much a newb to this whole python thing... its pretty > > cool but i just started today and im already having trouble. i > > started to use a tutorial that i found so

Re: need help with python

2007-05-11 Thread Paul McGuire
On May 11, 8:47 pm, [EMAIL PROTECTED] wrote: > ya so im pretty much a newb to this whole python thing... its pretty > cool but i just started today and im already having trouble. i > started to use a tutorial that i found somewhere and i followed the > instructions and couldnt get the correct resu

Re: need help with python

2007-05-11 Thread adamurbas
On May 11, 9:11 pm, "Ian Clark" <[EMAIL PROTECTED]> wrote: > On 11 May 2007 18:47:27 -0700, [EMAIL PROTECTED] > > > > <[EMAIL PROTECTED]> wrote: > > ya so im pretty much a newb to this whole python thing... its pretty > > cool but i just started today and im already having trouble. i > > started t

Re: Newbie look at Python and OO

2007-05-11 Thread Steven D'Aprano
On Thu, 10 May 2007 16:25:35 +, Grant Edwards wrote: >> I know why, but this is not what I would ordinarilly expect, > > Stop thinking in "C". ;) Dude! Did you miss the Original Poster's VERY FIRST SENTENCE??? "I learned to program with Pascal, way back when." He's thinking in Pascal, not

Re: need help with python

2007-05-11 Thread Ian Clark
On 11 May 2007 18:47:27 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ya so im pretty much a newb to this whole python thing... its pretty > cool but i just started today and im already having trouble. i > started to use a tutorial that i found somewhere and i followed the > instructions a

need help with python

2007-05-11 Thread adamurbas
ya so im pretty much a newb to this whole python thing... its pretty cool but i just started today and im already having trouble. i started to use a tutorial that i found somewhere and i followed the instructions and couldnt get the correct results. heres the code stuff... temperature=input("wha

Re: docs patch: dicts and sets

2007-05-11 Thread Raymond Hettinger
On May 11, 5:59 pm, "Alan Isaac" <[EMAIL PROTECTED]> wrote: > This is an attempt to synthesize Bill and Carsten's proposals. > (I'm changing the subject line to better match the topic.) > > http://docs.python.org/lib/typesmapping.html:for footnote (3) > > Keys and values are listed in an ar

logging module and threading

2007-05-11 Thread Ross Boylan
I would like my different threads to log without stepping on each other. Past advice on this list (that I've found) mostly says to send the messages to a Queue. That would work, but bypasses the logging module's facilities. The logging module itself is "thread-safe", but I think that just means

Re: module error for elementtree

2007-05-11 Thread John Machin
On May 11, 11:12 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On 11 May 2007 00:05:19 -0700, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > For the above code to work elementtree is > > imported in first line ,but when running it says : > > ImportError: No module named e

docs patch: dicts and sets

2007-05-11 Thread Alan Isaac
This is an attempt to synthesize Bill and Carsten's proposals. (I'm changing the subject line to better match the topic.) http://docs.python.org/lib/typesmapping.html: for footnote (3) Keys and values are listed in an arbitrary order. This order is indeterminate and generally dep

Re: Simple Python REGEX Question

2007-05-11 Thread John Machin
On May 12, 2:21 am, Gary Herron <[EMAIL PROTECTED]> wrote: > johnny wrote: > > I need to get the content inside the bracket. > > > eg. some characters before bracket (3.12345). > > > I need to get whatever inside the (), in this case 3.12345. > > > How do you do this with python regular expression?

Re: matplotlib: howto set title of whole window?

2007-05-11 Thread attn . steven . kuo
On May 11, 3:44 pm, dmitrey <[EMAIL PROTECTED]> wrote: > hi all, > does anyone know howto set title of whole window? (I mean not just > area above plot but string in the same line where buttons 'close', > 'iconify', 'fullscreen' are situated) > Use coordinates to set a title for the current figur

Re: Questions about bsddb

2007-05-11 Thread sinoodle
Thanks for the suggestion, I do remember reading that, but I don't think that helped much. I found experimenting around with the different settings, that the cache size is where the problem was. I've got it set to 1.5 GB and it's pretty happy at the moment, and the reduction in build time is a fra

Re: Time

2007-05-11 Thread John Machin
On May 12, 7:46 am, HMS Surprise <[EMAIL PROTECTED]> wrote: [first message] HS ==> I need to convert the string below into epoch seconds so that I can perform substractions and additions. JM ==> I presume you mean "seconds since the epoch". You don't need to do that. HS ==> I assume I will need

Re: Path python versions and Macosx

2007-05-11 Thread half . italian
On May 11, 1:36 pm, andrea <[EMAIL PROTECTED]> wrote: > Hi everyone, > I use python on macosx with textmate as editor (great program). > > I also use macport to install unix programs from the command line and > I find it great too. > Well I would like to have all my modules in the path when I'm usi

mmap thoughts

2007-05-11 Thread James T. Dennis
I've been thinking about the Python mmap module quite a bit during the last couple of days. Sadly most of it has just been thinking ... and reading pages from Google searches ... and very little of it as been coding. Mostly it's just academic curiosity (I might be teaching an "overview of

find out all threads?

2007-05-11 Thread Sven Rech
Hi, I have a written a C program which makes use of python embedding. I want to find out all threads that a loaded module has started. But I can't find anything about this in the docs. Is it possible? -- http://mail.python.org/mailman/listinfo/python-list

matplotlib: howto set title of whole window?

2007-05-11 Thread dmitrey
hi all, does anyone know howto set title of whole window? (I mean not just area above plot but string in the same line where buttons 'close', 'iconify', 'fullscreen' are situated) Thx, D. -- http://mail.python.org/mailman/listinfo/python-list

py2exe LoadLibrary question

2007-05-11 Thread gordon . chapman
Yep, it's the old LoadLibrary failed problem. I understand that python24.dll is required for the executable to run, but I'm going to be building a few of these executables and I don't want to have to bundle python24 along with each one. We have python24.dll installed in c:/windows/system32, why i

Recursion limit problems

2007-05-11 Thread elventear
Hello everyone, I am runing into recursion limit problems. I have found that the culprit was related to the __hash__ function that I had assigned to the objects that were added to a set. Basically my __hash__ function is the following: def __hash__(self): out_int = 0

Re: OMG BRITNEYS AT IT AGAIN AGAIN!!!!!!

2007-05-11 Thread notbob
On 2007-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > http://britneyboobs.blogspot.com/2007/05/britney-spears-slips-up-again-exposes.html > - Exclusive pics of Britney Spears.. Britneyboobs what?... you take pride in being one? nb -- http://mail.python.org/mailman/listinfo/python

OMG BRITNEYS AT IT AGAIN AGAIN!!!!!!

2007-05-11 Thread wise . of . clean789
http://britneyboobs.blogspot.com/2007/05/britney-spears-slips-up-again-exposes.html - Exclusive pics of Britney Spears.. -- http://mail.python.org/mailman/listinfo/python-list

Re: Time

2007-05-11 Thread HMS Surprise
Sorry, reading a little closer I see that the time tuple is apparently an ordinary list. jvh -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
Just an update of my output after Carsten and company's advice: C:\Python25\rg.py>help.py -h help.py Version 1.0 Copyright RDEG (c) 2007 Options : -h, --help -- display this message Progam Exit (0) C:\Python25\rg.py>help.py -i print arg ['-i'] type(arg): arg is True? False

Re: Interesting list Validity (True/False)

2007-05-11 Thread [EMAIL PROTECTED]
On May 11, 3:36 pm, [EMAIL PROTECTED] wrote: > On May 11, 2:28 pm, [EMAIL PROTECTED] wrote: > > > > > > > > > > Hello all, > > > > First let me appologise if this has been answered but I could not find > > > an acurate answer to this interesting problem. > > > > If the following is true: > > >

Re: Interesting list Validity (True/False)

2007-05-11 Thread Rob Williscroft
wrote in news:[EMAIL PROTECTED] in comp.lang.python: > >>> [] == [] > True > >>> ['-o'] == [] > False > >>> ['-o'] == False > False > >>> To test wether something is true use if. To test wether something is false use if not. The python values "True" and "False" are

Re: setting extra data to a wx.textctrl

2007-05-11 Thread Pom
[EMAIL PROTECTED] wrote: > On May 10, 10:51 pm, Pom <[EMAIL PROTECTED]> wrote: >> Hello group! >> >> I have an application which uses a lot of mysql data fields, all the >> same data type (floats). >> >> I created a panel which executes a "SELECT * FROM tablename" and makes >> as much fields as nee

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
On May 11, 5:19 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-05-11 at 14:12 -0700, [EMAIL PROTECTED] wrote: > > However, how would you test for the falsness of the object arg? > > if not arg: ># stuff > > -- > Carsten Haesehttp://informixdb.sourceforge.net I think that is the ti

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
On May 11, 5:12 pm, [EMAIL PROTECTED] wrote: > On May 11, 5:07 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > > > > > > > On Fri, 2007-05-11 at 12:28 -0700, [EMAIL PROTECTED] wrote: > > > Hello all, > > > > First let me appologise if this has been answered but I could not find > > > an acurate answ

Re: Interesting list Validity (True/False)

2007-05-11 Thread Carsten Haese
On Fri, 2007-05-11 at 14:12 -0700, [EMAIL PROTECTED] wrote: > However, how would you test for the falsness of the object arg? if not arg: # stuff -- Carsten Haese http://informixdb.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
On May 11, 5:07 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-05-11 at 12:28 -0700, [EMAIL PROTECTED] wrote: > > Hello all, > > > First let me appologise if this has been answered but I could not find > > an acurate answer to this interesting problem. > > > If the following is true: >

Re: Interesting list Validity (True/False)

2007-05-11 Thread Carsten Haese
On Fri, 2007-05-11 at 14:07 -0700, [EMAIL PROTECTED] wrote: > OK. Then how would you differenciate between a call with an option > versus one without (e.g. help.py -o (where arg == ['-o']) Vs. help.py > (where arg == []))? if arg: print "With options" else: print "Without options" -- Carsten

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
On May 11, 4:32 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On Fri, May 11, 2007 at 01:20:44PM -0700, [EMAIL PROTECTED] > wrote: > > > On May 11, 3:55 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > > > You got those results because that's what your program does. > > > > Were you intending it to

Problems with grid() layout under tkinter

2007-05-11 Thread Thomas Jansson
Dear all I am trying to make a small wrapper program for textbased program and it is going well but I have one problem. Namely that I simply do not understand how this grid thing work. I have assigned every widget a specific placement in a grid but when I am running the program it looks very stran

Re: Interesting list Validity (True/False)

2007-05-11 Thread Carsten Haese
On Fri, 2007-05-11 at 12:28 -0700, [EMAIL PROTECTED] wrote: > Hello all, > > First let me appologise if this has been answered but I could not find > an acurate answer to this interesting problem. > > If the following is true: > C:\Python25\rg.py>python > Python 2.5.1 (r251:54863, Apr 18

Re: Simulating simple electric circuits

2007-05-11 Thread Bjoern Schliessmann
Dave Baum wrote: > Sounds reasonable. Depending on the size of your network, I might > not worry too much about precomputing and saving information. Thanks. Yes, I'm actually testing it presently without any optimizations and it runs very well. > If your circuit has loops in it (where the ou

Re: Time

2007-05-11 Thread HMS Surprise
> > Could you point to an example of a python time_t struct? > Or maybe that should be a tm struct??? -- http://mail.python.org/mailman/listinfo/python-list

Time

2007-05-11 Thread HMS Surprise
I need to convert the string below into epoch seconds so that I can perform substractions and additions. I assume I will need to break it up into a time_t struct and use mktime. Two questions if you will please: Is there a way to use multiple separator characters for split similar to awk's [|] st

name capitalization of built-in types, True, and False

2007-05-11 Thread cbtube03
I see that naming conventions are such that classes usually get named CamelCase. So why are the built-in types named all lowercase (like list, dict, set, bool, etc.)? And names for instances of classes are usually written in lowercase, like foo in ``foo = CamelCase()``. So why are True and False (

Path python versions and Macosx

2007-05-11 Thread andrea
Hi everyone, I use python on macosx with textmate as editor (great program). I also use macport to install unix programs from the command line and I find it great too. Well I would like to have all my modules in the path when I'm using textmate AND when I use the commandline (ipython), but because

Re: Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
On May 11, 2:28 pm, [EMAIL PROTECTED] wrote: > > > > > > > Hello all, > > > First let me appologise if this has been answered but I could not find > > an acurate answer to this interesting problem. > > > If the following is true: > > C:\Python25\rg.py>python > > Python 2.5.1 (r251:54863, A

Re: Interesting list Validity (True/False)

2007-05-11 Thread Grant Edwards
On Fri, May 11, 2007 at 01:20:44PM -0700, [EMAIL PROTECTED] wrote: > On May 11, 3:55 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > > You got those results because that's what your program does. > > > > Were you intending it to do something else? If so, you're > > going to have to explain what you

Re: test

2007-05-11 Thread Sherm Pendley
Joe Eagar <[EMAIL PROTECTED]> writes: > sorry just a test. Sorry, you failed. You missed alt.test by a mile. sherm-- -- Web Hosting by West Virginians, for West Virginians: http://wv-www.net Cocoa programming in Perl: http://camelbones.sourceforge.net -- http://mail.python.org/mailman/listinf

Re: Interesting list Validity (True/False)

2007-05-11 Thread [EMAIL PROTECTED]
On May 11, 2:28 pm, [EMAIL PROTECTED] wrote: > Hello all, > > First let me appologise if this has been answered but I could not find > an acurate answer to this interesting problem. > > If the following is true: > C:\Python25\rg.py>python > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [

test

2007-05-11 Thread Joe Eagar
sorry just a test. Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting list Validity (True/False)

2007-05-11 Thread Grant Edwards
On 2007-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Then why do I get the following results: > C:\Python25\rg.py>help.py -o > print arg ['-o'] > type(arg): > arg is True? False > help.py version 1.0 Copyright RDEG (c) 2007 > ['-o'] is an unrecognized opti

Re: stealth screen scraping with python?

2007-05-11 Thread kyosohma
On May 11, 2:32 pm, [EMAIL PROTECTED] wrote: > Folks: > > I am screen scraping a large volume of data from Yahoo Finance each > evening, and parsing with Beautiful Soup. > > I was wondering if anyone could give me some pointers on how to make > it less obvious to Yahoo that this is what I am doing,

Re: File writing success

2007-05-11 Thread Facundo Batista
HMS Surprise wrote: > If file writing has no return value (http://docs.python.org/lib/bltin- > file-objects.html), how do you know if the write was successful? If not, you'll get an error raised. Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/

Re: stealth screen scraping with python?

2007-05-11 Thread Dotan Cohen
On 11 May 2007 12:32:55 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Folks: > > I am screen scraping a large volume of data from Yahoo Finance each > evening, and parsing with Beautiful Soup. > > I was wondering if anyone could give me some pointers on how to make > it less obvious to Yaho

stealth screen scraping with python?

2007-05-11 Thread different . engine
Folks: I am screen scraping a large volume of data from Yahoo Finance each evening, and parsing with Beautiful Soup. I was wondering if anyone could give me some pointers on how to make it less obvious to Yahoo that this is what I am doing, as I fear that they probably monitor for this type of ac

Interesting list Validity (True/False)

2007-05-11 Thread nufuhsus
Hello all, First let me appologise if this has been answered but I could not find an acurate answer to this interesting problem. If the following is true: C:\Python25\rg.py>python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "c

Re: File writing success

2007-05-11 Thread Jon Ribbens
On 2007-05-11, HMS Surprise <[EMAIL PROTECTED]> wrote: > If file writing has no return value (http://docs.python.org/lib/bltin- > file-objects.html), how do you know if the write was successful? Because no exception was thrown? Although bear in mind that some errors might not become apparent unti

Re: File writing success

2007-05-11 Thread Jason
On May 11, 12:21 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > If file writing has no return value (http://docs.python.org/lib/bltin- > file-objects.html), how do you know if the write was successful? > Should one assume that if the open was successful then write are also? > > Thanks, > > jvh In P

Re: Towards faster Python implementations - theory

2007-05-11 Thread Terry Reedy
"sturlamolden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On May 10, 4:02 pm, Tim Golden <[EMAIL PROTECTED]> wrote: | I know, I know. But that doesn't stop me from envying what the Lisp | community has achieved. But do not let your envy stop you from noticing and appreciating

A newbie question about FileDialog in wxPython

2007-05-11 Thread OhKyu Yoon
Hi! I am opening files using the wx.FileDialog in wxPython. I want to modify the FileDialog such that some information about a highlighted file is displayed before I decide to open the file. This is what I tried: class ModifiedFileDialog(wx.FileDialog): def __init__(self,parent,message,wildca

File writing success

2007-05-11 Thread HMS Surprise
If file writing has no return value (http://docs.python.org/lib/bltin- file-objects.html), how do you know if the write was successful? Should one assume that if the open was successful then write are also? Thanks, jvh -- http://mail.python.org/mailman/listinfo/python-list

Re: File modes

2007-05-11 Thread HMS Surprise
On May 10, 7:11 pm, Jon Pentland <[EMAIL PROTECTED]> wrote: > I don't really see the use for being able to do that. Have you tried > Well, I think I found a reason and it probably happens quite a bit. I open the file and read it into a list. I pop some elements from the list for processing and th

Re: software testing articles

2007-05-11 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Have you ever been interested in software testing? Giving you an in | depth analysis/knowledge on software testing!! Random non-Python IT topics are spam. Please desist. [Link to page with 75% ads deleted] -- http://mail.python.o

Re: Better way to isolate string

2007-05-11 Thread HMS Surprise
On May 11, 10:45 am, Tim Golden <[EMAIL PROTECTED]> wrote: > HMS Surprise wrote: > > I suppose a one liner would look better, but I am alway leery of these > > things 'breaking'. > > > t = s.split('">')[-1].split('<')[0] > > s ='G132153' > > Only if you're competing in an obscurity competition ;) >

Re: Towards faster Python implementations - theory

2007-05-11 Thread Paul Boddie
On 11 May, 18:04, John Nagle <[EMAIL PROTECTED]> wrote: > > Another problem is that if the language is defined as > "whatever gets put in CPython", that discourages other > implementations. The language needs to be standards-based. Indeed. This was suggested by one of the speakers at last ye

Re: path stuff

2007-05-11 Thread fscked
On May 10, 6:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > > > > > ok, I lied, it is still doing the archived folders. Here is the code: > > > import os, sys > > from path import path > > > myfile = open("b

Re: Simple Python REGEX Question

2007-05-11 Thread Gary Herron
johnny wrote: > I need to get the content inside the bracket. > > eg. some characters before bracket (3.12345). > > I need to get whatever inside the (), in this case 3.12345. > > How do you do this with python regular expression? > >>> import re >>> x = re.search("[0-9.]+", "(3.12345)") >>> pr

Re: Towards faster Python implementations - theory

2007-05-11 Thread John Nagle
Tim Golden wrote: > sturlamolden wrote: > >> On May 8, 5:53 pm, John Nagle <[EMAIL PROTECTED]> wrote: >> >>> The point here is that we don't need language changes or >>> declarations >>> to make Python much faster. All we need are a few restrictions that >>> insure that, when you're doing so

Re: Newbie look at Python and OO

2007-05-11 Thread Grant Edwards
On 2007-05-11, Duncan Booth <[EMAIL PROTECTED]> wrote: > Grant Edwards <[EMAIL PROTECTED]> wrote: > >> http://www.ariel.com.au/jokes/An_Interview_with_Bjarne_Stroustrup.html >> >> Maybe BS thought he was joking, but IMO, it's true. >> >> "Stroustrup: Remember the length of the average-sized 'C'

Simple Python REGEX Question

2007-05-11 Thread johnny
I need to get the content inside the bracket. eg. some characters before bracket (3.12345). I need to get whatever inside the (), in this case 3.12345. How do you do this with python regular expression? -- http://mail.python.org/mailman/listinfo/python-list

Re: vim e autoindentazione commenti

2007-05-11 Thread Alan Franzoni
Il Fri, 11 May 2007 13:15:01 GMT, Neil Cerutti ha scritto: >:help format-comments > > (Spiacente per la mia scrittura difettosa. Sto utilizzando il > traduttore di altavista.) Really sorry ^_^ I thought I was posting in it.comp.lang.python Thank you BTW! -- Alan Franzoni <[EMAIL PROTECTED]>

PyGTK : a NEW simple way to code an app

2007-05-11 Thread manatlan
I was a fan of "SimpleGladeApp/tepache way" to build a pygtk app. I've build a new efficient/dynamic way to build a pygtk app ... Here is an example : = class Fen(GladeApp): """ Window win .title="Hello" @delete_event

Re: Better way to isolate string

2007-05-11 Thread Tim Golden
HMS Surprise wrote: > I suppose a one liner would look better, but I am alway leery of these > things 'breaking'. > > t = s.split('">')[-1].split('<')[0] > s ='G132153' Only if you're competing in an obscurity competition ;) If you're really confined to built-ins (ie you can't import a single mo

Re: Better way to isolate string

2007-05-11 Thread HMS Surprise
I suppose a one liner would look better, but I am alway leery of these things 'breaking'. t = s.split('">')[-1].split('<')[0] s ='G132153' jh -- http://mail.python.org/mailman/listinfo/python-list

Better way to isolate string

2007-05-11 Thread HMS Surprise
Greetings. Given the string s below and using only python built-in capabilities, I am trying to isolate the substring G132153. This string may have any number of digits but the pieces around it will not change. I have accomplished this with split but there must be a more elegant and compact way t

Re: Newbie look at Python and OO

2007-05-11 Thread Duncan Booth
Grant Edwards <[EMAIL PROTECTED]> wrote: > http://www.ariel.com.au/jokes/An_Interview_with_Bjarne_Stroustrup.html > > Maybe BS thought he was joking, but IMO, it's true. > > "Stroustrup: Remember the length of the average-sized 'C' >project? About 6 months. Not nearly long enough for a guy

Re: Towards faster Python implementations - theory

2007-05-11 Thread sturlamolden
On May 10, 7:18 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > Unfortunately, native machine code depends on the machine, or at least the > machine being emulated by the hardware. Fortunately or not, the dominance > of the x386 model makes this less of a problem. CMUCL and SBCL depends on the do

Re: Towards faster Python implementations - theory

2007-05-11 Thread sturlamolden
On May 10, 4:02 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > But the relevant bit of your last paragraph is at the start: > "We should...". Sorry, bad choice of words. > see it faster. That's great. But unless people > puts their money where their mouths are, I don't I know, I know. But that doe

Re: Newbie look at Python and OO

2007-05-11 Thread Grant Edwards
On 2007-05-10, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 18:21:42 -0300, <[EMAIL PROTECTED]> escribió: > >> These conversations are funny to me. I use Python every day and I >> have never actually thought about the implications of binding objects >> to names, or two names

Re: software testing articles

2007-05-11 Thread Andrew Koenig
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Have you ever been interested in software testing? Giving you an in > depth analysis/knowledge on software testing!! Looking around the site at random, I saw no "in depth analysis/knowledge" of anything. -- http://mail.python.org/

Re: searching algorithm

2007-05-11 Thread Alex Martelli
Michael Bentley <[EMAIL PROTECTED]> wrote: > > > > Call me dense, but how does one do this in Python - which doesn't have > > pointers? Dictionaries with dictionaries within dictionaries... (with > > each letter as the key and the its children as values) is going to be > > extremely space ineffici

  1   2   >