Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread Paul Rudin
John Salerno <[EMAIL PROTECTED]> writes: > Laurent Pointal wrote: > >> With Python: >> * pygame + build your drag'n drop features >> * if you like 3D, vpython. >> >> >> http://www.pygame.org/ >> http://www.vpython.org/ > > Wow, vpython looks pretty need. I'm messing around with it right now > and

Re: Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> wrote: >On 2007-03-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> I'm just beginning my exploration of Python and I have a rather >> general question. If two particular programs have Python scripting >> capabilities, does tha

Re: What are OOP's Jargons and Complexities

2007-03-30 Thread Arved Sandstrom
"Mike Schilling" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > bugbear wrote: >> Er. How about >> >> public class test { >> public static void main(String[] args) { >> String a = "a string"; >> String b = "another one"; >> StringBuffer c = a + b; > > String c (etc.),

Re: Modal value of an array

2007-03-30 Thread Paddy
On Mar 30, 10:17 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 29 Mar 2007 19:44:56 -0300, Paddy <[EMAIL PROTECTED]> > escribió: > > > On Mar 29, 8:49 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > >> >>> foo = ["spam", "eggs", "spam", "spam", "spam", "beans", "eggs"] > >> >>> max(fo

Re: What are OOP's Jargons and Complexities

2007-03-30 Thread Arved Sandstrom
"Timofei Shatrov" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 30 Mar 2007 06:48:05 GMT, "Mike Schilling" > <[EMAIL PROTECTED]> > tried to confuse everyone with this message: > >>Xah Lee wrote: >> >>> So, a simple code like this in normal languages: > >>> becomes in Java:

Re: Py_DECREF/Py_INCREF as Functions?

2007-03-30 Thread Gabriel Genellina
En Fri, 30 Mar 2007 20:21:53 -0300, Kevin D.Smith <[EMAIL PROTECTED]> escribió: > I'm trying to use Python from another application that allows me to > load functions from a DLL. While I have most of the API working, I > have one big problem: Py_DECREF and PyINCREF are macros which I can't > lo

Re: Hpw make lists that are easy to sort.

2007-03-30 Thread Paul Rubin
Anton Vredegoor <[EMAIL PROTECTED]> writes: > I want the product, but sorted in less time. If Fourier transforms can > help, I want them :-) Oh, I see what you mean. I don't see an obvious faster way to do it and I don't have the feeling that one necessarily exists. As someone mentioned, you cou

Re: loading a url using urllib2

2007-03-30 Thread Kushal Kumaran
On Mar 31, 7:21 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have the following code to load a url (address). > > When I have a url like this, > > http://www.testcom.co.uk/dev_12345/www.cnn.com > > i get an error "Failed to openhttp://www.testcom.co.uk/dev_12345/www.cnn.com";. > Is there

Re: Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi All, | | I'm just beginning my exploration of Python and I have a rather | general question. If two particular programs have Python scripting | capabilities, does that mean those two programs can communicate in | real time through P

Re: Long way around UnicodeDecodeError, or 'ascii' codec can't decode byte

2007-03-30 Thread Oleg Parashchenko
Hello, On Mar 29, 4:53 pm, "Paul Boddie" <[EMAIL PROTECTED]> wrote: > On 29 Mar, 06:26, "Oleg Parashchenko" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I'm working on an unicode-aware application. I like to use "print" to > > debug programs, but in this case it was nightmare. The most popular >

how to remove specified cookie in cookie jar?

2007-03-30 Thread ken
How to remove specified cookie (via a given name) in cookie jar? I have the following code, but how can I remove a specified cookie in the cookie jar? cj = cookielib.LWPCookieJar() if cj is not None: if os.path.isfile(COOKIEFILE): print 'Loading Cookie--'

loading a url using urllib2

2007-03-30 Thread [EMAIL PROTECTED]
I have the following code to load a url (address). When I have a url like this, http://www.testcom.co.uk/dev_12345/www.cnn.com i get an error "Failed to open http://www.testcom.co.uk/dev_12345/www.cnn.com";. Is there something wrong with my URL? or something wrong with my code? Thank you for an

Re: Cheeseshop needs mirrors

2007-03-30 Thread Richard Jones
Paul Boddie wrote: > Richard Jones wrote: >> And of course I'll reiterate the same line I always do: the Cheese Shop >> was set up by a volunteer, enhanced by some other volunteers and exactly >> nothing more will get done unless more volunteers offer their time. > > Sure. I wasn't criticising the

Re: I can't get multi-dimensional array to work...

2007-03-30 Thread Carsten Haese
On Fri, 2007-03-30 at 14:34 -0700, erikcw wrote: > On Mar 30, 5:23 pm, [EMAIL PROTECTED] wrote: > > I haven't tested it, but superficially I'd suggest giving this a try: > > > > def endElement(self, name): > > if name == 'row' : > > if not self.data.has_key(self.parent): > >

Re: Indentation for code readability

2007-03-30 Thread Steven D'Aprano
On Fri, 30 Mar 2007 18:32:02 -0500, Robert Kern wrote: >> Some people >> have a strange >> idea of >> "increase >> readability". > > Please contain the snark. You didn't understand why someone might want this, > and > that's fine. But please wait until you get a response befo

Re: clean up html document created by Word

2007-03-30 Thread jd
Wow, thanks for all the great responses! Here's my summary: - demoronizer (from John Walker) is designed to solve some very particular problems that could be considered bugs. However, it doesn't remove the unnecessary html generated by Word. http://www.fourmilab.ch/webtools/demoroniser/ - The

Re: Remote XML Parsing

2007-03-30 Thread [EMAIL PROTECTED]
On Mar 30, 5:56 pm, Laurent Pointal <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > How can I parse a remote XML file with Python? > > And what will I be able to do with this XML file in Python? > > > Sorry if this is a noob-ish question. > > You can process XML data with Python as l

Re: very strange syntax errors

2007-03-30 Thread John J. Lee
hg <[EMAIL PROTECTED]> writes: > Hi, > > I'v been facing some very strange errors lately: > > one example: > > def __init__(self): > > import my_info > some_text = my_info.T_SOME_TEXT > ^ syntax error > > > I manage to get rid of that

Web-based personal development co. looking for programmers

2007-03-30 Thread jconxus
Mylinia.com Live purposefully! Who: Mylinia.com is a personal development company located in the heart of the Silicon Valley, started in 2006 by 3 Stanford business school students who are dedicated to helping people all over the world reach their full potential. We envision a better world where

Python-URL! - weekly Python news and links (Mar 30)

2007-03-30 Thread Cameron Laird
QOTW: "I have a fake supervisor reference generator for job interviews, a fake house inspection generator for real estate transactions, and a fake parole testimony generator - maybe you could adapt one of them (unfortunately, they are written in dissembler)." - Paul McGuire "... I think that [PyP

Re: Question about using cookielib in python 2.4

2007-03-30 Thread John J. Lee
[EMAIL PROTECTED] writes: > Hi, > I am following the example of Python cookbook (14.7) about using > cookielib in python2.4 > > cj = cookielib.LWPCookieJar() > // code to send out the request > print "Coookie-" > if cj is not None: > fo

Re: clean up html document created by Word

2007-03-30 Thread Claudio Grondi
jd wrote: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if you know of a non-python solution, I'd > li

Re: Indentation for code readability

2007-03-30 Thread Robert Kern
Steven D'Aprano wrote: > On Fri, 30 Mar 2007 02:04:45 -0700, DE wrote: > >> Hello, >> >> Here is what I do in C++ and can not right now in python : >> >> pushMatrix() >> { >> drawStuff(); >> >> pushMatrix(); >> { >> drawSomeOtherStuff() >> } >> popMatrix(); >>

Py_DECREF/Py_INCREF as Functions?

2007-03-30 Thread Kevin D.Smith
I'm trying to use Python from another application that allows me to load functions from a DLL. While I have most of the API working, I have one big problem: Py_DECREF and PyINCREF are macros which I can't load from the Python DLL. Since I can't decref any objects, I'm leaking memory all over

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Nope. that's not what i mean... Here's a quick run down: edna, is a python mp3 server. (.py) What it does is searches directories for: 1) mp3s 2) jpgs 3) mp3us 4) txt files 5) other folders What I'd like it to do, is upon finding a folder, with a .txt file in it (in my case is probably an albu

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Michael Bentley
On Mar 30, 2007, at 5:42 PM, Michael Bentley wrote: > for i in yourstring.split(): > if i[0].isdigit(): > yourstring = yourstring.replace(i, '-%s' % (i,), 1) *OR* yourstring ' '.join(x[0].isdigit() and '-%s' % x or x for x in yourstring.split()) ;-) -- http://mail.pytho

