Re: 3d programming without opengl

2006-11-01 Thread Paul McGuire
"Jordan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On > the other hand, I thought that you were looking for something that > doesn't use openGL and I think that Slut is built around it. > Yes, slut *does* use OpenGL, so if that is in fact a poison pill for this app, it's a n

Re: elementtree terminology + tangential questions

2006-11-04 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 2) None of the xml documents to which I've had exposure (a very, very > small set) have had text between an element's end tag and the next tag, Text elements are not limited to printed/visible text. If you parsed a formatted XML strin

Re: Awesome Python Information

2006-11-05 Thread Paul McGuire
"Brandon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Check out: www.ChezBrandon.com > By which he means, "do NOT waste your time checking out this ridiculous website with absolutely no Python whatever anywhere." (This is the idiot who claims he saved the Congress from some Moss

Re: Python Distilled

2006-11-06 Thread Paul McGuire
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In <[EMAIL PROTECTED]>, Simon Wittber > wrote: > >> I'd also like to remove any deprecated or stuff which is left in for >> backwards functionality (eg Classic classes). > > Classic classes are still needed fo

Re: string to list of numbers conversion

2006-11-06 Thread Paul McGuire
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I have a string '((1,2), (3,4))' and I want to convert this into a > python tuple of numbers. But I do not want to use eval() because I do > not want to execute any code in that string and limit it to list of

Re: decorators

2006-11-08 Thread Paul McGuire
"John Henry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I must be very thick. I keep reading about what decorators are and I > still don't have a good feel about it. See, for example: > > http://alex.dojotoolkit.org/?p=564 > > and: > > http://soiland.no/software/decorator > > W

Re: Strange re problem on OSX but Not Linux

