Re: parsing json output

2008-03-19 Thread Gowri
I actually have a weirder problem. The code I posted earlier prints garbage on Windows and python 2.5 and the perfect json data on RHEL python 2.3.4. I'm so confused and helpless. json.py doesn't seem to help either. It says raise ReadException, Input is not valid JSON: '%s' %

need a function to create eigenface image

2008-03-19 Thread royG
hi while trying to make an eigenface image from a numpy array of floats i tried this from numpy import array import Image imagesize=(200,200) def makeimage(inputarray,imagename): inputarray.shape=(-1,) newimg=Image.new('L', imagesize) newimg.putdata(inputarray)

Re: automatically doing some cleaning-up by the process when the systems shuts down

2008-03-19 Thread bharath venkatesh
hi , thanks Gabriel ... but r u sure if it is SYSTERM ?or is it SIGTERM ? I am not aware of any SYSTERM signal .. if it is SYSTERM please tell me more about it .. as google search is not helping .. and also is there some way for my process which is running as a daemon to know that system was

Search the command history - Python Shell

2008-03-19 Thread Sanjaya Vitharana
Hi All, Are there any simillar key combination in Python Shell like Linux Ctrl+R (reverse-i-search) to search the command history? Thanks. Sanjaya Vitharana -- http://mail.python.org/mailman/listinfo/python-list

Re: automatically doing some cleaning-up by the process when the systems shuts down

2008-03-19 Thread bharath venkatesh
handling SIGTERM allowed me to do cleaning up while the system shuts down but as i mentioned previously how can my process know if the system was not shut down properly previously On Wed, Mar 19, 2008 at 12:36 PM, bharath venkatesh [EMAIL PROTECTED] wrote: hi , thanks Gabriel ... but

Re: Using threads in python is safe ?

2008-03-19 Thread Deepak Rokade
Thanks all for removing confusion about GIL, one more question; If jobs to be processed by threds is I/O bound would multithreading help python to improve speed of application ? Since I read that multithreading is not a good strategy to improve speed of python application. On Mon, Mar 17, 2008

Re: Is there a way to get __thismodule__?

2008-03-19 Thread Ben Hoyt
Aha! Thanks, Jeff. I'd heard about metaclasses, but never really seen them used. Your example was very helpful. This is somewhere that I would personally use a metaclass. That way, if you define more subclasses of Message, you're not limited to doing so in that single module. Cheers, Ben.

Re: placing a Python com object into Excel

2008-03-19 Thread Tim Roberts
Mathew [EMAIL PROTECTED] wrote: Thanks for the tip. But, instead of an AddIn, what if I want to be able to insert an object? I see that the demo adds items to the windows registry under \Excel\AddIns. Is there a similar location for the Insert Object command? What you see there is the list of

Re: stdout custom

2008-03-19 Thread castironpi
Can I allocate a second console window, so I can place certain output to that directly, and leave the original streams alone?  I tried Have you tried using the creationflags argument to subprocess.Popen? Specially the CREATE_NEW_CONSOLE flag. See the Microsoft documentation for

Re: parsing json output

2008-03-19 Thread Tim Roberts
Gowri [EMAIL PROTECTED] wrote: I have a service running somewhere which gives me JSON data. ... This prints a whole bunch of nonsense as expected. It's not nonsense. It's JSON. I use cjson and am unable to figure out how to print this json response You are already printing the JSON response.

Re: How to solve a three-element equation set?

2008-03-19 Thread Gerhard Häring
purple wrote: Could you guys do me a favor for solving a equation set? Z=d/4*(1-SIN(X)/X) X=8q/(D^2*Y)+SIN(X) Y=1/n*Z^(2/3)*i^(1/2) In this equation set, X,YZ are the unkown parameters, the others say, d, q, ni are known. SO in python, how to program it to represent X, Y and Z in the

How to solve a three-element equation set?

2008-03-19 Thread purple
Could you guys do me a favor for solving a equation set? Z=d/4*(1-SIN(X)/X) X=8q/(D^2*Y)+SIN(X) Y=1/n*Z^(2/3)*i^(1/2) In this equation set, X,YZ are the unkown parameters, the others say, d, q, ni are known. SO in python, how to program it to represent X, Y and Z in the form of d, q, n and i?