Re: Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread Grant Edwards
On 2007-03-30, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm just beginning my exploration of Python and I have a rather > general question. If two particular programs have Python scripting > capabilities, does that mean those two programs can communicate in > real time through Python? No.

Re: Cheeseshop needs mirrors

2007-03-30 Thread Paul Boddie
Richard Jones wrote: > > And of course I'll reiterate the same line I always do: the Cheese Shop was > set up by a volunteer, enhanced by some other volunteers and exactly > nothing more will get done unless more volunteers offer their time. Sure. I wasn't criticising the Cheese Shop, though: it's

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Michael Bentley
On Mar 30, 2007, at 4:41 PM, Paul McGuire wrote: > On Mar 30, 2:09 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: >> On Mar 30, 2007, at 10:38 AM, kevinliu23 wrote: >> >> >> >> >> >>> I want to be able to insert a '-' character in front of all numeric >>> values in a string. I want to insert the

Re: Cheeseshop needs mirrors

2007-03-30 Thread John Nagle
Richard Jones wrote: > And of course I'll reiterate the same line I always do: the Cheese Shop was > set up by a volunteer, enhanced by some other volunteers and exactly > nothing more will get done unless more volunteers offer their time. Yup. That's why CPAN is so much better. Ook!

Newbie Question (real-time communication between apps: audio, 3d, PD, Blender)

