best options for oracle/python?
Any recommendations for Oracle bindings for the DB-API 2.0 specification? This is for Oracle 10g if that makes any difference. Also, any other Oracle related goodies that might be useful? Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
state of SOAP and python?
So I'm investigating doing some SOAP work... Any concensus on what the best python libraries are for doing this? Too bad, xmlrpc is choking on our long longs. :-( Many TIA, Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
Re: state of SOAP and python?
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Thursday 10/8/2006 03:38, Mark Harrison wrote: > > >So I'm investigating doing some SOAP work... Any concensus on > >what the best python libraries are for doing this? > > > >Too bad, xmlrpc is choking on our long longs. :-( > > Just thinking, if you have control over the two ends, and dont need > real interoperability, maybe just extending to support long > integers could be easier... > I remember extending once to support NaN's, moving to SOAP > was too much effort for that application. Good thinking! It turns out all you have to do is comment out the range check: def dump_int(self, value, write): # in case ints are > 32 bits ##if value > MAXINT or value < MININT: ##raise OverflowError, "int exceeds XML-RPC limits" write("") write(str(value)) write("\n") Thanks, Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
who is maintainer of xml-rpc module?
So, I've made a couple of small but useful additions to the xml-rpc package. Is there an assigned maintainer of the package I should communicate with? I've got the server side running under apache/mod_python, which is a bit more industrial strength than the simple xmlrpc server, and a patch for 64 bit int values. I'd like to get these into wider circulation if possible... what's the best way to do this? Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
--enable-shared, how do i set the rpath?
I've built a python with --enable-shared in order to support mod_python, but now I have to set LD_LIBRARY_PATH to $prefix/lib. Worse, it seems mod_python will die on some import statements, I'm suspecting ones that need to pull in .so's. Any clues appreciated... Mark. -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
creat a DOM from an html document
I thought I saw a package that would create a DOM from html, with allowances that it would do a "best effort" job to parse non-perfectly formed html. Now I can't seem to find this... does anybody have a recommendation as to a good package to look at? Many TIA! Mark -- http://mail.python.org/mailman/listinfo/python-list
Re: creat a DOM from an html document
Mark Harrison <[EMAIL PROTECTED]> wrote: > Now I can't seem to find this... does anybody have a recommendation > as to a good package to look at? Ahh, it's BeautifulSoup... Thanks All!! -- http://mail.python.org/mailman/listinfo/python-list
splitting delimited strings
What is the best way to process a text file of delimited strings? I've got a file where strings are quoted with at-signs, @like [EMAIL PROTECTED] At-signs in the string are represented as doubled @@. What's the most efficient way to process this? Failing all else I will split the string into characters and use a FSM, but it seems that's not very pythonesqe. @rv@ 2 @db.locks@ @//depot/hello.txt@ @mh@ @mh@ 1 1 44 @pv@ 0 @db.changex@ 44 44 @mh@ @mh@ 1118875308 0 @ :@@: :: @ (this is from a perforce journal file, btw) Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
Re: splitting delimited strings
Paul McNett <[EMAIL PROTECTED]> wrote: > Mark Harrison wrote: > > What is the best way to process a text file of delimited strings? > > I've got a file where strings are quoted with at-signs, @like [EMAIL > > PROTECTED] > > At-signs in the string are represented as doubled @@. > > Have you taken a look at the csv module yet? No guarantees, but it may > just work. You'd have to set delimiter to ' ' and quotechar to '@'. You > may need to manually handle the double-@ thing, but why don't you see > how close you can get with csv? This is great! Everything works perfectly. Even the double-@ thing is handled by the default quotechar handling. Thanks again, Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
test, please ignore qrm
test, please ignore -- http://mail.python.org/mailman/listinfo/python-list
test,please ignore 2 qrm
please ignore -- http://mail.python.org/mailman/listinfo/python-list
xml-rpc and 64-bit ints?
I've got an API that deals with 64 bit int values. Is there any way of handling this smoothly? Right now I'm casting the values into and out of strings for the API. If not, are there any nice alternatives to XML-RPC that support this? Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
to thine own SELF be true...
Is there a way to do something equivalent to "import * from self"? Perhaps I'm doing something wrong, but I'm having a headache when dealing with class instance data, forgetting to always put the "self." prefix For example, in my brain I'm thinking: optc,args=getopt.getopt(args,cmdopts[cmd][0], cmdopts[cmd][1]) but I'm having to type: self.optc,self.args=getopt.getopt(self.args,self.cmdopts[self.cmd][0], self.cmdopts[self.cmd][1]) Is there a way to get rid of those the "self." references, or is this just something I need to get my brain to accept? Many TIA, Mark -- Mark Harrison Pixar Animaion Studios -- http://mail.python.org/mailman/listinfo/python-list
easy way to dump a class instance?
Is there a way to automatically print all the instance data in a class? This is for debugging, I would like to do something like dump(self) to snapshot the state of the object. Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
create a c++ wrapper for python class?
Right now I'm using Boost Python to wrap some C++ code so that applications from both languages can use it. This is great, but I'm rapidly coming to the conclusion that a lot of this work is better coded in Python. There's nothing particularly CPU-bound, and the comprehensive Python library is a big help. So, I'm looking for a C++ wrapper generator, so that I can write a class in Python, and then have a .h and .cpp generated that will give me a corresponding C++ class. Of course, the usual restrictions apply: no dynamically added methods, accessing all instance data via getters and setters, etc. It seems a first cut of this is pretty straightforward, using introspection to get the required methods. Something needs to be done to specify the C++ types of the parameters. Is there any work being done in this area? Many TIA, Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list
optparse, allowing both --foo and foo=99?
What's the magic to allow this? If the value is not specified I would like to use the default value of 1. import optparse p=optparse.OptionParser() p.add_option("--debug") (opts, args) = p.parse_args(['--debug=22']); print opts (opts, args) = p.parse_args(['--debug']); print opts Many TIA! Mark -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list