PODCasts

2008-03-19 Thread Mike D
I really should say net cast as I think it's a better term ;) Does anyone have any recommended net casts on Python, or programming in general? Whats everyone listening to? Cheers Guys! -- http://mail.python.org/mailman/listinfo/python-list

Re: Decode email subjects into unicode

2008-03-19 Thread Gertjan Klein
Laszlo Nagy wrote: However, there are malformed emails and I have to put them into the database. What should I do with this: [...] There is no encoding given in the subject but it contains 0x92. When I try to insert this into the database, I get: This is indeed malformed email. The content

Re: lock access to serial port

2008-03-19 Thread taco
[EMAIL PROTECTED] wrote: hello group, how to get ttyS0 serial port for exclusive access? I have a python script that uses this device with AT commands. I need that two instances can call simultaneosuly this python script but only one of them gets the device. I tried fcntl.flock, it was

Re: is hash map data structure available in Python?

2008-03-19 Thread Diez B. Roggisch
grbgooglefan schrieb: Hi, I have a situation that I need to search a name in a big list of names in my Python embedded interpreter. I am planning to use hash map for quicker search. How do I create hash map in Python? Can you please guide me to some documentation or tutorial which provides

Re: method to create class property

2008-03-19 Thread Diez B. Roggisch
Isn't that:: @propset(foo) def foo(self, value): self._value = value Yeah, you are right. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Gerhard Häring
wesley chun wrote: http://it.slashdot.org/it/08/03/18/1633229.shtml it was surprising and disappointing that Python was not mentioned *anywhere* in that article [...] Probably because Ruby is all hot and sexy nowadays ;-) Though it's remarkably close to Python, apparently. So close that I

is hash map data structure available in Python?

2008-03-19 Thread grbgooglefan
Hi, I have a situation that I need to search a name in a big list of names in my Python embedded interpreter. I am planning to use hash map for quicker search. How do I create hash map in Python? Can you please guide me to some documentation or tutorial which provides information on creating,

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Paul Rubin
Gerhard Häring [EMAIL PROTECTED] writes: Probably because Ruby is all hot and sexy nowadays ;-) Though it's remarkably close to Python, apparently. So close that I couldn't be bothered to learn it. Ruby is apparently more Smalltalk-like and some consider it cleaner than Python. Like you, I

Re: Get actual call signature?