2007-03-30 Thread gregorywieber
Hi All, I'm just beginning my exploration of Python and I have a rather general question. If two particular programs have Python scripting capabilities, does that mean those two programs can communicate in real time through Python? I'm running some audio experiments (for artistic purposes) in the

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread John Nagle
Paul McGuire wrote: > On Mar 30, 2:09 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: > >>On Mar 30, 2007, at 10:38 AM, kevinliu23 wrote: >> >> >> >> >> >> >>>I want to be able to insert a '-' character in front of all numeric >>>values in a string. I want to insert the '-' character to use in >>>c

Mouse click in python

2007-03-30 Thread Synt4x
I'm creating a webcam user interface (to control google earth through my webcam) and I still can't find a good example to how to control the mouse to "click and drag" (not just click and release). I want to move an object in front of the webcam and move maps on google earth. I hope someone underst

Re: Cheeseshop needs mirrors

2007-03-30 Thread Richard Jones
Paul Boddie wrote: > On 30 Mar, 09:05, "Jon" <[EMAIL PROTECTED]> wrote: >> >> If something as widely used as eggs is going to have a single point of >> failure like the Cheeseshop, we can't have it going down. >> >> I'm sure there are other solutions, but my suggestion is simply to >> have mirrors.

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Paul McGuire
On Mar 30, 2:09 pm, Michael Bentley <[EMAIL PROTECTED]> wrote: > On Mar 30, 2007, at 10:38 AM, kevinliu23 wrote: > > > > > > > I want to be able to insert a '-' character in front of all numeric > > values in a string. I want to insert the '-' character to use in > > conjunction with the getopt.get

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread Laurent Pointal
John Salerno wrote: > Laurent Pointal wrote: > >> With Python: >> * pygame + build your drag'n drop features >> * if you like 3D, vpython. >> >> >> http://www.pygame.org/ >> http://www.vpython.org/ > > Wow, vpython looks pretty need. I'm messing around with it right now > and reading the docs

Re: I can't get multi-dimensional array to work...

2007-03-30 Thread erikcw
On Mar 30, 5:23 pm, [EMAIL PROTECTED] wrote: > On Mar 30, 4:56 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I'm trying to create a multidimensional data structure. However, id > > doesn't seem to work past the 2nd dimension. > > > Here is my method: > > > def endElement(self, name):

Re: clean up html document created by Word

2007-03-30 Thread Laurent Pointal
jd wrote: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if you know of a non-python solution, I'd > l

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Michael Tobis
I think it's pretty clear that we aren't understanding what you mean by "open a text file and disply its content". I conclude that by "edna" you mean this thing: http://edna.sourceforge.net/ I suspect you are not asking a Python question at all. Did you try opening file:edna-0.6/templates/d