2006-11-08 Thread Paul McGuire
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dont use regex as a name. Also, do you have any script called "re.py" > hidding that library module? or regex.py? My bet is that a local re.py is masking the lib module. (It's a shame this error is so easy to tri

Re: decorators

2006-11-08 Thread Paul McGuire
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If none of the examples make you say > "wow, I could use this" and if you don't find yourself writing > repetitive setup/teardown/housekeeping code, you can probably live quite > comfortably without using decorators. >

Re: Question regarding lists and regex

2006-11-08 Thread Paul McGuire
"Prabhu Gurumurthy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Here is a simple program, which queries /var/log/daemon on my OpenBSD box > and gets the list of valid ntp peers. > > Questions: > what is the easiest way for me to create lists on the fly, by that I mean > like pe

Re: HTML Parsing and Indexing

2006-11-16 Thread Paul McGuire
On Nov 13, 1:12 pm, [EMAIL PROTECTED] wrote: > > I need a help on HTML parser. > > > I saw a couple of python parsers like pyparsing, yappy, yapps, etc but > they havn't given any example for HTML parsing. Geez, how hard did you look? pyparsing's wiki menu includes an 'Examples' link, which take

Re: multi split function taking delimiter list

2006-11-16 Thread Paul McGuire
On Nov 14, 5:41 pm, "Sam Pointon" <[EMAIL PROTECTED]> wrote: > On Nov 14, 7:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > Hi, I'm looking for something like: > > > multi_split( 'a:=b+c' , [':=','+'] ) > > > returning: > > ['a', ':=', 'b', '+', 'c'] > > > whats the python way to achi

Re: PIL - "despeckle" image ?

2006-11-16 Thread Paul McGuire
On Nov 16, 10:58 pm, [EMAIL PROTECTED] wrote: > Hi - I have some images which I would like to remove specks from using > the PIL. I would like to be able to say that if a pixel is in a blob of > less than n contiguous pixels then all pixels in that blob should be > removed. > > The images are 8 bit

Re: unexpected behaviour for python regexp: caret symbol almost useless?

2006-05-28 Thread Paul McGuire
"conan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This regexp > '' > > works well with 'grep' for matching lines of the kind > > > on a XML .glade file > As Peter Otten has already mentioned, this is the difference between the re "match" and "search" methods. As purely a late

Re: re beginner

2006-06-04 Thread Paul McGuire
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Fantastic -- at least for the OP's carefully copied-and-pasted input. > Meanwhile back in the real world, there might be problems with multiple > tabs used for 'prettiness' instead of 1 tab, non-integer values, etc etc. > I

Re: re beginner

2006-06-04 Thread Paul McGuire
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 5/06/2006 10:07 AM, Paul McGuire wrote: > > "John Machin" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > >> Fantastic -- at least for the OP

Re: Is there a way to pass a python function ptr to a c++ method from a python script?

2006-06-05 Thread Paul McGuire
"liam_herron" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I have a core c++ library that is exposed to python through the > boost_python framework. > I would like to write the core of a Newton's method solver in C++ and > be able to write the > functions that are evaluated to be

Re: Vectorization

2006-06-06 Thread Paul McGuire
"RonnyM" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi! > > Need to vectorize this, but do not have a clue. > > a = n*m matrix > x and y are n and m vectors > > Suggestions? > > > > def fill(a, x, y): > for i in range(1,a.shape[0]): > xp = x[i] > for j in rang

Re: 10GB XML Blows out Memory, Suggestions?

2006-06-06 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I wrote a program that takes an XML file into memory using Minidom. I > found out that the XML document is 10gb. > > I clearly need SAX or something else? > You clearly need something instead of XML. This sounds like a case where a pro

Re: Newbie: returning dynamicly built lists (using win32com)

2006-06-06 Thread Paul McGuire
"Ransom" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Very newb here, but my question will hopefully be obvious to someone. > But when I try and put the output from the spreadsheet into > a dynamic list after the TODO section thusly: > > outputlist = [] > outputlis

Re: Regular Expression question

2006-06-07 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am new to python regular expression, I would like to use it to get an > attribute of an html element from an html file? > > for example, I was able to read the html file using this: >req = urllib2.Request(url=acaURL) > f

Re: Regular Expression question

2006-06-07 Thread Paul McGuire
"Frank Potter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > pyparsing is cool. > but use only re is also OK > # -*- coding: UTF-8 -*- > import urllib2 > html=urllib2.urlopen(ur"http://www.yahoo.com/";).read() > > import re > r=re.compile('[^"]+)"[^>]*>',re.IGNORECASE) > for m in r.

Re: What is Expressiveness in a Computer Language

2006-06-09 Thread Paul McGuire
"Joe Marshall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Expressiveness isn't necessarily a good thing. For instance, in C, you > can express the > addresses of variables by using pointers. You cannot express the same > thing in Java, and > most people consider this to be

Re: Screen Scraping for Modern Applications?

2006-06-11 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > Scrape means simply scraping pixel colors from locations on the screen. > I'll worry about assembling it into meaningful information. > I've used pywinauto to interact with a Flash animation panel, running within an Internet Explore

Re: Function to remove elements from a list not working (corrected)

2006-06-12 Thread Paul McGuire
"Girish Sahani" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > I am trying to modify a list of pairs (l4) by removing those > pairs which are not present in a third list called pairList. > The following is a simplified part of the routine i have written. However > it does not

Re: Combining The Best Of Python, Ruby, & Java??????

2006-06-12 Thread Paul McGuire
"Tim Daneliuk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > So it is claimed: > > http://www.infoq.com/news/Scala--combing-the-best-of-Ruby-;jsessionid=CC7C8366455E67B04EE5864B7319F5EC > > Has anyone taken a look at this that can provide a meaningful contrast > with Python? Ok, he

Re: "groupby" is brilliant!

2006-06-13 Thread Paul McGuire
> > reader = csv.reader(open('trans.csv', 'rb')) > rows = [] > for row in reader: > rows.append(row) > This is untested, but you might think about converting your explicit "for... append" loop into either a list comp, rows = [row for row in reader] or just a plain list constructor:

Re: "Adding" dictionnaries

2006-06-13 Thread Paul McGuire
"Salvatore" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > While reading the doc i've found 'update' :-) > Bless you, Salvatore!! Too often we hear about the "gross deficiencies" of the Python documentation. I'd venture to say that documentation is mostly perceived as the last r

Re: "groupby" is brilliant!

2006-06-13 Thread Paul McGuire
John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 14/06/2006 8:38 AM, Robert Kern wrote: > > Gary Herron wrote: > >> John Machin wrote: > >> > >>> On 13/06/2006 6:28 PM, Paul McGuire wrote: > >>> > &

Re: code folding, a unique problem to python?

2006-06-15 Thread Paul McGuire
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Specifically, I'm using UltraEdit and perhaps there's no way perfect way > to implement code folding with it, given how it uses its syntax > highlighting file to do so (i.e., you have to specify an "Opening" and > "Closin

Re: code folding, a unique problem to python?

2006-06-15 Thread Paul McGuire
"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > But my question is more general: is it possible to implement code > folding with Python given that it has no real block delimiters? SciTE can fold Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting values from text file

2006-06-16 Thread Paul McGuire
"Preben Randhol" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What I first though was if there was possible to make a filter such as: > > Apples (apples) > (ducks) Ducks > (butter) g butter > > The data can be put in a hash table. > > Or maybe there are better ways? I general

Re: Psyco performance

2006-06-20 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Place all the code in a function. Even without psyco you might get > > somewhat better performances then. And I doubt psyco can optimise code > > that isn't in a function anyway. > > > > And lastly, most of the code is probably spend c

Re: How to override the doc of an object instance.

2006-06-21 Thread Paul McGuire
"David Huard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 21 Jun 2006 15:39:02 +0200, Maric Michaud wrote: > > > This is w.__class__.x.__doc__. > > Thanks, > > So in order to implement what I want, I should rather consider an > ipython hack to print w.__class__.x.__doc__ w

Re: re question

2006-06-23 Thread Paul McGuire
Shouldn't End Package Test; read: End Package Test123; -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: classes and interfaces

2006-06-27 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi > i come from a non OO environment. now i am learning about classes. can > i ask, in JAva, there are things like interface. eg > public interface someinterface { >public somemethod (); > >... > } > > In python , how to

Re: classes and interfaces

2006-06-27 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Lastly, you should look into > ... this blog post: http://dirtsimple.org/2004/12/python-is-not-java.html, and its partner http://dirtsimple.org/2004/12/python-is-not-java.html. Unfortunatel

Re: Re-loading updated modules

2006-06-27 Thread Paul McGuire
"fileexit" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > Shouldn't python recompile a module if there is a later version of the > code (.py file)? While i am debuging, i always have to exit python and > delete the pyc before every run, then start it again and import the > modu

Re: Help Installing smartypants.py

2006-06-28 Thread Paul McGuire
"Scott McCracken" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I just got Python 2.4 setup locally (Mac OS X) and am trying to extend > it by installing both the markdown and smartypants plugins. Ultimately > I'd like to be able use both in a custom CMS I'm building with Django. >

Re: Questions about OSS projects.

2006-06-28 Thread Paul McGuire
"Daniel Dittmar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you've written a few small scripts that might be of use to others and > that you assume that there are others who do the same, you might start > with a wiki or something like the Python Cookbook > (http://aspn.actives

Re: Way for see if dict has a key

2006-06-30 Thread Paul McGuire
"Michele Petrazzo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > when we expect that the key will most often be in my_dict so that > > exception will be raised rarely > > I didn't thought this because if I think that a key aren't in a dict, I > use dict.get(key, default) > Anothe

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Steve" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I'm having a tough time converting the following regex.compile patterns > into the new re.compile format. There is also a differences in the > regsub.sub() vs. re.sub() > > Could anyone lend a hand? > > Not an re so

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > If fails for floats specified as ###. or .###, it outputs an integer > format and the decimal point separately. It also ignores \# which > should prevent the '#' from being included in a format. > True. What is the spec

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Paul McGuire <[EMAIL PROTECTED]> wrote: > > >Not an re solution, but pyparsing makes for an easy-to-follow program. > >TransformString

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If fails for floats specified as ###. or .###, it outputs an integer > format and the decimal point separately. It also ignores \# which > should prevent the '#' from being included in a format. > Here's a little more stud

Re: Regular Expression - old regex module vs. re module

2006-06-30 Thread Paul McGuire
"Jim Segrave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The poster was excluding escaped (with a '\' character, but I've just > looked up the Perl format statement and in fact fields always begin > with a '@', and yes having no digits on one side of the decimal point > is legal

Re: I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

2006-07-01 Thread Paul McGuire
"gavino" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This seems easy but I have been asking tcl and python IRC chat all day > and no one gave an answer. > I have 100 servers which need a new backup server added to a text file, > and then the backup agent restarted. > If I have a

Re: really basic question regarding arrays/function output...

2006-07-01 Thread Paul McGuire
"bruce" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi... > > i have the following test python script i'm trying to figure out a > couple of things... > > 1st.. how can i write the output of the "label" to an array, and then how i > can select a given element of the array.. i

Re: python/libxml2dom questions

2006-07-01 Thread Paul McGuire
"bruce" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi paul... > > in playing around with the test python app (see below) i've got a couple of > basic questions. i can't seem to find the answers via google, and when i've > looked in the libxml2dom stuff that i downloaded i didn't

Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]

2006-07-01 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This has been bothering me for a while. Just want to find out if it > just me or perhaps others have thought of this too: Why shouldn't the > keyset of a dictionary be represented as a set instead of a list? I think this is an interesti

Re: how to stop python...

2006-07-02 Thread Paul McGuire
"bruce" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hi... > > perl has the concept of "die". does python have anything similar. how can a > python app be stopped? > > the docs refer to a sys.stop.. but i can't find anything else... am i > missing something... > > thanks > > -bruce

Re: Program analysis (pseudocode if possible)

2006-07-03 Thread Paul McGuire
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > > BEGIN PROGRAM > read_this('http://www.catb.org/~esr/faqs/smart-questions.html') > do_your_homework() if (cant_figure_it_out) post_specific_question_on_relevant_newsgroup("comp.lang.c") > E

Re: Out of the box database support

2006-07-03 Thread Paul McGuire
"Alex Biddle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey, thanks for the reply Jean-Paul. > > That's pretty cool knowing that Python 2.5 will have it out of the > box, however what about basic out-of-the-box functionality in 2.4 (or > even older)? > > In all my other experien

Re: setting variables from a tuple NEWB

2006-07-06 Thread Paul McGuire
"manstey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > If I have a tuple like this: > > tupGlob = (('VOWELS','aeiou'),('CONS','bcdfgh')) > > is it possible to write code using tupGlob that is equivalent to: > VOWELS = 'aeiou' > CONS = ''bcdfgh' > > Thanks, > Matthew > Try

Re: poplib Q

2006-07-06 Thread Paul McGuire
"SuperHik" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi! > > I want to connect to gmail but... > It requires SSL so I worte: > > >>> import poplib > >>> server = poplib.POP3_SSL('pop.gmail.com',995) > Traceback (most recent call last): >File "", line 1, in ? >File "C:\

Re: Detecting 64bit vs. 32bit Linux

2006-07-08 Thread Paul McGuire
"MrJean1" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Try function architecture() from the platform module in Python 2.3 and > 2.4. The first item of the returned tuple shows whether the underlying > system is 64-bit capable. > > Here is what it returns on RedHat Fedora Core 2 Li

Re: WANTED: logging of all file operations on Windows

2006-07-09 Thread Paul McGuire
"faulkner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > you want a directory watching daemon. it isn't hard at all to build > from scratch. > first, determine which directories should be watched. > then, os.walk each directory, building a mapping from filename to mtime > [modified

Re: WANTED: logging of all file operations on Windows

2006-07-09 Thread Paul McGuire
"faulkner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > you want a directory watching daemon. it isn't hard at all to build > from scratch. > first, determine which directories should be watched. > then, os.walk each directory, building a mapping from filename to mtime > [modified

Re: Consistency in Python

2006-08-25 Thread Paul McGuire
"Paul Boddie" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Moreover, append and insert return > no result because the change occurs within an existing object - if you > were to return a reference to the changed object, it would be the same > reference as the one you already had.

Re: mechanize, how send forms?

2006-08-26 Thread Paul McGuire
"Kowalski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > from mechanize import Browser > > br = Browser() > br.open("http://www.google.com";) #example > > for form in br.forms(): >print form > > br.select_form(name="f") > br["q"] = "Blah" > > #??? > #response1=br.submit() > #??

Re: simpleparse parsing problem

2006-09-01 Thread Paul McGuire
"David Hirschfield" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Anyone out there use simpleparse? If so, I have a problem that I can't > seem to solve...I need to be able to parse this line: > > """Cen2 = Cen(OUT, "Cep", "ies", wh, 544, (wh/ht));""" > > with this grammar: > > gr

Re: are there any lib for receive hotmail ?

2006-09-04 Thread Paul McGuire
"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > thanks. > poplib -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-08 Thread Paul McGuire
"Andy Dingley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > [EMAIL PROTECTED] wrote: > >> I am looking for python code that takes as input a list of strings >> [...] and outputs the python regular expression > >(s1|s2|s3|s4|s5) > for strings of "s1" etc. > > Regex compilers

Re: pyparsing listAllMatches problem

2006-09-09 Thread Paul McGuire
"don pasquale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hello, > I'm using pyparsing and trying to parse something like: > test="""Q(x,y,z):-Bloo(x,"Mitsis",y),Foo(y,z,1243),y>28,x<12,x>3""" > > and also have all comparison predicates in a separate list apart from the > parse

Re: extracting substrings from a file

2006-09-11 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a file with several entries in the form: > > AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF > corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli > 7,8-diamino-pelargonic acid (bioA), biotin synt

Re: Simple regex with whitespaces

2006-09-11 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I cannot figure out a way to find a regular expression that would > match one and only one of these two strings: > > s1 = ' how are you' > s2 = 'hello world how are you' > > Al

Re: best small database?

2006-09-11 Thread Paul McGuire
"Aahz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Once Python 2.5 comes out, I recommend using sqlite because it avoids > the mess that dbm can cause. > -- > Aahz ([EMAIL PROTECTED]) <*> > http://www.pythoncraft.com/ and if you don'

Re: "filtered view" upon lists?

2006-09-12 Thread Paul McGuire
"Jorge Godoy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Wildemar Wildenburger <[EMAIL PROTECTED]> writes: > >> I don't know how else to call what I'm currently implementing: An object >> that >> behaves like a list but doesn't store it's own items but rather pulls >> them >>

Re: table (ascii text) lin ayout recognition

2006-09-13 Thread Paul McGuire
"James Stroud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> Hello, >> >> I am looking for python code useful to process >> tables that are in ASCII text. The code must >> determine where are the columns (fields). >> Concerned tables for my application a

Re: How to convert a timedelta object to a string?

2006-09-14 Thread Paul McGuire
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Basically I used the datetime module and timedelta objects to calculate a > difference between two times. Now I'm trying to figure out how I make > that time delta a string HH:MM:SS to show elapsed time. I've s

Re: Searching for patterns on the screen

2006-09-15 Thread Paul McGuire
"Jerry Hill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I have a piece of code I could use some help optimizing. What I'm > attempting to do is periodically grab a screenshot, and search for 2D > patterns of black pixels in it. I don't care about any color other

Re: Searching for patterns on the screen

2006-09-15 Thread Paul McGuire
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Paul McGuire wrote: >> "Jerry Hill" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Hello all, >> As far as working just in Python

Re: Looking for a regexp generator based on a set of known string representative of a string set

2006-09-15 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Andy Dingley" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> >> [EMAIL PROTECTED] wrote: >> >>> I am looking for python code that

Re: tcl list to python list?

2006-09-16 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have a file that contains a "tcl" list stored as a string. The list > members are > sql commands ex: > { begin { select * from foo >where baz='whatever'} > {select * from gooble } end > { insert into bar val

Re: tcl list to python list?

2006-09-17 Thread Paul McGuire
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Paul McGuire <[EMAIL PROTECTED]> wrote: > > > Noo! > > I'll be more precise: pyparsing is quite wonderful,

Re: tcl list to python list?

2006-09-17 Thread Paul McGuire
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > <[EMAIL PROTECTED]> wrote: >>Hi, >> >>I have a file that contains a "tcl" list stored as a string. The list >>members are >>sql commands ex: >> { begin { select * from foo >>

Re: CONSTRUCT - Adding Functionality to the Overall System

2006-09-18 Thread Paul McGuire
"Calvin Spealman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 17 Sep 2006 09:22:16 -0700, Ilias Lazaridis <[EMAIL PROTECTED]> > wrote: >> I understand that I can use __metaclass__ to create a class which >> modifies the behaviour of another class. >> >> How can I add this met

Re: Code Golf Challenge : 1,000 Digits Of Pi

2006-09-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Paddy: >> Is having good 'code-fu' worthwhile? It may be trivial to score but do >> the results show who iss the better programmer? > > With Python you can't win, because Perl and Ruby allow for shorter > programs. > Beside the language

Re: newbie division question

2006-09-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> PS Any news on when true division will be the default? > > Python 3.0 (aka P3K). It is the release that can break backwards > compatibility. > > http://www.python.org/dev/peps/pep-3000/ > > casevh > Yes, Break Backwards Compatibilit

Python 2.5 slower with pyparsing 1.4.3

2006-09-19 Thread Paul McGuire
Running my Verilog parser tests, I get a 5-10% slowdown with Python 2.5 vs. Python 2.4.1 (See http://pyparsing.wikispaces.com/News.) I apologize for not running performance tests sooner, I only ran regression tests on the release candidates, and those were all okay. I'll look through the "What'

Re: Nano Technology Application For Health,Wellness and Beauty

2006-09-19 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dear lovely moderator, please allow me to spread this information, > somebody might need it, please forgive me if you are bothered > > Dear All, this might be useful for you and your family > Does it also predict earthquakes? For yo

Re: py.test and HTML output

2006-09-19 Thread Paul McGuire
"Victor Ng" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there documentation anywhere on how to get py.test to emit nice > HTML output like the kind that they have for the PyPy project here: > http://codespeak.net/~hpk/pypy-testresult/ ? > > Should I just redirect the stdout to

Re: pprint: "...thank small children who sleep at night."

2006-09-19 Thread Paul McGuire
"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Brian L. Troutwine said unto the world upon 19/09/06 05:30 PM: >> The heading comment to pprint reads: >> >> # This is a simple little module I wrote to make life easier. I >> didn't >> # see anything quite like

Re: Python-2.5 available at WebFaction

2006-09-20 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello everyone, > > I'm happy to announce that WebFaction have now installed Python-2.5 > on all their servers. > > WebFaction (formerly Python-Hosting.com) support all the > major Python web frameworks (Django, TurboGears, CherryPy, >

Re: Python and CORBA

2006-09-21 Thread Paul McGuire
"rodmc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks to everyone for their help. I had tried OmniORB and while the > base library worked ok, the Python bit OmniORBpy seems to dislike > working... Perhaps there is something wrong with my settings. > > I will also try the Pyt

Re: XML parser that sorts elements?

2006-09-22 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi everyone, > > I am a total newbie to XML parsing. I've written a couple of toy > examples under the instruction of tutorials available on the web. > > The problem I want to solve is this. I have an XML snippet (in a > string) that

Re: XML parser that sorts elements?

2006-09-22 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > This is what I posted, but it's not what I typed. I entered some very long lines at the console, and the newsgr

Re: Isn't bool __invert__ behaviour "strange"?

2006-09-22 Thread Paul McGuire
"Saizan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > John Roth wrote: > >> The not operator and the bool() builtin produce >> boolean results. Since bool is a subclass of int, >> all the integer operations will remain integer >> operations. This was done for backwards >> compat

Re: String Pattern Matching: regex and Python regex documentation

2006-09-22 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Ilias Lazardis meets Xah Lee. I just *know* we're in for trouble now ... > > regards > Steve A sign of the End Times, perhaps? -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the best way to "get" a web page?

2006-09-23 Thread Paul McGuire
"Pete" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have the following code: > web_page = urllib.urlopen("http://www.python.org";) file = open("temp.html", "w") web_page_contents = web_page.read() file.write(web_page_contents) file.close > > > The f

Re: Logfile analysing with pyparsing

2006-09-26 Thread Paul McGuire
"Andi Clemens" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > we had some problems in the last weeks with our mailserver. > Some messages were not delivered and we wanted to know why. > But looking through the logfile is a time consuming process. > So I wanted to write a par

Re: a query on sorting

2006-09-27 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >>> [x for x in enumerate(a)] [(0, 9), (1, 4), (2, 3), (3, 5), (4, 2), (5, 6), (6, 7), (7, 1), (8, 2)] Just curious, Steve, but why do this list comprehension when: list(enumerate(a)) works just as well? In the in

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Paul McGuire
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >> >>> I had written my own module, which works similarly but >>> is somewhat extended. Here is an example of how it can >>> be used and how I

Re: Top and Bottom Values [PEP: 326]

2006-09-27 Thread Paul McGuire
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 2006-09-27, Peter Otten <[EMAIL PROTECTED]> wrote: >> Antoon Pardon wrote: >> >>> I had written my own module, which works similarly but >>> is somewhat extended. Here is an example of how it can >>> be used and how I

Re: changing numbers to spellings

2006-10-01 Thread Paul McGuire
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: >> Hey, >> >> Sorry to bother everybody again, but this group seems to have quite a >> few knowledgeable people perusing it. >> >> Here's my most recent problem: For a small project I am doing, I

Re: Problem with .next() method adding junk characters.

2006-10-02 Thread Paul McGuire
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Rainy" <[EMAIL PROTECTED]> wrote: > >> I'm just curious as to what's happening. I understand that you're not >> supposed to call .next on a file open for writing. But I don't know why >> and how it does what happened he

Re: Sort by domain name?

2006-10-02 Thread Paul McGuire
"js " <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi list, > > I have a list of URL and I want to sort that list by the domain name. > > Here, domain name doesn't contain subdomain, > or should I say, domain's part of 'www', mail, news and en should be > excluded. > > For exampl

Re: replacing all 'rng's in a buffer with consecutive r[1], r[2]'s

2006-10-04 Thread Paul McGuire
"m g william" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > #now replace all 'rng's with consecutive streams > #=== > def static_num(): >''' this is a generator function that avoids globals > yield differentiates fn as generator fn w

Re: basic python questions

2006-11-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a simple assignment for school but am unsure where to go. The > assignment is to read in a text file, split out the words and say which > line each word appears in alphabetical order. I have the basic outline > of the program done

Re: lxml/ElementTree and .tail

2006-11-18 Thread Paul McGuire
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > (XML is a bit unusual in this respect, but that's probably just some > variation of the bikeshed effect. it's just text, and everyone with > a keyboard knows what that is, so we don't need to use established > softw

Re: lxml/ElementTree and .tail

2006-11-18 Thread Paul McGuire
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Paul McGuire wrote: > >> maybe time to switch to decaf... :) > > do you disagree with my characterization of the state of the XML universe? > > > Thankfully, I'm large

<    1   2   3   4   5   6   7   8   9   10   >