2008-03-19 Thread Hans Georg Krauthäuser
On 18 Mrz., 11:40, Jarek Zgoda [EMAIL PROTECTED] wrote: Say, I have a function defined as: def fun(arg_one, arg_two='x', arg_three=None): pass Is there any way to get actual arguments that will be effectively used when I call this function in various ways, like: fun(5) = [5, 'x',

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Torsten Bronger
Hallöchen! Paul Rubin writes: [...] Re Haskell: I've been spending a lot of time on Haskell recently, though I haven't done anything nontrivial with it yet (just some small stuff). But I think it's better for complex program development than Python is, Could you elaborate on this?

Re: ftp recursively

2008-03-19 Thread Paul Rubin
Jeff Schwab [EMAIL PROTECTED] writes: ftping it as a flat file, and untarring it on the other side. Of course, the motivation wasn't just to get the files from point A to point B using Unix (which I already know how to do), but to take advantage of an opportunity to learn some Python; next

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Paul Rubin
Torsten Bronger [EMAIL PROTECTED] writes: Re Haskell: I've been spending a lot of time on Haskell recently, though I haven't done anything nontrivial with it yet (just some small stuff). But I think it's better for complex program development than Python is, Could you elaborate on

Re: Is there a way to get __thismodule__?

2008-03-19 Thread Peter Otten
benhoyt wrote: Is there a way to get __thismodule__ in Python? That is, the current module you're in. Or isn't that known until the end of the module? For instance, if I'm writing a module of message types/classes, like so: class SetupMessage(Message): number = 1 class

Re: Need Help Starting Out

2008-03-19 Thread Bruno Desthuilliers
jmDesktop a écrit : Hi, I would like to start using Python, but am unsure where to begin. I know how to look up a tutorial and learn the language, but not what all technologies to use. I saw references to plain Python, Django, and other things. I want to use it for web building with

Re: keyboard interrupt

2008-03-19 Thread Hans Georg Krauthäuser
On 18 Mrz., 22:18, [EMAIL PROTECTED] (John Fisher) wrote: Hi Group, I have been absent a while, mainly because I have been getting better at figuring out my own Python problems. But not this one... I have a timed loop performing certain tasks until a total period of time has elapsed. I

Re: PODCasts

2008-03-19 Thread Tim Chase
I really should say net cast as I think it's a better term ;) Does anyone have any recommended net casts on Python, or programming in general? Well, though it's been a while since I last noticed a new release (last one dated Dec '07), the archives of Python 411 should all be online:

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Torsten Bronger
Hallöchen! wesley chun writes: http://it.slashdot.org/it/08/03/18/1633229.shtml it was surprising and disappointing that Python was not mentioned *anywhere* in that article but when someone replied, it sparked a long thread of post-discussion. Well, not because I like Python so much, but I

Re: Decode email subjects into unicode

2008-03-19 Thread Laszlo Nagy
Gertjan Klein wrote: Laszlo Nagy wrote: However, there are malformed emails and I have to put them into the database. What should I do with this: [...] There is no encoding given in the subject but it contains 0x92. When I try to insert this into the database, I get:

Re: Interesting math problem

2008-03-19 Thread BJörn Lindqvist
On Mon, Mar 17, 2008 at 11:57 PM, Arnaud Delobelle [EMAIL PROTECTED] wrote: def make_slope(distance, parts): step = distance / float(parts) intstep = int(step) floatstep = step - intstep steps = [] acc = 0.0 for i in range(parts): acc +=

PSF Community Awards

2008-03-19 Thread Steve Holden
For those who weren't at PyCon, or who missed the announcement (which seems to include all of the recipients :-) I have just made a post in the PSF blog to publicize the first PSF Community Awards. See http://pyfound.blogspot.com/2008/03/psf-community-awards.html These awards are made to

Re: Is there a way to get __thismodule__?

2008-03-19 Thread Duncan Booth
benhoyt [EMAIL PROTECTED] wrote: But adding each message class manually to the dict at the end feels like repeating myself, and is error-prone. It'd be nice if I could just create the dict automatically, something like so: nmap = {} for name in dir(__thismodule__): attr =

Re: lists v. tuples

2008-03-19 Thread Duncan Booth
[EMAIL PROTECTED] wrote: I am puzzled by the failure on 'a in a' for a=[a]. a== [a] also fails. Can we assume/surmise/deduce/infer it's intentional? It may be less confusing if instead of an assignment following by a test you just consider doing the test at the same time as the assignment

Re: Search the command history - Python Shell

2008-03-19 Thread Tim Chase
Are there any simillar key combination in Python Shell like Linux Ctrl+R (reverse-i-search) to search the command history? It must depend on how your version of Python was built...mine here on my Linux box has exactly that functionality. I press ^R and start typing, and the line comes up

RE: First Program Bug (Newbie)

2008-03-19 Thread Andreas Tawn
[snip] What is the square root function in python? There's one in the math module. Use the one in gmpy if you have it. Or raise to the power 1/power 9**(1.0/2) 3.0 Also works for cube root, quad root etc. 27**(1.0/3) 3.0 81**(1.0/4) 3.0 243**(1.0/5) 3.0 Cheers, Drea --

Re: Huge problem gettng MySQLdb to work on my mac mini running Macosx 10.5 Leopard

2008-03-19 Thread geert
On Mar 19, 2:26 am, Graham Dumpleton [EMAIL PROTECTED] wrote: On Mar 19, 9:47 am, geert [EMAIL PROTECTED] wrote: On Mar 18, 6:56 pm, geert [EMAIL PROTECTED] wrote: On Mar 14, 1:15 pm, [EMAIL PROTECTED] wrote: look

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
not the goal setup but the way I tried it out - a webpage to send an sms to mobile phone. This is an php what calls a python script. A python script opens serial device, checks for gsm network, sends a message - on all the way I try to make sure that appropriate answers are received from the gsm

a beginner, beginners question

2008-03-19 Thread klaus
Hello, I'm trying to learn python programming and so far so good. However when trying to master the oop side I ran into a small problem. I think I've done everything ok as outlined below. But I just don't understand why the `method' of `class' example isn't printing any of the variables that

Script Request...

2008-03-19 Thread some one
Hi all, I am not to familiar with python yet and I am wondering if someone can write a script that will monitor my DSL modems IP address and notify when it changes, its a 2Wire Advanced DSL Modem. I need to know when it changes because I am trying to run my own inhouse server and have to

Re: a beginner, beginners question

2008-03-19 Thread Tim Chase
class example: def __init__(self, foo, bar): self.foo = foo self.bar = bar def method(self): print method ... : print self.foo print self.bar if __name__ == __main__: obj = example This makes obj a synonym for example. You want

Re: a beginner, beginners question

2008-03-19 Thread John Machin
On Mar 19, 9:40 pm, klaus [EMAIL PROTECTED] wrote: Hello, I'm trying to learn python programming and so far so good. However when trying to master the oop side I ran into a small problem. I think I've done everything ok as outlined below. But I just don't understand why the `method' of

Re: PyCon Feedback and Volunteers (Re: Pycon disappointment)

2008-03-19 Thread NickC
On Mar 19, 6:07 am, Jeff Schwab [EMAIL PROTECTED] wrote: As I have never attended PyCon, the amount of entertainment already gleaned from this thread has wildly exceeded my expectations. :) Are slides or notes from any of the presentations available online? What was the topic of the

printing dictionary and tuple

2008-03-19 Thread Beema shafreen
Hi everbody i am trying to print the dictionary values and tuple in a same line as below print \t.join(dict[a].values())+'\t'+\t.join(b) Error I get is the TypeError, since i have misisng values in the dictionary. if i use exception i will miss those how should i print the data without

Re: a beginner, beginners question

2008-03-19 Thread klaus
On Wed, 19 Mar 2008 05:57:04 -0500, Tim Chase wrote: class example: def __init__(self, foo, bar): self.foo = foo self.bar = bar def method(self): print method ... : print self.foo print self.bar if __name__ == __main__: obj =

xml sax

2008-03-19 Thread Timothy Wu
Hi, I am using xml.sax.handler.ContentHandler to parse some simple xml. I want to detect be able to parse the content of this tag embedded in the XML. Id174/Id Is the proper way of doing so involving finding the Id tag from startElement(), setting flag when seeing one, and in characters(),

Re: Script Request...

2008-03-19 Thread Diez B. Roggisch
some one wrote: Hi all, I am not to familiar with python yet and I am wondering if someone can write a script that will monitor my DSL modems IP address and notify when it changes, its a 2Wire Advanced DSL Modem. I need to know when it changes because I am trying to run my own inhouse server

Re: PODCasts

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 9:06 AM, Mike D [EMAIL PROTECTED] wrote: I really should say net cast as I think it's a better term ;) Since I'm working at The Guardian, I'm bound to stand up for the term 'podcast'. ;-) Besides, it's very established now - too late to fight it. Does anyone have any

Re: os.path.getsize() on Windows

2008-03-19 Thread Steven D'Aprano
On Tue, 18 Mar 2008 13:58:33 -0700, Sean DiZazzo wrote: I'm seeing some behavior that is confusing me. I often use a simple function to tell if a file is growing...ie being copied into a certain location. (Can't process it until it's complete) Surely though, under Windows, while something

Re: Need Help Starting Out

2008-03-19 Thread rodmc
Your best bets are probably Django, Pylons or web.py. But you should learn enough of the core language itself before jumping in web stuff IMHO. Yes, a good point. If you are looking for general info then then Dive Into Python (a link is on the Python website) is a good start for people who

Re: Anomaly in time.clock()

2008-03-19 Thread Godzilla
Hi John, I am using time.clock to calculate the elapsed time. Below is an example of what I was trying to do: import time import thread class elapseTime: def __init__(self, name=''): self.name = name self.timeStamp = None self.checkTimeFlag = False

Re: os.path.getsize() on Windows

2008-03-19 Thread Duncan Booth
Steven D'Aprano [EMAIL PROTECTED] wrote: This whole approach assumes that Windows does the sensible thing of returning a unique error code when you try to open a file for reading that is already open for writing. So how would you use a file to share data then? By default Python on

Speaking Text

2008-03-19 Thread David C. Ullrich
Mac OS X has text-to-speech built into the interface. So there must be a way to access that from the command line as well - in fact the first thing I tried worked: os.system('say hello') says 'hello'. Is there something similar in Windows and/or Linux? (If it's there in Linux presumably it only

RE: EuroSciPy 2008 Conference - Leipzig, Germany

2008-03-19 Thread kgmuller
Travis, A great initiative! I will attend and will submit an abstract of a presentation on SimPy (Simulation in Python) and how this project will be brought closer to SciPy. Any idea where in Leipzig the conference will be held? I want to book a hotel in the vicinity of the conference site.

Re: Speaking Text

2008-03-19 Thread Bill Scherer
David C. Ullrich wrote: Mac OS X has text-to-speech built into the interface. So there must be a way to access that from the command line as well - in fact the first thing I tried worked: os.system('say hello') says 'hello'. Is there something similar in Windows and/or Linux? (If it's

Re: Using threads in python is safe ?

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 7:43 AM, Deepak Rokade [EMAIL PROTECTED] wrote: If jobs to be processed by threds is I/O bound would multithreading help python to improve speed of application ? Probably, yes. -- Cheers, Simon B. [EMAIL PROTECTED] http://www.brunningonline.net/simon/blog/ --

Re: What Programming Languages Should You Learn Next?

2008-03-19 Thread Sean Allen
Haven't found that killer problem so far ... for Haskell, check out HAppS. They have some great web application stuff going on. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pycon disappointment

2008-03-19 Thread Aaron Watters
On Mar 18, 12:55 pm, [EMAIL PROTECTED] wrote: Amen on the diamond keynotes and lightning talks. The lightning talks were a great disappointment. Sponsor talks (or any such talks pitched at selling or recruiting) should go in their own, clearly labeled group so those of us who don't care about

Re: lock access to serial port

2008-03-19 Thread Grant Edwards
On 2008-03-18, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: how to get ttyS0 serial port for exclusive access? I have a python script that uses this device with AT commands. I need that two instances can call simultaneosuly this python script but only one of them gets the device. I tried

Re: lock access to serial port

2008-03-19 Thread [EMAIL PROTECTED]
hmm, now it seems I get to the locking try: ser = serial.Serial(dev, 19200, rtscts=1, timeout=1) if ser.isOpen(): try: fcntl.lockf(ser,fcntl.LOCK_EX) but get into some weirdness - trying to lock does not time out! The script stops at this line and

Re: Speaking Text

2008-03-19 Thread Hans Georg Krauthäuser
On 19 Mrz., 13:41, David C. Ullrich [EMAIL PROTECTED] wrote: Mac OS X has text-to-speech built into the interface. So there must be a way to access that from the command line as well - in fact the first thing I tried worked: os.system('say hello') says 'hello'. Is there something similar

Re: Speaking Text

2008-03-19 Thread Duncan Booth
David C. Ullrich [EMAIL PROTECTED] wrote: os.system('say hello') says 'hello'. Is there something similar in Windows and/or Linux? (If it's there in Linux presumably it only works if there happens to be a speech engine available...) Perhaps http://www.mindtrove.info/articles/pytts.html

[Q] SOAP Server in Python

2008-03-19 Thread Eric
What is the best, well supported, way to write a SOAP Server in Python? Where can a good example be found? I do have a WSDL file. In PHP5, it is rather trivial to write a SOAP server once one has a WSDL file. For example, a simple SOAP Server written using PHP5 might look like: ?PHP class

changing names of items in a list

2008-03-19 Thread royG
hi i am trying to rename extension of files in a directory..as an initial step i made a method in class ConvertFiles: def __init__(self,infldr,outfldr): self.infldr=infldr self.outfldr=outfldr self.origlist=os.listdir(infldr) def

Re: lock access to serial port

2008-03-19 Thread Andra
I tried ready-made commands for file locking, and turned to that LCK file just in case some permissions are wrong and that's the reason the commands fail. On 19 Marts, 15:43, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-03-18, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: how to get ttyS0

Generalizing PEP 370 (per user site-packages directory) via .pth files

2008-03-19 Thread ago
Dear all, I was reading pep 370, Per user site-packages directory http://www.python.org/dev/peps/pep-0370/, and was wondering if the concept couldn't be generalized by having ways to pass a .pth file as commandline argument and/or via an environment variable (PYTHONPATH could also be used to feed

Re: changing names of items in a list

2008-03-19 Thread Diez B. Roggisch
royG wrote: hi i am trying to rename extension of files in a directory..as an initial step i made a method in class ConvertFiles: def __init__(self,infldr,outfldr): self.infldr=infldr self.outfldr=outfldr self.origlist=os.listdir(infldr)

Re: changing names of items in a list

2008-03-19 Thread Simon Brunning
On Wed, Mar 19, 2008 at 2:21 PM, royG [EMAIL PROTECTED] wrote: hi i am trying to rename extension of files in a directory..as an initial step i made a method in class ConvertFiles: def __init__(self,infldr,outfldr): self.infldr=infldr self.outfldr=outfldr

Improving datetime

2008-03-19 Thread Nicholas F. Fabry
This is a query for information as to how to proceed. I am not a professional programmer, but I use Python a great deal to help me in my main job, which involves designing schedules for a global airline. As such, I use datetime (and dateutil) extensively, and after much use, I have come

Re: Improving datetime

2008-03-19 Thread Mike Driscoll
On Mar 19, 9:12 am, Nicholas F. Fabry [EMAIL PROTECTED] wrote: This is a query for information as to how to proceed. I am not a professional programmer, but I use Python a great deal to help me in my main job, which involves designing schedules for a global airline. As such, I use datetime

Re: SOAP Server in Python

2008-03-19 Thread dave_mikesell
On Mar 19, 9:19 am, Eric [EMAIL PROTECTED] wrote: I am basically looking to do the same thing in Python as easily. Any help or pointers would be appreciated. Googling for python soap turned up a few hits that may help you. -- http://mail.python.org/mailman/listinfo/python-list

cx_Oracle execute procedure

2008-03-19 Thread Poppy
I've been working on the code below and and executes silently, no complaints, however the end result should be a record in my table and it's not added. The procedure works with the passed credentials using SQLPlus or SQL Developer clients. However I'm not sure if I'm constructing my python

How to get an XML DOM while offline?

2008-03-19 Thread william tanksley
I want to parse my iTunes Library xml. All was well, until I unplugged and left for the train (where I get most of my personal projects done). All of a sudden, I discovered that apparently the presence of a DOCTYPE in the iTunes XML makes xml.dom.minidom insist on accessing the Internet... So

Re: cx_Oracle execute procedure

2008-03-19 Thread Jerry Hill
On Wed, Mar 19, 2008 at 11:03 AM, Poppy [EMAIL PROTECTED] wrote: I've been working on the code below and and executes silently, no complaints, however the end result should be a record in my table and it's not added. The procedure works with the passed credentials using SQLPlus or SQL

Re: Speaking Text

2008-03-19 Thread Grant Edwards
On 2008-03-19, David C Ullrich [EMAIL PROTECTED] wrote: Mac OS X has text-to-speech built into the interface. So there must be a way to access that from the command line as well - in fact the first thing I tried worked: os.system('say hello') says 'hello'. Is there something similar in

Re: Improving datetime

2008-03-19 Thread Preston Landers
On Mar 19, 9:12 am, Nicholas F. Fabry [EMAIL PROTECTED] wrote: So - where should I propose these changes?  Here?  python-dev?  Should   I write up a full PEP or should I just give a more informal outline   with code samples?   My guess is that the python-dev folks would send you here or to

Re: How to get an XML DOM while offline?

2008-03-19 Thread Diez B. Roggisch
william tanksley wrote: I want to parse my iTunes Library xml. All was well, until I unplugged and left for the train (where I get most of my personal projects done). All of a sudden, I discovered that apparently the presence of a DOCTYPE in the iTunes XML makes xml.dom.minidom insist on

Re: cx_Oracle execute procedure

2008-03-19 Thread Diez B. Roggisch
Poppy wrote: I've been working on the code below and and executes silently, no complaints, however the end result should be a record in my table and it's not added. The procedure works with the passed credentials using SQLPlus or SQL Developer clients. However I'm not sure if I'm constructing

Re: SOAP Server in Python

2008-03-19 Thread Eric
On Mar 19, 10:59 am, [EMAIL PROTECTED] wrote: On Mar 19, 9:19 am, Eric [EMAIL PROTECTED] wrote: I am basically looking to do the same thing in Python as easily. Any help or pointers would be appreciated. Googling for python soap turned up a few hits that may help you. Yes, but I don't

Re: SOAP Server in Python

2008-03-19 Thread Eric
On Mar 19, 10:59 am, [EMAIL PROTECTED] wrote: On Mar 19, 9:19 am, Eric [EMAIL PROTECTED] wrote: I am basically looking to do the same thing in Python as easily. Any help or pointers would be appreciated. Googling for python soap turned up a few hits that may help you. Yes, but I don't

Re: cx_Oracle execute procedure

2008-03-19 Thread Poppy
Thanks Jerry and Diez. The first two replies I found answered my noob question. Jerry Hill [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, Mar 19, 2008 at 11:03 AM, Poppy [EMAIL PROTECTED] wrote: I've been working on the code below and and executes silently, no

csv.Sniffer - delete in Python 3.0?

2008-03-19 Thread skip
The csv module contains a Sniffer class which is supposed to deduce the delimiter and quote character as well as the presence or absence of a header in a sample taken from the start of a purported CSV file. I no longer remember who wrote it, and I've never been a big fan of it. It determines

url validator in python

2008-03-19 Thread vvangelovski
How can I check the validity of absolute urls with http scheme? example: http://www.example.com/something.html; - valid http://www.google.com/ + Brite_AB_Iframe_URL + - invalid -- http://mail.python.org/mailman/listinfo/python-list

how to remove suffix from filename

2008-03-19 Thread royG
hi when parsing a list of filenames like ['F:/mydir/one.jpg','F:/mydir/ two.jpg'] etc i want to extract the basename without the suffix...ie i want to get 'one','two' etc and not 'one.jpg' is there a function in python to do this or do i have tosplit it ..? thanks RG --

Re: is hash map data structure available in Python?

2008-03-19 Thread sturlamolden
On 19 Mar, 09:40, grbgooglefan [EMAIL PROTECTED] wrote: How do I create hash map in Python? Python dictionaries are the fastest hash maps known to man. If you need persistent storage of your hash map, consider module bsddb or dbhash. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove suffix from filename

2008-03-19 Thread Mel
royG wrote: when parsing a list of filenames like ['F:/mydir/one.jpg','F:/mydir/ two.jpg'] etc i want to extract the basename without the suffix...ie i want to get 'one','two' etc and not 'one.jpg' is there a function in python to do this or do i have tosplit it ..? thanks

add new csv line

2008-03-19 Thread Alexandru Dumitrescu
Hello everybody, Is there a way to add a new line at the beginning of a *.csv file, line which contain the name of the columns? -- http://mail.python.org/mailman/listinfo/python-list

ADO error - large data set

2008-03-19 Thread Gyula
Hi there, I have been running Python to tap into an MS Access 2003 database using ADO (PythonWin+COM). Everything works great creating recordsets etc. when I open a table with a small number of records. However, when I try to run the same Python code with a large table (100,000) I get: Traceback

Python to C/C++

2008-03-19 Thread Blubaugh, David A.
To All, Has anyone worked with a translator that will translate python to c/c++ source code? I know that there is already one translator of this nature (shedskin compiler) out there. However, it is still in the beta stage of development. Does anyone know of a more developed version of a

Re: url validator in python

2008-03-19 Thread Tim Chase
How can I check the validity of absolute urls with http scheme? example: http://www.example.com/something.html; - valid http://www.google.com/ + Brite_AB_Iframe_URL + - invalid You could try something like import urllib tests = ( (http://www.google.com/ + Brite_AB_Iframe_URL + ,

Re: Python to C/C++

2008-03-19 Thread Michael Wieher
I think py2exe does this, but it might be a bit bloated 2008/3/19, Blubaugh, David A. [EMAIL PROTECTED]: To All, Has anyone worked with a translator that will translate python to c/c++ source code? I know that there is already one translator of this nature (shedskin compiler) out there.

Re: csv.Sniffer - delete in Python 3.0?

2008-03-19 Thread Robin Becker
[EMAIL PROTECTED] wrote: I would be happy to get rid of it in 3.0, but I'm also aware that some people use it. I'd like feedback from the Python community about this. If I removed it is there someone out there who wants it badly enough to maintain it in PyPI? .. sounds like we

Prototype OO

2008-03-19 Thread sam
Some time ago (2004) there were talks about prototype-based languages and Prothon emerged. Can someone tell me why class-based OO is better that Prototype based, especially in scripting langage with dynamic types as Python is? Here are some links:

Latest updates inSQL server and other programming laguages like C++/Java

2008-03-19 Thread Gokul
The latest developments in SQL server 2008 and an complete encyclopedia of microsoft softwares. Know the methodology to capture customers requirements for new products. Get the latest development in C++ and other IT related tools. A complete tutor for all your IT needs. Visit

Re: Need Help Starting Out

2008-03-19 Thread Peter Decker
On Tue, Mar 18, 2008 at 11:10 AM, jmDesktop [EMAIL PROTECTED] wrote: Hi, I would like to start using Python, but am unsure where to begin. I know how to look up a tutorial and learn the language, but not what all technologies to use. I saw references to plain Python, Django, and other

Re: Using threads in python is safe ?

2008-03-19 Thread Gabriel Genellina
En Wed, 19 Mar 2008 04:43:34 -0300, Deepak Rokade [EMAIL PROTECTED] escribió: Thanks all for removing confusion about GIL, one more question; If jobs to be processed by threds is I/O bound would multithreading help python to improve speed of application ? Since I read that multithreading

Re: How to get an XML DOM while offline?

2008-03-19 Thread Paul Boddie
On 19 Mar, 16:27, Diez B. Roggisch [EMAIL PROTECTED] wrote: william tanksley wrote: I want to parse my iTunes Library xml. All was well, until I unplugged and left for the train (where I get most of my personal projects done). All of a sudden, I discovered that apparently the presence of a

Python to C/C++

2008-03-19 Thread Patrick Mullen
(sorry michael, didn't mean to personal post On Wed, Mar 19, 2008 at 9:24 AM, Michael Wieher wrote: I think py2exe does this, but it might be a bit bloated No, py2exe basically bundles the main script and the interpreter together so it's easy to run and requires no python installation.

Re: Anomaly in time.clock()

2008-03-19 Thread Ross Ridge
Godzilla [EMAIL PROTECTED] wrote: But the time.clock() sometimes return a value of between -3.5 to -4.5 seconds backward. There are race conditions in your code. In between the time you execute curTime = time.clock() and calculate curTime - self.timeStamp in one thread, the other thread can

Tkinter.Text widget - how to get text cursor position?

2008-03-19 Thread Alex9968
Is it possible to get position (in numbers) of the insertion cursor? As I understood, Text widget uses mark named INSERT to store it, which is available globally by just referencing INSERT, but how could I get actual coordinate numbers of the mark? I need this because I want not just to insert

  1   2   3   4   >