Re: I can't get multi-dimensional array to work...

2007-03-30 Thread FlipFish2007
On Mar 30, 4:56 pm, "erikcw" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to create a multidimensional data structure. However, id > doesn't seem to work past the 2nd dimension. > > Here is my method: > > def endElement(self, name): > if name == 'row' : > if not self.data.ha

Re: [Pythonmac-SIG] MacPython wiki "moved" to Python wiki - now it's your turn...

2007-03-30 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > After much wailing and gnashing of teeth the past couple of days, I managed > to move (most of?) the content from the MacPython wiki to the main Python > wiki (*). All pages were created as subpages of > > http://wiki.python.or/moin/MacPython > > The motivation for

Re: Modal value of an array

2007-03-30 Thread Gabriel Genellina
En Thu, 29 Mar 2007 19:44:56 -0300, Paddy <[EMAIL PROTECTED]> escribió: > On Mar 29, 8:49 am, [EMAIL PROTECTED] (Alex Martelli) wrote: >> >>> foo = ["spam", "eggs", "spam", "spam", "spam", "beans", "eggs"] >> >>> max(foo, key=foo.count) >> >> 'spam' > > This doesn't call foo.count for duplicate

Re: PyPy 1.0: JIT compilers for free and more

2007-03-30 Thread Jacob Hallen
In article <[EMAIL PROTECTED]>, Jarek Zgoda <[EMAIL PROTECTED]> wrote: >Carl Friedrich Bolz napisa³(a): > >> Welcome to the PyPy 1.0 release - a milestone integrating the results >> of four years of research, engineering, management and sprinting >> efforts, concluding the 28 months phase of EU co

I can't get multi-dimensional array to work...

2007-03-30 Thread erikcw
Hi, I'm trying to create a multidimensional data structure. However, id doesn't seem to work past the 2nd dimension. Here is my method: def endElement(self, name): if name == 'row' : if not self.data.has_key(self.parent): self.data[self.parent] = {}

Re: [Pythonmac-SIG] MacPython wiki "moved" to Python wiki - now it's your turn...

2007-03-30 Thread skip
Kevin> I was just looking at the new MacPython pages at the Python Kevin> wiki--it appears nothing has been done with them since Skip moved Kevin> them over. I'm thinking this is a terrific opportunity to bring Kevin> them up to date: would anyone mind if I got started? A lot of

Re: Tkinter menu question--how to pass arguments

2007-03-30 Thread Kevin Walzer
Dave Opstad wrote: > In article <[EMAIL PROTECTED]>, > Kevin Walzer <[EMAIL PROTECTED]> wrote: > >> I'm having difficulty structuring a Tkinter menu entry. Here is the >> command in question: >> >> self.finkmenu.add_command(label='Update List of Packages', >> command=self.authorizeCommand(self.

Re: Tkinter menu question--how to pass arguments

2007-03-30 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: > On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: >> I'm having difficulty structuring a Tkinter menu entry. Here is the >> command in question: >> >> self.finkmenu.add_command(label='Update List of Packages', >> command=self.authorizeCommand(self.scanPackages))

newb: lxml objectify

2007-03-30 Thread johnny
Breakfast at Tiffany's Movie Classic Borat Movie Comedy How do you represent DVD id=1 and it's elements, and DVD id=2 and it's elements as child of root "Library"? Like this:? from lxml import etree from lxml import objectify root = objectify.Element("Library") child[1] = objectify.Elemen

Re: Object Oriented Database with interface for Pyhton

2007-03-30 Thread Joshua J. Kugler
On Friday 30 March 2007 01:04, [EMAIL PROTECTED] wrote: > Hello all > > I am looking for an object oriented database with interffaces for > python. Either open source or commercial. > > I am looking for a Database not a object persistence system. I would > like to be able to execute queries outs

Re: Tkinter menu question--how to pass arguments

2007-03-30 Thread kyosohma
On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm having difficulty structuring a Tkinter menu entry. Here is the > command in question: > > self.finkmenu.add_command(label='Update List of Packages', > command=self.authorizeCommand(self.scanPackages)) > > When I start my program, it

Re: Tkinter menu question--how to pass arguments

