Re: Executing Javascript, then reading value

2007-01-30 Thread Diez B. Roggisch
Melih Onvural schrieb: > I need to execute some javascript and then read the value as part of a > program that I am writing. I am currently doing something like this: > > import htmllib, urllib, formatter > > class myparser(htmllib.HTMLParser): > insave = 0 > def start_div(self, attr

Re: Python 2.5 Tkinter not configured

2007-01-30 Thread Diez B. Roggisch
Jim schrieb: > I compiled Python 2.5 from python.org and I get an error message when I try > to import the Tkinter module. Python reports that there is no such module. > It says my Python isn't configured for Tkinter. How do I configure it? I'm > using GCC 4.1.1 to compile the tarball. Thanks for a

Re: Conversion of string to integer

2007-01-30 Thread Thinker
jupiter wrote: > Hi guys, > > I have a problem. I have a list which contains strings and numeric. > What I want is to compare them in loop, ignore string and create > another list of numeric values. > > I tried int() and decimal() but without success. > > eq of problem is > > #hs=string.split(hs)

How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread tidegenerator
Hi; How can I know the Key c and Ctrl on the keyboard are pressed? Or how to let the program press the key Ctrl+c automatically? I just want to use python to develop a script program. gear -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython StatusBar Help

2007-01-30 Thread jean-michel bain-cornu
Hi, > I'm working with wxPython 2.8.1.1. > > Does anybody know how to change the foreground colors in a wx.StatusBar You can get inspiration from the following code, but the problem is you will have also to draw all the status bar stuff, not only the foreground color. I don't know any other way.

message handling in Python / wxPython

2007-01-30 Thread murali iyengar
hi, i have basic knowledge of python and wxPython... now i need to know about message handling in python/wxPython? could anybody pls help me by giving some info on how to handle (in Python), 'the user defined messages' posted from VC++, i dont know how to handle messaes in python. Thanks and Reg

Re: Help me understand this

2007-01-30 Thread Beej
On Jan 29, 11:47 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Outside of a print statement (and also an "except" statement), commas > create tuples. And function calls: >>> 3, (3,) >>> type(3,) >>> type((3,)) But here's one I still don't get: >>> type(2) >>> type((2)) >>> (2).__add__(1

Diff between opening files in 'r' and 'r+' mode

2007-01-30 Thread raghu
i want to know the difference between 'r' mode and 'r+' mode 1.i = open('c:\python25\integer.txt','w')>for writiing i.write('hai')->written some content in text file i = open('c:\python25\integer.txt','r')>for reading print i.read()>for printing the contents in that te

Explanation about pickle module

2007-01-30 Thread raghu
can any one explain about pickle i read in the book but they have not provided any example for that so please explain with a simple example -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me understand this

2007-01-30 Thread Diez B. Roggisch
Beej wrote: > On Jan 29, 11:47 pm, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> Outside of a print statement (and also an "except" statement), commas >> create tuples. > > And function calls: > 3, > (3,) type(3,) > type((3,)) > > > But here's one I still don't get: > t

Re: Explanation about pickle module

2007-01-30 Thread Diez B. Roggisch
raghu wrote: > can any one explain about pickle i read in the book but they have not > provided any example for that so please explain with a simple example Bad google day? Or just to lazy to do it? And what is "the book"? There are quite a few out there, some about python the language, others ab

Re: Explanation about pickle module

2007-01-30 Thread Marco Wahl
"raghu" <[EMAIL PROTECTED]> writes: > can any one explain about pickle i read in the book but they have not > provided any example for that so please explain with a simple example > >>> class Foo(object): ... def __init__(self): ... self.bar = 1 ... >>> import pickle >>> a = Foo() >>> pi

Re: Diff between opening files in 'r' and 'r+' mode

2007-01-30 Thread Ben Finney
"raghu" <[EMAIL PROTECTED]> writes: > i want to know the difference between 'r' mode and 'r+' mode > 1.i = open('c:\python25\integer.txt','w')>for writiing > i.write('hai')->written some content in text file > i = open('c:\python25\integer.txt','r')>for reading > print i.

thread and processes with python/GTK

2007-01-30 Thread awalter1
Hello, I'm developping an application with python, pyGTK and GTK+. I've performed many tests by using methods as Popen, popen2, os.system ... to communicate with Unix (HPUX), The last attempt is this code written in a thread : fin,fout = popen2.popen2('ps -def') line = fin

Re: Is any python like linux shell?

2007-01-30 Thread Brian Visel
ipython is probably what you're looking for. -- http://mail.python.org/mailman/listinfo/python-list

Re: Executing Javascript, then reading value

2007-01-30 Thread bearophileHUGS
Jean-Paul Calderone: > You might look into the > stand-alone Spidermonkey runtime. However, it lacks the DOM APIs, so > it may not be able to run the JavaScript you are interested in running. > There are a couple other JavaScript runtimes available, at least. This may be okay too: http://www.digi

Re: select windows

2007-01-30 Thread Tom Wright
Dennis Lee Bieber wrote: > (And the Amiga could add even more complexity -- I still miss the > Amiga's ability to PUSH a window to the back while STILL KEEPING > FOCUS... Made it easy to type stuff into one window while reading data > from a covering window!) KDE's window manager can do this (and

Re: Mounting shares with python

2007-01-30 Thread half . italian
On Jan 26, 10:27 am, Bjoern Schliessmann wrote: > Marcpp wrote: > > Hi, when i mount a share with python... > > > os.system ("mount -t smbfs -o username=nobody ...") > > > the problem is that I'll to be root. > > Consider modifying /etc/fstab. > > > Have a comand to send a root password...? > > I'

ANN: gozerbot IRC and JABBER bot

2007-01-30 Thread bthate
gozerbot a python irc and jabber bot see http://code.google.com/p/gozerbot you need: * a shell * python 2.4 or higher * if you want mysql support: the py-MySQLdb module * if you want jabber support: the xmpppy module why gozerbot? * user management by userhost * fleet

Re: Help me understand this

2007-01-30 Thread James Stroud
Beej wrote: (2).__add__(1) Nice. I would have never thought to put parentheses around an integer to get at its attributes. James -- http://mail.python.org/mailman/listinfo/python-list

Re: error messages containing unicode

2007-01-30 Thread Jim
Thank you for the reply. It happens that, as I understand it, none of the options that you mentioned is a solution for my situation. On Jan 29, 9:48 pm, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > The easiest ways to fix that are: > > (1) subclass an exception that already knows about Unicode;

Re: error messages containing unicode

2007-01-30 Thread Diez B. Roggisch
>> (2) convert the file name to ASCII before you store it; or > I need the non-ascii information, though, which is why I included it > in the error message. Then convert it to utf-8, or some encoding you know it will be used by your terminal. Diez -- http://mail.python.org/mailman/listinfo/pyt

Re: error messages containing unicode

2007-01-30 Thread Jim
On Jan 30, 7:41 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> (2) convert the file name to ASCII before you store it; or > > I need the non-ascii information, though, which is why I included it > > in the error message. > Then convert it to utf-8, or some encoding you know it will be used

Re: error messages containing unicode

2007-01-30 Thread Peter Otten
Jim wrote: > On Jan 30, 7:41 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> >> (2) convert the file name to ASCII before you store it; or >> > I need the non-ascii information, though, which is why I included it >> > in the error message. >> Then convert it to utf-8, or some encoding you kno

Re: Is any python like linux shell?

2007-01-30 Thread Szabolcs Nagy
Brian Visel wrote: > ipython is probably what you're looking for. or http://sourceforge.net/projects/pyshell -- http://mail.python.org/mailman/listinfo/python-list

Re: error messages containing unicode

2007-01-30 Thread Jim
On Jan 30, 8:18 am, Peter Otten <[EMAIL PROTECTED]> wrote: > >>> try:... raise Exception(u"gewöhnlich ähnlich üblich") > ... except Exception, e: > ... print e.message > ... > gewöhnlich ähnlich üblich Ah, so that's what "If there is a single argument (as is preferred), it is bound to the

Re: How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread Szabolcs Nagy
[EMAIL PROTECTED] wrote: > Hi; > How can I know the Key c and Ctrl on the keyboard are pressed? Or how > to let the program press the > > key Ctrl+c automatically? I just want to use python to develop a > script program. > gear depends on where you got your input from and what do you exactly want

Re: Diff between opening files in 'r' and 'r+' mode

2007-01-30 Thread Sick Monkey
It was a little hard to follow your logic of your sample code (writing, reading and writing again), but (1)The difference between r and r+. - 'r+' opens the file for both reading and writing. - 'r' should be used when the file will only be read. I am not sure on how you want to store the co

Re: deepcopy alternative?

2007-01-30 Thread none
Szabolcs Nagy wrote: >> I believe the only thing stopping me from doing a deepcopy is the >> function references, but I'm not sure. If so is there any way to >> transform a string into a function reference(w/o eval or exec)? > > what's your python version? > for me deepcopy(lambda:1) does not wor

ANN: Pyrex 0.9.5.1

2007-01-30 Thread greg
Pyrex 0.9.5.1 is now available: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ This is a minor release to fix a few bugs introduced in 0.9.5. See the CHANGES for details. What is Pyrex? -- Pyrex is a language for writing Python extension modules. It lets you freely mix oper

Re: Fixed length lists from .split()?

2007-01-30 Thread Steven Bethard
On Jan 26, 11:07 am, Bob Greschke <[EMAIL PROTECTED]> wrote: > I'm reading a file that has lines like > > bcsn; 100; 1223 > bcsn; 101; 1456 > bcsn; 103 > bcsn; 110; 4567 > > The problem is the line with only the one semi-colon. > Is there a fancy way to get Parts=Lin

Re: How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread BJörn Lindqvist
On 30 Jan 2007 05:44:40 -0800, Szabolcs Nagy <[EMAIL PROTECTED]> wrote: > however Ctrl+C is a special key combination: running python in a unix > terminal it raises KeyboardInterrupt exception, imho in a windows cmd > promt it raises SystemExit No it is KeyboardInterrupt in Windows too. -- mvh B

Re: Compiling extension with Visual C++ Toolkit Compiler - MSVCR80.dll

2007-01-30 Thread alexandre_irrthum
Thanks for your answers Martin and Peter, I figured out why python.exe was asking for MSVCR80.dll. The first time I compiled the library, MS Visual C++ Express 2005 was used during the build (despite my PATH pointing to MS Visual C++ Toolkit 2003). When I removed Express 2005, I forgot to remov

data design

2007-01-30 Thread Imbaud Pierre
The applications I write are made of, lets say, algorithms and data. I mean constant data, dicts, tables, etc: to keep algorithms simple, describe what is peculiar, data dependent, as data rather than "case statements". These could be called configuration data. The lazy way to do this: have module

Re: How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread Duncan Booth
"Szabolcs Nagy" <[EMAIL PROTECTED]> wrote: > however Ctrl+C is a special key combination: running python in a unix > terminal it raises KeyboardInterrupt exception, imho in a windows cmd > promt it raises SystemExit > Your humble opinion is wrong. Under windows Ctrl-C raises KeyboardInterrup

Re: Secret Technology of THERMATE and 911 Crime

2007-01-30 Thread Uncle Al
[EMAIL PROTECTED] wrote: [snip crap] > I do not plan to make a career out of 9/11 research, [snip more crap] > We have found evidence for thermates in the molten metal seen pouring > from the South Tower minutes before its collapse, [snip still more crap] > Thermate is the red > powder in the st

Re: data design

2007-01-30 Thread Larry Bates
Imbaud Pierre wrote: > The applications I write are made of, lets say, algorithms and data. > I mean constant data, dicts, tables, etc: to keep algorithms simple, > describe what is peculiar, data dependent, as data rather than "case > statements". These could be called configuration data. > > The

Synchronous shutil.copyfile()

2007-01-30 Thread Hugo Ferreira
Hi there, I have a problem. I'm using calling shutil.copyfile() followed by open(). The thing is that most of the times open() is called before the actual file is copied. I don't have this problem when doing a step-by-step debug, since I give enough time for the OS to copy the file, but at run-tim

Re: data design

2007-01-30 Thread Szabolcs Nagy
> The lazy way to do this: have modules that initialize bunches of > objects, attributes holding the data: the object is somehow the row of > the "table", attribute names being the column. This is the way I > proceeded up to now. > Data input this way are almost "configuration data", with 2 big > d

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Sick Monkey
First off, I am just learning Python, so if there is a more efficient way to do this, then I am all ears (NOTE: The code below is something that I was messing with to learn threads... So some functionality is not applicable for your needs..I just wanted to show you a demonstration) One way

Please take me off the list

2007-01-30 Thread Daniel kavic
Sorry to waste email space , but I wish to be off this list because I have tried python and it is too difficult for me. -Dan -- http://mail.python.org/mailman/listinfo/python-list

Re: Please take me off the list

2007-01-30 Thread Mikael Olofsson
Daniel kavic wrote: > Sorry to waste email space , but I wish to be off this list because I have > tried python and it is too difficult for me. > That's sad. Go to http://mail.python.org/mailman/listinfo/python-list and follow instructions. /MiO -- http://mail.python.org/mailman/listin

python-list@python.org

2007-01-30 Thread Chris Lambacher
On Mon, Jan 29, 2007 at 03:12:37PM -0800, Pappy wrote: > SHORT VERSION: > Python File B changes sys.stdout to a file so all 'prints' are written > to the file. Python file A launches python file B with os.popen("./B > 2>&^1 >dev/null &"). Python B's output disappears into never-never > land. >

Help me override append function of list object

2007-01-30 Thread jeremito
I have created a class that inherits from the list object. I want to override the append function to allow my class to append several copies at the same time with one function call. I want to do something like: import copy class MyList(list): __init__(self): pass def append(self, ob

python-list@python.org

2007-01-30 Thread Jason Persampieri
Sadly, the group is tied to Python 2.3 for now. Actually, I got around this problem by using an intermediate process that happens to handle output on its own (bsub). On 1/30/07, Chris Lambacher <[EMAIL PROTECTED]> wrote: The subprocess module is probably a good starting point: http://docs.pyth

Re: thread and processes with python/GTK

2007-01-30 Thread Thomas Guettler
Hi, how do you start the python app? Goes stdout to a terminal or a pipe? "python script.py" and "python script.py | cat" behave different. Maybe "sys.stdout.flush()" helps you. BTW, I switched from threads to idle_add for pygtk applications. awalter1 wrote: > Hello, > > I'm developping an app

Re: Help me override append function of list object

2007-01-30 Thread Peter Otten
jeremito wrote: > I have created a class that inherits from the list object. I want to > override the append function to allow my class to append several > copies at the same time with one function call. I want to do > something like: > > import copy > > class MyList(list): > __init__(self):

Re: data design

2007-01-30 Thread Imbaud Pierre
Szabolcs Nagy a écrit : >>The lazy way to do this: have modules that initialize bunches of >>objects, attributes holding the data: the object is somehow the row of >>the "table", attribute names being the column. This is the way I >>proceeded up to now. >>Data input this way are almost "configurati

Re: data design

2007-01-30 Thread Imbaud Pierre
Larry Bates a écrit : > Imbaud Pierre wrote: > >>The applications I write are made of, lets say, algorithms and data. >>I mean constant data, dicts, tables, etc: to keep algorithms simple, >>describe what is peculiar, data dependent, as data rather than "case >>statements". These could be called c

python-list@python.org

2007-01-30 Thread Chris Lambacher
On Tue, Jan 30, 2007 at 10:42:22AM -0500, Jason Persampieri wrote: >Sadly, the group is tied to Python 2.3 for now. Subprocess for 2.2 and 2.3: http://www.lysator.liu.se/~astrand/popen5/ Win32 installers for subversion for 2.2 and 2.3: http://www.lysator.liu.se/~astrand/popen5/ -Chris > >

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Jean-Paul Calderone
On Tue, 30 Jan 2007 15:05:23 +, Hugo Ferreira <[EMAIL PROTECTED]> wrote: >Hi there, > >I have a problem. I'm using calling shutil.copyfile() followed by >open(). The thing is that most of the times open() is called before >the actual file is copied. I don't have this problem when doing a >step-

Re: Help me override append function of list object

2007-01-30 Thread jeremito
On Jan 30, 10:47 am, Peter Otten <[EMAIL PROTECTED]> wrote: > jeremito wrote: > > I have created a class that inherits from the list object. I want to > > override the append function to allow my class to append several > > copies at the same time with one function call. I want to do > > someth

Re: Please take me off the list

2007-01-30 Thread Jacques Cazotte
Daniel kavic a écrit : > Sorry to waste email space , but I wish to be off this list because I have > tried python and it is too difficult for me. > > -Dan Hi Daniel, My name is God, and I am quite new to mailing lists. I sometimes wonder wether computerizing the whole thing was a good idea. Do Y

Re: Sourcing Python Developers

2007-01-30 Thread Ralf Schönian
Kartic schrieb: > Hello, > > My company has quite a few opening involving python expertise. We are > always looking for python resources (and find it difficult filling these > positions, might I add). Is there any place to find developers' resumes > (like finding jobs from http://python.org/com

Re: message handling in Python / wxPython

2007-01-30 Thread Chris Mellon
On 1/30/07, murali iyengar <[EMAIL PROTECTED]> wrote: > hi, > i have basic knowledge of python and wxPython... now i need to know about > message handling in python/wxPython? > > could anybody pls help me by giving some info on how to handle (in Python), > 'the user defined messages' posted from VC

Re: Please take me off the list

2007-01-30 Thread Paul Boddie
On 30 Jan, 16:33, Mikael Olofsson <[EMAIL PROTECTED]> wrote: > >http://mail.python.org/mailman/listinfo/python-list See also the Tutor mailing list, which might be a bit better for starting to learn Python, should you (Daniel) decide to change your mind. Here's the mailing list's Web page:

Re: Unicode error handler

2007-01-30 Thread Walter Dörwald
Rares Vernica wrote: > Hi, > > Does anyone know of any Unicode encode/decode error handler that does a > better replace job than the default replace error handler? > > For example I have an iso-8859-1 string that has an 'e' with an accent > (you know, the French 'e's). When I use s.encode('asci

Re: Please take me off the list

2007-01-30 Thread Christopher Mocock
Paul Boddie wrote: > See also the Tutor mailing list, which might be a bit better for > starting to learn Python, should you (Daniel) decide to change your > mind. Here's the mailing list's Web page: > > http://mail.python.org/mailman/listinfo/tutor > > If you haven't seen much information for

ANNOUNCE: OSCON 2007 Call for Participation Ends Soon

2007-01-30 Thread Kevin Altis
Be Heard at OSCON 2007 -- Submit Your Proposal to Lead Sessions and Tutorials by February 5! The O'Reilly Open Source Convention July 23-27, 2007 Portland, Oregon http://conferences.oreillynet.com/os2007/ More than 2500 open source developers, gurus, experts and users will gather, eager to netwo

test, please ignore qrm

2007-01-30 Thread Mark Harrison
test, please ignore -- http://mail.python.org/mailman/listinfo/python-list

Re: data design

2007-01-30 Thread Larry Bates
Imbaud Pierre wrote: > Larry Bates a écrit : >> Imbaud Pierre wrote: >> >>> The applications I write are made of, lets say, algorithms and data. >>> I mean constant data, dicts, tables, etc: to keep algorithms simple, >>> describe what is peculiar, data dependent, as data rather than "case >>> stat

Re: Secret Technology of THERMATE and 911 Crime

2007-01-30 Thread thermate
A little intro to Uncle Al. This bastard is a spook from the criminal agencies. His job is to harass, disinform and such on the internet. He has been doing it overtime for many years. Now he was indeed doing his job in the last post. Thermate is indeed the correct terminology. When you search th

test,please ignore 2 qrm

2007-01-30 Thread Mark Harrison
please ignore -- http://mail.python.org/mailman/listinfo/python-list

Re: How can I know both the Key c and Ctrl on the keyboard are pressed?

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 05:50:29 -0300, <[EMAIL PROTECTED]> escribió: > How can I know the Key c and Ctrl on the keyboard are pressed? Or how > to let the program press the > > key Ctrl+c automatically? I just want to use python to develop a > script program. > gear If you are on Windows and want to

Re: Help me understand this

2007-01-30 Thread Gabriel Genellina
En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > But here's one I still don't get: > type(2) > type((2)) > (2).__add__(1) > 3 2.__add__(1) > File "", line 1 > 2.__add__(1) > ^ > SyntaxError: invalid syntax It appears to be a bug, eit

Re: Help me understand this

2007-01-30 Thread Jean-Paul Calderone
On Tue, 30 Jan 2007 14:39:28 -0300, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > >> But here's one I still don't get: >> > type(2) >> > type((2)) >> > (2).__add__(1) >> 3 > 2.__add__(1) >> File "", line 1

Re: The reliability of python threads

2007-01-30 Thread John Nagle
Aahz wrote: > In article <[EMAIL PROTECTED]>, > Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: > My point is that an app that dies only once every few months under load > is actually pretty damn stable! That is not the kind of problem that > you are likely to stimulate. This has all been so

Re: Synchronous shutil.copyfile()

2007-01-30 Thread Matthew Woodcraft
Hugo Ferreira <[EMAIL PROTECTED]> wrote: > I have a problem. I'm using calling shutil.copyfile() followed by > open(). The thing is that most of the times open() is called before > the actual file is copied. I don't have this problem when doing a > step-by-step debug, since I give enough time for t

Re: Help me understand this

2007-01-30 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Jean-Paul Calderone wrote: >>An integer is a primary so 2.__add(1) should be valid. > > A float is, too. 2.__add is a float followed by an identifier. > Not legal. As pointed out elsewhere in the thread, (2). forces > it to be an integer followed by a ".". A space betwe

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
Actually, that's not "raw data" coming in, that's valid XML. Why do you need to indent it? Just write it to a file. If you really need to indent XML, get BeautifulSoup, read the XML in with BeautifulStoneSoup, and write it back out with "prettify()". But if the next thing to see that XML

Re: Help me understand this

2007-01-30 Thread Neil Cerutti
On 2007-01-30, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Tue, 30 Jan 2007 06:34:01 -0300, Beej <[EMAIL PROTECTED]> escribió: > >> But here's one I still don't get: >> > type(2) >> > type((2)) >> > (2).__add__(1) >> 3 > 2.__add__(1) >> File "", line 1 >> 2.__add__(1)

Re: SQL connecting

2007-01-30 Thread Scripter47
Dennis Lee Bieber skrev: > On Mon, 29 Jan 2007 19:45:47 GMT, John Nagle <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > >> Scripter47 wrote: >>> Hey >>> >>> It got a problem with python to connect to my SQL DBs, that's installed >>> on my apache server. how do i connect to sql

C extension module causes bus error on Python exit

2007-01-30 Thread Anand Patil
Hi all, I was referred to this list from python-help. I've written an extension module in C which contains several new types. The types can be instantiated, used, and deleted under Python 2.4.3 on OS X 10.4 without problems. However, whenever I import the module Python tries to dereference a

Re: data design

2007-01-30 Thread Paddy
On Jan 30, 2:34 pm, Imbaud Pierre <[EMAIL PROTECTED]> wrote: > The applications I write are made of, lets say, algorithms and data. > I mean constant data, dicts, tables, etc: to keep algorithms simple, > describe what is peculiar, data dependent, as data rather than "case > statements". These co

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > > > For example the raw data is as follows > > > SomeText > Description>PassorFail > > > without spaces or new lines. I need this to be written into an XML > > f

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
Steve Holden wrote: > [snip] > > Are you using memory with built-in error detection and correction? > > You mean in the hardware? I'm not really sure, I'd assume so but is there any way I can check on this? If the hardware isn't doing that, is there anything I can do with my software to offe

Re: strip question

2007-01-30 Thread Daniel Klein
On 26 Jan 2007 21:33:47 -0800, [EMAIL PROTECTED] wrote: >hi >can someone explain strip() for these : >[code] x='www.example.com' x.strip('cmowz.') >'example' >[/code] > >when i did this: >[code] x = 'abcd,words.words' x.strip(',.') >'abcd,words.words' >[/code] > >it does not st

Re: The reliability of python threads

2007-01-30 Thread Carl J. Van Arsdall
John Nagle wrote: > Aahz wrote: > >> In article <[EMAIL PROTECTED]>, >> Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote: >> My point is that an app that dies only once every few months under load >> is actually pretty damn stable! That is not the kind of problem that >> you are likely to stimulat

MoinMoin

2007-01-30 Thread Daniel Klein
Is it fair game to ask questions about MoinMoin here? If not, can someone recommend a resource please? Dan -- http://mail.python.org/mailman/listinfo/python-list

Find and replace in a file with regular expression

2007-01-30 Thread TOXiC
Hi everyone, First I say that I serched and tryed everything but I cannot figure out how I can do it. I want to open a a file (not necessary a txt) and find and replace a string. I can do it with: import fileinput, string, sys fileQuery = "Text.txt" sourceText = '''SOURCE''' replaceText = '''REP

SQLObject 0.7.3

2007-01-30 Thread Oleg Broytmann
Hello! I'm pleased to announce the 0.7.3 release of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to use and quick to get started wit

Re: Executing Javascript, then reading value

2007-01-30 Thread John Nagle
Melih Onvural wrote: > Thanks, let me check out this route, and then I'll post the results. > > Melih Onvural > > On Jan 29, 4:04 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> On 29 Jan 2007 12:44:07 -0800, Melih Onvural <[EMAIL PROTECTED]> >> wrote: >> >> >>> I need to execute some

Re: MoinMoin

2007-01-30 Thread skip
Dan> Is it fair game to ask questions about MoinMoin here? Dan> If not, can someone recommend a resource please? Yes, however [EMAIL PROTECTED] will probably yield more responses: https://lists.sourceforge.net/lists/listinfo/moin-user I've had problems getting my posts to appear the

Re: Sourcing Python Developers

2007-01-30 Thread John Nagle
Ralf Schönian wrote: > Kartic schrieb: > >> Hello, >> >> My company has quite a few opening involving python expertise. We are >> always looking for python resources (and find it difficult filling >> these positions, might I add). Is there any place to find developers' >> resumes (like finding

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
[EMAIL PROTECTED] wrote: > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > the reason I wanted to write it as a file was to parse the file, look > for a specific attribute and execute a set of commands bas

Re: Find and replace in a file with regular expression

2007-01-30 Thread Matimus
The re module is used for regular expressions. Something like this should work (untested): import fileinput, string, sys, re fileQuery = "Text.txt" sourceText = '''SOURCE''' replaceText = '''REPLACE''' def replace(fileName, sourceText, replaceText): file = open(fileName, "r") tex

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
On Jan 30, 12:05 pm, John Nagle <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > > the reason I wanted to write it as a file was to parse the file, l

Re: Help me understand this

2007-01-30 Thread Beej
On Jan 30, 1:38 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Because 2. is the start of a float-literal. That isn't distinguishable for > the parsere otherwise. Oh, excellent! I wonder why I didn't think of that--I was too busy in "get a field" mode it didn't even occur to me that the "."

Re: Help me understand this

2007-01-30 Thread Beej
On Jan 30, 9:52 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > A float is, too. 2.__add is a float followed by an identifier. > Not legal. As pointed out elsewhere in the thread, (2). forces > it to be an integer followed by a ".". Which leads to these two beauties: >>> (2.).__add__(1) 3.

DCOP memory leak?

2007-01-30 Thread [EMAIL PROTECTED]
Hello, I'm writing a python script for Amarok, I communicate with Amarok using DCOP. Now, I have to call DCOP very often and I noticed that every time I make a DCOP call my program keeps growing in memory size. To make sure it was DCOP i wrote the small program below: from dcopext import DCOPC

Re: Convert raw data to XML

2007-01-30 Thread hg
[EMAIL PROTECTED] wrote: > On Jan 30, 12:05 pm, John Nagle <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >> > On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >> >> >>En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: >> > the reason I wanted to write it a

PythonCard

2007-01-30 Thread Tequila
I'm having some trouble starting PythonCard on my PC. I've downloaded and ran python-2.5.msi to install Python on my machine. And PythonCard-0.8.2.win32.exe to install PythonCard. When I try to run the program I get the following error: == C:\Python25\Lib\sit

Re: data design

2007-01-30 Thread Imbaud Pierre
Paddy a écrit : > > On Jan 30, 2:34 pm, Imbaud Pierre <[EMAIL PROTECTED]> wrote: > >>The applications I write are made of, lets say, algorithms and data. >>I mean constant data, dicts, tables, etc: to keep algorithms simple, >>describe what is peculiar, data dependent, as data rather than "case >

Re: DCOP memory leak?

2007-01-30 Thread jean-michel bain-cornu
> Now, I have to call DCOP very often and I noticed that every time I > make a DCOP call my program keeps growing in memory size. > > To make sure it was DCOP i wrote the small program below: > > from dcopext import DCOPClient, DCOPApp > > while 0==0: > dcop=DCOPClient() > dcop.attach()

Conditional expressions - PEP 308

2007-01-30 Thread Colin J. Williams
It would be helpful if the rules of the game were spelled out more clearly. The conditional expression is defined as X if C else Y. We don't know the precedence of the "if" operator. From the little test below, it seem to have a lower precedence than "or". Thus, it is desirable for the user to

Re: Secret Technology of THERMATE and 911 Crime

2007-01-30 Thread stj911
Thanks for this great link On Jan 29, 7:27 pm, [EMAIL PROTECTED] wrote: > Excellent Technology, and photos: > > http://stj911.org/jones/focus_on_goal.html > > As scientists, we look at the evidence, perform experiments, and apply > the Scientific Method. The Greek method was to look at the evidenc

Re: Resizing widgets in text windows

2007-01-30 Thread deacon . sweeney
On Jan 26, 10:52 pm, James Stroud <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE_WINDOW", callback) > > > I realize th

Re: Resizing widgets in text windows

2007-01-30 Thread deacon . sweeney
On Jan 29, 3:33 am, "Eric Brunel" <[EMAIL PROTECTED]> wrote: > On Fri, 26 Jan 2007 22:35:20 +0100, <[EMAIL PROTECTED]> wrote: > > Hi, I've been searching for a .resize()-like function to overload much > > like can be done for the delete window protocol as follows: > > > toplevel.protocol("WM_DELETE

Re: PythonCard

2007-01-30 Thread Paul Watson
Tequila wrote: > I'm having some trouble starting PythonCard on my PC. > > I've downloaded and ran python-2.5.msi to install Python on my > machine. And PythonCard-0.8.2.win32.exe to install PythonCard. > > When I try to run the program I get the following error: > =

Re: Convert raw data to XML

2007-01-30 Thread Gabriel Genellina
[EMAIL PROTECTED] wrote: > is there any other way to do this without using BeautifulStoneSoup.. > using existing minidom or ext.. > i dont want to install anything new It appears that you already know the answer... Look at the minidom documentation, toprettyxml method. -- Gabriel Genellina -

  1   2   >