2007-03-30 Thread kyosohma
On Mar 30, 2:32 pm, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm having difficulty structuring a Tkinter menu entry. Here is the > command in question: > > self.finkmenu.add_command(label='Update List of Packages', > command=self.authorizeCommand(self.scanPackages)) > > When I start my program, it

Re: Any "consumer review generators" available?

2007-03-30 Thread Schraalhans Keukenmeester
nullified wrote: > On 30 Mar 2007 07:01:16 -0700, "Evil Otto" <[EMAIL PROTECTED]> wrote: > >> On Mar 30, 3:46 am, nullified <[EMAIL PROTECTED]> wrote: >>> On 29 Mar 2007 20:34:26 -0700, "Evil Otto" <[EMAIL PROTECTED]> wrote: >>> On Mar 29, 2:19 pm, [EMAIL PROTECTED] wrote: > I am looking

Re: Tkinter menu question--how to pass arguments

2007-03-30 Thread Dave Opstad
In article <[EMAIL PROTECTED]>, Kevin Walzer <[EMAIL PROTECTED]> wrote: > I'm having difficulty structuring a Tkinter menu entry. Here is the > command in question: > > self.finkmenu.add_command(label='Update List of Packages', > command=self.authorizeCommand(self.scanPackages)) > > When I st

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
nothing is "lame" to me , all help is appreciated :) .\\ax <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mar 30, 11:39 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: >> In <[EMAIL PROTECTED]>, kyosohma >> wrote: >> > I'm not familiar with ezt formats, however readin

Tkinter menu question--how to pass arguments

2007-03-30 Thread Kevin Walzer
I'm having difficulty structuring a Tkinter menu entry. Here is the command in question: self.finkmenu.add_command(label='Update List of Packages', command=self.authorizeCommand(self.scanPackages)) When I start my program, it crashes because it's trying to run the command self.authorizeCommand

Re: New to Python - Easy way to open a text file

2007-03-30 Thread kyosohma
On Mar 30, 11:39 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, kyosohma wrote: > > I'm not familiar with ezt formats, however reading a text file is a > > breeze. > > This sentence doesn't match the code that follow. It's really simpler > than that ``while`` loo

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hmm.. maybe it'd help if I explained that I'm playing with edna http://edna.sourceforge.net/ I'll play with this simple code: f = open(r'pathToFile) for line in f: # do something with the line of text such as print it. f.close() and this one from Skip: f = open(plainfiles.href, "r")

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Michael Bentley
On Mar 30, 2007, at 10:38 AM, kevinliu23 wrote: > I want to be able to insert a '-' character in front of all numeric > values in a string. I want to insert the '-' character to use in > conjunction with the getopt.getopt() function. > > Rigt now, I'm implementing a menu system where users will b

Re: LRU cache (and other things missing from the standard library ...)

2007-03-30 Thread skip
Evan> http://www.python.org/pypi?:action=display&name=lrucache&version=0.2 skip> Couldn't get to your website, but I've been using this one I wrote skip> for several years: skip> http://www.webfast.com/~skip/python/Cache.py skip> I'm just coming to this thread, so I don'

Re: manually implementing staticmethod()?

2007-03-30 Thread 7stud
Hi, Thanks for the responses. On Mar 28, 4:01 pm, "Michael Spencer" <[EMAIL PROTECTED]> wrote: > "7stud" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED]> Hi, > > > Can someone show me how to manually implement staticmethod()? Here is > > my latest attempt: > > >

Re: Object Oriented Database with interface for Pyhton

2007-03-30 Thread kyosohma
On Mar 30, 8:51 am, Laurent Pointal <[EMAIL PROTECTED]> wrote: > MC a écrit : > > > Salut! > > > Heureusement qu'il y a qq français pour faire un peu de ménage... > > Question de décalage horaire ? Here is a list of all the popular database interface modules: http://www.python.org/topics/database

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread John Salerno
John Salerno wrote: > Laurent Pointal wrote: > >> With Python: >> * pygame + build your drag'n drop features >> * if you like 3D, vpython. >> >> >> http://www.pygame.org/ >> http://www.vpython.org/ > > Wow, vpython looks pretty need. neat* :) -- http://mail.python.org/mailman/listinfo/python-

Re: LRU cache (and other things missing from the standard library ...)

2007-03-30 Thread skip
Evan> I agree that LRU caches are a data structure too frequently Evan> re-implemented in Python. I'd also like to see a "standard" cache Evan> package, either as part of the standard library or elsewhere. To Evan> that end, I've just uploaded an LRU cache package to the Python

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread John Salerno
Laurent Pointal wrote: > With Python: > * pygame + build your drag'n drop features > * if you like 3D, vpython. > > > http://www.pygame.org/ > http://www.vpython.org/ Wow, vpython looks pretty need. I'm messing around with it right now and reading the docs. But I can't find something...do you

Re: clean up html document created by Word

2007-03-30 Thread bearophileHUGS
jd: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if you know of a non-python solution, I'd > like to

Re: clean up html document created by Word

2007-03-30 Thread Peter Otten
jkn wrote: > IIUC, the original poster is asking about 'cleaning up' in the sense > of removing the swathes of unnecessary and/or redundant 'cruft' that > Word puts in there, rather than making valid HTML out of invalid HTML. > Again, IIUC, HTMLtidy does not do this. >From that very page I linked

Re: clean up html document created by Word

2007-03-30 Thread Shane Geiger
Tidy can now perform wonders on HTML saved from Microsoft Word 2000! Word bulks out HTML files with stuff for round-tripping presentation between HTML and Word. If you are more concerned about using HTML on the Web, check out Tidy's "Word-2000"

Re: clean up html document created by Word

2007-03-30 Thread jkn
IIUC, the original poster is asking about 'cleaning up' in the sense of removing the swathes of unnecessary and/or redundant 'cruft' that Word puts in there, rather than making valid HTML out of invalid HTML. Again, IIUC, HTMLtidy does not do this. If Beautiful Soup does, then I'm intererested!

Re: clean up html document created by Word

2007-03-30 Thread Peter Otten
jd wrote: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if you know of a non-python solution, I'd > l

Re: clean up html document created by Word

2007-03-30 Thread kyosohma
On Mar 30, 12:20 pm, "jd" <[EMAIL PROTECTED]> wrote: > I am looking for python code (working or sample code) that can take an > html document created by Microsoft Word and clean it up (if you've > never had to look at a Word-generated html document, consider yourself > lucky ;-) Alternatively, if

Re: What are OOP's Jargons and Complexities

2007-03-30 Thread Mike Schilling
bugbear wrote: > Er. How about > > public class test { > public static void main(String[] args) { > String a = "a string"; > String b = "another one"; > StringBuffer c = a + b; String c (etc.), that is. > System.out.println(c); > } > } -- http://mail.python.org/mailman/li

clean up html document created by Word

2007-03-30 Thread jd
I am looking for python code (working or sample code) that can take an html document created by Microsoft Word and clean it up (if you've never had to look at a Word-generated html document, consider yourself lucky ;-) Alternatively, if you know of a non-python solution, I'd like to hear about it.

Re: What are OOP's Jargons and Complexities

2007-03-30 Thread Mike Schilling
Timofei Shatrov wrote: > On Fri, 30 Mar 2007 06:48:05 GMT, "Mike Schilling" > <[EMAIL PROTECTED]> tried to confuse everyone with this > message: > >> Xah Lee wrote: >> >>> So, a simple code like this in normal languages: > >>> becomes in Java: >>> >>> >> >> Only when written by someone almost entir

Re: Islam, the Religion of Ease

2007-03-30 Thread hg
Just came to me ... if wars were always fought with fish as weapons, they'd be much less hunger in the world ... lol ... (as a non-anglo-saxon, I thought for many years that lol meant "Lord, Oh Lord !) hg (Holly Grail) -- http://mail.python.org/mailman/listinfo/python-list

Re: Islam, the Religion of Ease

2007-03-30 Thread hg
[EMAIL PROTECTED] wrote: > On Mar 29, 11:36 am, "moslim" <[EMAIL PROTECTED]> wrote: >> Excuse me!! >> Would you stop for a moment?! >> O...man...Haven't you thought-one day- about yourself ? >> Who has made it? >> Have you seen a design which hasn't a designer ?! >> Have you seen a wonderful,delic

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread kevinliu23
Hey guys, thanks for the quick replies. I'm looking for something more generic than adding it to "2a 3ab". For example, under the menu option 2, there can be upwards of 8 other suboptions. I'll see what's suggested here and post back if I run into more problems. Thanks guys! -- http://mail.python

Re: Modules & positive surprises

2007-03-30 Thread Steven Bethard
Jan Danielsson wrote: >But then there are a few modules that I just love to use, because > they are so "clean" from interface to function. Among them I can't help > mentioning optparse. If you like optparse, you should try argparse: http://argparse.python-hosting.com/ It has an optpars

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, kevinliu23 wrote: > "2a 3ab" into "-2a -3ab". In [8]: '-' + ' -'.join('2a 3ab 4xy'.split()) Out[8]: '-2a -3ab -4xy' Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

Re: File deletion after 72 hours of creation

2007-03-30 Thread Tim Williams
On 29 Mar 2007 13:40:58 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > On Mar 29, 12:02 pm, [EMAIL PROTECTED] wrote: > > Alex> I'm looking for a simple method to delete a folder after 72 > > Alex> "Business hours" (saturday/sunday doesnt count) since its > > Alex> creation. Note

Re: New to Python - Easy way to open a text file

2007-03-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, kyosohma wrote: > I'm not familiar with ezt formats, however reading a text file is a > breeze. This sentence doesn't match the code that follow. It's really simpler than that ``while`` loop. > f = open(r'pathToFile') > while True: > line = f.readline() > if

911 was a HEINOUS CRIME by RACIST YANK BASTARDZ - Opinion from JAPANESE Americans

2007-03-30 Thread thermate2
http://www.opednews.com/maxwrite/page.php?a=32710 March 28, 2007 at 21:50:23 Breaking my silence on 9/11 Truth by John Kusumi Page 1 of 1 page(s) http://www.opednews.com Tell A Friend Initially I preferred to keep silent about the 9/11 Truth Movement, to not be diverted from my issue. I'

Re: Library for windows ini-files ?

2007-03-30 Thread [EMAIL PROTECTED]
On Mar 30, 1:26 am, stef <[EMAIL PROTECTED]> wrote: > hello, > > is there a Python library for easy reading and writing windows ini-files ? > > thanks, > Stef Mientki Maybe check this out? http://www.voidspace.org.uk/python/configobj.html -- http://mail.python.org/mailman/listinfo/python-list

Re: make RE more cleaver to avoid inappropriate : sre_constants.error: redefinition of group name

2007-03-30 Thread Paddy
On Mar 30, 1:44 pm, "aspineux" <[EMAIL PROTECTED]> wrote: > On 30 mar, 00:13, "Paddy" <[EMAIL PROTECTED]> wrote: > > > On Mar 29, 3:22 pm, "aspineux" <[EMAIL PROTECTED]> wrote: > > > > I want to parse > > > > '[EMAIL PROTECTED]' or '<[EMAIL PROTECTED]>' and get the email address > > > [EMAIL PROTE

Re: Memory testing in Python

2007-03-30 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, mkPyVS <[EMAIL PROTECTED]> wrote: >>While I have a great deal of interest in memory management, >>my general reaction to your question as you've posed it is, >>"Don't; concentrate for now on good Python style." > >I agree but for monitoring... > >I've had good luck w

Re: New to Python - Easy way to open a text file

2007-03-30 Thread skip
Max> Hey gang, I'm new to python coding. I'm trying to find the Max> simplest way to open a text file (on the same server) and display Max> it's content. Try the open() builtin function: f = open(plainfiles.href, "r") print f.read() Skip -- http://mail.python.org/mailman/l

Re: New to Python - Easy way to open a text file

2007-03-30 Thread kyosohma
On Mar 30, 10:49 am, "Max Steel" <[EMAIL PROTECTED]> wrote: > Hey gang, I'm new to python coding. I'm trying to find the simplest way to > open a text file (on the same server) and display it's content. > > The text file is plain text (no markup language of any kind). > > The filename gets found a

Re: Islam, the Religion of Ease

2007-03-30 Thread adrian . villanustre
On Mar 29, 11:36 am, "moslim" <[EMAIL PROTECTED]> wrote: > Excuse me!! > Would you stop for a moment?! > O...man...Haven't you thought-one day- about yourself ? > Who has made it? > Have you seen a design which hasn't a designer ?! > Have you seen a wonderful,delicate work without a worker ?! > It'

Re: Game programming for kids: looking for open source 2D game development kit

2007-03-30 Thread John Nagle
Max Kubierschky wrote: > Diez B. Roggisch schrieb: > >> Max Kubierschky schrieb: >> >>> Hello, >>> >>> I'm planning to give a game programming course for kids of mixed age. >>> For this, I am looking for an open source 2D game development kit. >>> I am also willing to participate in the developmen

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread Larry Bates
kevinliu23 wrote: > Hey guys, > > I want to be able to insert a '-' character in front of all numeric > values in a string. I want to insert the '-' character to use in > conjunction with the getopt.getopt() function. > > Rigt now, I'm implementing a menu system where users will be able to > sele

Re: Inserting '-' character in front of all numbers in a string

2007-03-30 Thread kyosohma
On Mar 30, 10:38 am, "kevinliu23" <[EMAIL PROTECTED]> wrote: > Hey guys, > > I want to be able to insert a '-' character in front of all numeric > values in a string. I want to insert the '-' character to use in > conjunction with the getopt.getopt() function. > > Rigt now, I'm implementing a menu

New to Python - Easy way to open a text file

2007-03-30 Thread Max Steel
Hey gang, I'm new to python coding. I'm trying to find the simplest way to open a text file (on the same server) and display it's content. The text file is plain text (no markup language of any kind). The filename gets found and placed into a variable named [plainfiles.href] I'm using python t

Inserting '-' character in front of all numbers in a string

2007-03-30 Thread kevinliu23
Hey guys, I want to be able to insert a '-' character in front of all numeric values in a string. I want to insert the '-' character to use in conjunction with the getopt.getopt() function. Rigt now, I'm implementing a menu system where users will be able to select a set of options like "2a 3ab"

Re: Indentation for code readability

2007-03-30 Thread DE
> > > The curly brackets have no functional meaning... > > "Curly brackets have no functional meaning"? Surely you must be > thinking of C, but not C++. Some of the most powerful idioms (idia?) > of C++ make use of functionality that runs when a closing bracket > causes local variables to fall ou

next python berlin user group meeting / naechstes berliner python treffen

2007-03-30 Thread Stephan Diehl
time: 3.4., 7pm place: c-base info: http://groups.google.de/group/python-berlin -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory testing in Python

2007-03-30 Thread mkPyVS
>While I have a great deal of interest in memory management, >my general reaction to your question as you've posed it is, >"Don't; concentrate for now on good Python style." I agree but for monitoring... I've had good luck with executing a popen to grab and parse output from ps -Af and pass it yo

Re: Indentation for code readability

2007-03-30 Thread Paul McGuire
On Mar 30, 4:04 am, "DE" <[EMAIL PROTECTED]> wrote: > > The curly brackets have no functional meaning... "Curly brackets have no functional meaning"? Surely you must be thinking of C, but not C++. Some of the most powerful idioms (idia?) of C++ make use of functionality that runs when a closing

Re: Indentation for code readability

2007-03-30 Thread Alex Martelli
Thomas Krüger <[EMAIL PROTECTED]> wrote: > BTW: having one way to do it is one of the main ideas of Python's > philosophy. Yes, just like C's -- see point 4 in the "Spirit of C" summary taken from the ISO Standard for C and quoted e.g. at . Of cou

Re: Indentation for code readability

2007-03-30 Thread DE
Thanks Duncan. I guess you and Peter have been typing in the same minute :) It really looks like a good solution, I wasn't aware this with statement in Python. I can imagine the context handler coming handy in other cases too. Devrim -- http://mail.python.org/mailman/listinfo/python-list

Re: Indentation for code readability

2007-03-30 Thread DE
> > I don't understand why you are indenting > the function calls. What does the > indentation and spacing signify? The indentation of function calls increases readability not in the sense that it is easier to decrypt the code, but rather it is analogous to the coordinate system transformations th

Re: Indentation for code readability

2007-03-30 Thread Duncan Booth
"DE" <[EMAIL PROTECTED]> wrote: > Here is what I do in C++ and can not right now in python : > > pushMatrix() > { > drawStuff(); > > pushMatrix(); > { > drawSomeOtherStuff() > } > popMatrix(); > } > popMatrix(); > If I understand this contortion is because

  1   2   >