Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Chris Mellon
On 1/11/07, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On 11 Jan 2007 04:49:21 -0800, "Sean Davis" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > > The machine running the script is distinct from the Oracle machine > > which is distinct from the Postgresql machine.

Re: Read from database, write to another database, simultaneously

2007-01-11 Thread Paul Boddie
Dennis Lee Bieber wrote: > > "need"? No... the "copy ... from ..." statement "needs" such, but do > you really "need" to use "copy ... from ..." to load the data -- or is > this just a concept that caught your fancy? In chapter 13 of the PostgreSQL 8.1 documentation ("Performance Tips"), descendi

Re: globals accros modules

2007-01-11 Thread Stef Mientki
Bruno Desthuilliers wrote: > stef a écrit : >> >>> >>> Change a=1 to amodule.a=1 >>> If you find yourself doing tricks with the module globals, think >>> about redesigning your application. >>> >> Of course I completely agree with you. >> >> But ... >> if you're moving from MatLab to Python, >> an

Re: globals accros modules

2007-01-11 Thread Stef Mientki
Bruno Desthuilliers wrote: > stef a écrit : >> >>> >>> Change a=1 to amodule.a=1 >>> If you find yourself doing tricks with the module globals, think >>> about redesigning your application. >>> >> Of course I completely agree with you. >> >> But ... >> if you're moving from MatLab to Python, >> an

Re: dynamic library loading, missing symbols

2007-01-11 Thread [EMAIL PROTECTED]
On Jan 11, 3:40 am, "Ames Andreas" <[EMAIL PROTECTED]> wrote: > Have you already checked the output of LD_DEBUG=all or sth. like that? Yes, that is how I initially knew that my libraries were not even being processed when the linker tried to bind the symbol. On Jan 10, 5:01 pm, "Martin v. Löwis

Is there a good example on instantiating, calling, using, an API from Python on Windows?

2007-01-11 Thread kj7ny
Is there a good example on instantiating, calling, using, etc., an API from Python? I need to use Python to talk to another system through that system's API's on Windows XP. Can you point me to documentation and/or a good example of Python using 3rd party API's? (Preferably a good example rather

Re: subclassing a module: misleading(?) error message

2007-01-11 Thread ej
Carl Banks wrote: A good explanation I have not been able to get back to news lately - lot going on, but thank you for your time to explain that to me. It mostly makes pretty good sense to me, but I will have to study metaclasses further. ;) Thanks, -ej -- http://mail.python.org/mailman/list

RotatingFileHandler + subprocess module problems

2007-01-11 Thread Stephen Hansen
Hey, there. I'm currently having a problem with what *looks* like an interaction between using subprocess and RotatingFileHandler. This is on Windows with Python 2.3 I have two console applications: app1 and app2. For most of app2 to function properly, app1 must already be running. App1 logs

Re: Fixed keys() mapping

2007-01-11 Thread Neil Cerutti
On 2007-01-11, George Sakkis <[EMAIL PROTECTED]> wrote: > I wrote an 'fkdict' dict-like class for mappings with a fixed > set of keys but I'm wondering if there's a simpler way to go > about it. > > First off, the main motivation for it is to save memory in case > of many dicts with the same keys,

Re: Learning Python book, new edition?

2007-01-11 Thread Kent Johnson
Bjoern Schliessmann wrote: > Demel, Jeff wrote: > >> Does anyone know if there's a plan in the works for a new edition >> of Learning Python? The current edition (2nd) is a few years old >> and looks like it only covers Python 2.3. > > IIRC, differences to 2.4 are in it, too. No, it is one vers

Re: Learning Python book, new edition?

2007-01-11 Thread Daniel Klein
On Thu, 11 Jan 2007 18:11:06 +0100, Bjoern Schliessmann <[EMAIL PROTECTED]> wrote: >Demel, Jeff wrote: > >> Does anyone know if there's a plan in the works for a new edition >> of Learning Python? The current edition (2nd) is a few years old >> and looks like it only covers Python 2.3. > >IIRC, d

passing a variable to an external program

2007-01-11 Thread Rich
I want to run an external program using os.system() but I want to include a variable in the middle of the command line. An example of the type of thing I want to be able to do: pathname = os.path.dirname(sys.argv[0]) os.system('cscript /nologo ' + pathname + '\test.vbs') When I run this, everythi

Re: what is the idiom for copy lots of params into self?

2007-01-11 Thread Emin
Thanks, that looks like what I wanted. On Jan 11, 8:36 am, "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > "Emin" <[EMAIL PROTECTED]> wrote: > > What made me ask the question in my original post was not so much that > > I had to loop over the names I wanted to save, but whether it's okay to > > mess

Re: passing a variable to an external program

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Rich <[EMAIL PROTECTED]> wrote: > I want to run an external program using os.system() but I want to > include a variable in the middle of the command line. > > An example of the type of thing I want to be able to do: > pathname = os.path.dirname(sys.argv[0]) > os.system('cscript /nol

Re: passing a variable to an external program

2007-01-11 Thread Rich
Thank you, that did it. I don't know why I didn't think to escape the \ with \\. On Jan 11, 2:18 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-01-11, Rich <[EMAIL PROTECTED]> wrote: > > > I want to run an external program using os.system() but I want to > > include a variable in the middl

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-11 Thread nagle
That's a problem for me. I need short timeouts; I'm accessing sites that might or might not have SSL support, and I need to quickly time out when there's no SSL server. PyOpenSSL handles timeout correctly, but M2Crypto does not. On the other hand, M2Crypto actually checks certificates, which

py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
I'm at the end of my limited experience... I'm using py2exe to create an executable. I'm using bundle level 1. When I don't use the zipfile option, the executable and library.zip get created and the executable works correctly. When I add the zipfile=None option to put everything into the exe, the

Rational Numbers

2007-01-11 Thread Noud Aldenhoven
Hello, When I was programming in a mathematical project I began to wonder if python supports rational numbers[1]. In a language like magma[2] it's not such a problem. Does python supports something simular? Greetings, Noud Aldenhoven -- <:3 )~ [1] http://en.wikipedia.org/wiki/Rational_number

Need better run/edit method. I have to restart the shell after every script change.

2007-01-11 Thread Mark
Hello, What I need to know is if there is a better method to run/edit modules on my pc. I'm currently running the IDLE shell under Python 2.5, on Windows XP. Every time I edit my .txt or .py file, I have to restart the IDLE shell for the changes to take effect. It's pretty annoying. Assuming IDLE

Re: Need better run/edit method. I have to restart the shell after every script change.

2007-01-11 Thread Stef Mientki
> As you can see, I'm wasting a lot of time with this method. Maybe > there is some better sofware available, or maybe I'm just not utilizing > the tools at my disposal. Either way I would greatly appreciate any > insight into this problem. > why not try a more advanced IDE, like PyScripter ?

Re: Need better run/edit method. I have to restart the shell after every script change.

2007-01-11 Thread Brian Blais
Mark wrote: > I'm currently running the IDLE shell under Python 2.5, on Windows XP. > > Every time I edit my .txt or .py file, I have to restart the IDLE shell > for the changes to take effect. It's pretty annoying. Assuming IDLE is > already open, here are the steps that I typically take: > > 1.

Re: dot operations

2007-01-11 Thread Steven D'Aprano
On Thu, 11 Jan 2007 06:06:39 -0800, [EMAIL PROTECTED] wrote: >> [EMAIL PROTECTED] wrote: >> > Hi, >> > Frequently I get to do like this: >> > a = (1, 2, 3, 4) # some dummy values >> > b = (4, 3, 2, 1) >> > import operator >> > c = map(operator.add, a, b) >> > >> > I am finding the last line not v

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Thomas Heller
(I forgot to copy the list ;-) Tim schrieb: > > I'm at the end of my limited experience... > > > > I'm using py2exe to create an executable. I'm using bundle level 1. > > When I don't use the zipfile option, the executable and library.zip get > > created and the executable works correctly. > > >

Re: globals accros modules

2007-01-11 Thread Bruno Desthuilliers
Stef Mientki a écrit : > Bruno Desthuilliers wrote: > >> stef a écrit : (snip) >>> You can explain your collegaes, that >>> - the startindex of arrays changes from 1 to 0 >>> - slices are upto, instead of including the final border >>> - indention is thé key >>> And tell them about all beautiful t

Re: Learning Python book, new edition?

2007-01-11 Thread Robert Hicks
I would get "Core Python Programming" by Wesley Chun. It covers just about everything under the sun and includes version 2.5. Robert -- http://mail.python.org/mailman/listinfo/python-list

Re: os.popen() not executing command on windows xp

2007-01-11 Thread nic
It appears os.popen() doesn't like full windows paths with spaces (e.g. "c:/program files") so I'm going to use the subprocess module. -- http://mail.python.org/mailman/listinfo/python-list

Pythonic A*-Algorithm

2007-01-11 Thread Willi Richert
Hi, I'm looking for an A* implementation in Python (at least some wrapper around a C lib). So far I've only found http://arainyday.se/projects/python/AStar/ which looks not so promising. http://wiki.python.org/moin/PythonGraphApi lists all major available graph libraries in Python, hoping to f

RE: Learning Python book, new edition?

2007-01-11 Thread johnf
Demel, Jeff wrote: > This email is intended only for the individual or entity to which it is > addressed.  This email may contain information that is privileged, > confidential or otherwise protected from disclosure. Dissemination, > distribution or copying of this e-mail or any attachments by any

Re: Rational Numbers

2007-01-11 Thread Facundo Batista
Noud Aldenhoven wrote: > When I was programming in a mathematical project I began to wonder if python > supports rational numbers[1]. In a language like magma[2] it's not such a > problem. Does python supports something simular? Python does not have rational numbers. There's a (rejected) PEP ab

Python nuube needs Unicode help

2007-01-11 Thread gheissenberger
HELP! Guy who was here before me wrote a script to parse files in Python. Includes line: print u where u is a line from a file we are parsing. However, we have started recieving data from Brazil. If I open file to parse in VI, looks like: http://mail.python.org/mailman/listinfo/python-list

Python nuube needs Unicode help

2007-01-11 Thread gheissenberger
HELP! Guy who was here before me wrote a script to parse files in Python. Includes line: print u where u is a line from a file we are parsing. However, we have started recieving data from Brazil. If I open file to parse in VI, looks like: http://mail.python.org/mailman/listinfo/python-list

RE: Learning Python book, new edition?

2007-01-11 Thread Bjoern Schliessmann
Demel, Jeff wrote: > Björn replied: >>IIRC, differences to 2.4 are in it, too. > Interesting. The description I read said 2.3. That's good to > know. Whoops, I think it was Python Cookbook that has also remarks about 2.4. Learning Python is only about 2.3 as it seems. Regards, Björn -- B

Re: Portable Python - free portable development environment !

2007-01-11 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi there, > > I would like to announce the *first* beta release of the Portable > Python 1.0 beta. From today Portable Python website is also online and > you can find it on the location www.PortablePython.com. > > About: > Portable Python is a Python programming langua

Re: Pythonic A*-Algorithm

2007-01-11 Thread belinda thom
Willi, Maybe you could use something from the Python AIMA code? http:// aima.cs.berkeley.edu/code.html On Jan 11, 2007, at 1:01 PM, Willi Richert wrote: > Hi, > > I'm looking for an A* implementation in Python (at least some > wrapper around a > C lib). So far I've only found http://arainyday

How to modify object attribute by python C API

2007-01-11 Thread Huayang Xia
I get a python object by running a class' constructor. Then I need to modify the instance's attribute just like obj.attr1.attr2 = 'a' if in python's term. PyObject* py_obj_attr1 = PyObject_GetAttrString(obj, "attr1"); PyObject_SetAttrString(py_obj_attr1, "attr2", PyString_FromString("a"));

Best FCGI handler

2007-01-11 Thread Geoff
Hi! Does anyone have any recommendations for FGCI interfaces for python? For example jonpy? Thanks, Geoff -- http://mail.python.org/mailman/listinfo/python-list

Re: Python nuube needs Unicode help

2007-01-11 Thread Chris Mellon
On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > HELP! > Guy who was here before me wrote a script to parse files in Python. > > Includes line: > print u > where u is a line from a file we are parsing. > However, we have started recieving data from Brazil. If I open fil

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
Thomas Heller wote: [..] > Tim schrieb: [...] > > > File "...boot_common.py" ... no module name linecache > > > File " ... no module named zipextimporter > > > File "my.py" ... no module name optparse [...] > Another tip: You can examine what is in the zipfile, or the exe (if using > zipfile=None)

Re: IDLE Python and Environment Variables

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 11:45, Tristan wrote: I considered to use it, thanks!! Incidentally (beg your pardon if it sounds to ignorance), can I define Environment variables in a config file and then apply to my python program? Yes, read them from the config file and then use os.environ['name']=v

Re: Rational Numbers

2007-01-11 Thread Noud Aldenhoven
On 1/11/07, Facundo Batista <[EMAIL PROTECTED]> wrote: Python does not have rational numbers. Ah, oke. Thank you, it seems I have enough information why they aren't included in the core. Question: Why do you say that it's a problem? Well... Perhaps I word it wrong. It's not really a proble

Re: globals accros modules

2007-01-11 Thread Stef Mientki
Bruno Desthuilliers wrote: > Stef Mientki a écrit : >> Bruno Desthuilliers wrote: >> >>> stef a écrit : > (snip) You can explain your collegaes, that - the startindex of arrays changes from 1 to 0 - slices are upto, instead of including the final border - indention is thé key >>

Matching Directory Names and Grouping Them

2007-01-11 Thread J
Hello Group- I have limited programming experience, but I'm looking for a generic way to search through a root directory for subdirectories with similar names, organize and group them by matching their subdirectory path, and then output their full paths into a text file. For example, the contents

Intellectual Property Talk at PyCon

2007-01-11 Thread VanL
I will be presenting a talk at PyCon, "The Absolute Minimum an Open Source Developer Needs to Know About Intellectual Property." I want to tailor this talk so that it is interesting to as many attendees as possible. I am familiar with a lot of the internal divisions in the Free Software/Open S

How much slower is dict indexing vs. list indexing?

2007-01-11 Thread Emin
Dear Experts, How much slower is dict indexing vs. list indexing (or indexing into a numpy array)? I realize that looking up a value in a dict should be constant time, but does anyone have a sense of what the overhead will be in doing a dict lookup vs. indexing into a list? Some ad hoc tests I've

Re: globals accros modules

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 11:55, stef wrote: >Of course I completely agree with you. > >But ... >if you're moving from MatLab to Python, >and want to show your collegaes, >with how little effort they can reuse all their existing MatLab routines >in Python, >then the global issue is a real pain !! > >Y

Re: Matching Directory Names and Grouping Them

2007-01-11 Thread Steve Holden
J wrote: > Hello Group- > > I have limited programming experience, but I'm looking for a generic > way to search through a root directory for subdirectories with similar > names, organize and group them by matching their subdirectory path, and > then output their full paths into a text file. For e

Re: injecting functions into a python sandbox within a python program

2007-01-11 Thread Graham Menhennitt
Bruno Desthuilliers wrote: > If all your helper functions are really methods of the Interface > instance, you may try this instead (NB : not tested): > > glob = { > 'i': i, > 'f1': i.whatever, > } > exec script in glob Bruno, Thanks for replying. Some of the functions are as simple a

Embedding Python with Tkinter

2007-01-11 Thread Ivan Johansen
I have written a Windows GUI application in C++ and I would like to embed Python into the application to enable users to write plugins. The problem is when the plugin tries to use Tkinter. Tkinter creates its own root window, which I remove by calling: root = Tk() root.withdraw() But when I cre

Re: How much slower is dict indexing vs. list indexing?

2007-01-11 Thread Steve Holden
Emin wrote: > Dear Experts, > > How much slower is dict indexing vs. list indexing (or indexing into a > numpy array)? I realize that looking up a value in a dict should be > constant time, but does anyone have a sense of what the overhead will > be in doing a dict lookup vs. indexing into a list?

Re: Summarizing data by week

2007-01-11 Thread M.-A. Lemburg
On 2007-01-09 20:57, Mike Orr wrote: > What's the best way to summarize data by week? I have a set of > timestamped records, and I want a report with one row for each week in > the time period, including zero rows if there are weeks with no > activity. I was planning to use ISO weeks because date

Re: globals accros modules

2007-01-11 Thread Steve Holden
stef wrote: >> Change a=1 to amodule.a=1 >> If you find yourself doing tricks with the module globals, think about >> redesigning your application. >> > Of course I completely agree with you. > > But ... > if you're moving from MatLab to Python, > and want to show your collegaes, > with how littl

Re: globals accros modules

2007-01-11 Thread Robert Kern
Stef Mientki wrote: > Bruno Desthuilliers wrote: >> Unless you clearly explain the benefits... Any code relying on the >> existence of a global is: >> 1/ dependent on the existence of this global >> 2/ harder to understand > And you think physicians will believe that ? > And suppose they believe

Re: Rational Numbers

2007-01-11 Thread Robert Kern
Noud Aldenhoven wrote: > I'm a mathematician (in learning, with a bad feeling for English) and > don't trust irrational numbers in programming languages. You may want to look at SAGE. It provides a ton of good mathematical code. http://sage.scipy.org/sage/ -- Robert Kern "I have come to bel

Re: Python nuube needs Unicode help

2007-01-11 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > HELP! > Guy who was here before me wrote a script to parse files in Python. > > Includes line: > print u > where u is a line from a file we are parsing. > However, we have started recieving data from Brazil. If I open file to > parse in VI, looks like: > > audio="313

Re: Intellectual Property Talk at PyCon

2007-01-11 Thread Robert Kern
VanL wrote: > - What it means to incorporate GPL'd modules into your own code I don't have any suggestions for other material to cover, but I'd like to express my interest in keeping this in your agenda. This is an issue that crops up again and again with ill-informed opinions all around. Of cour

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-11 Thread Heikki Toivonen
[EMAIL PROTECTED] wrote: > That's a problem for me. I need short timeouts; I'm accessing sites > that might or might not have SSL support, and I need to quickly time > out when there's no SSL server. You should be able to do short timeouts, just not using the global setdefaulttimeout. Have you

Re: Newbie question: SMTP -> SQL Server

2007-01-11 Thread Larry Bates
Steve Holden wrote: > jrpfinch wrote: >> Thank you. I have just realised I completely misunderstand how SMTP >> servers work. From what I can tell, when you run the cookbook script >> it listens locally on port 8025. >> >> You then have to configure a Linux (in my case) account with a username >>

Re: Is there a good example on instantiating, calling, using, an API from Python on Windows?

2007-01-11 Thread Larry Bates
kj7ny wrote: > Is there a good example on instantiating, calling, using, etc., an API > from Python? > > I need to use Python to talk to another system through that system's > API's on Windows XP. > > Can you point me to documentation and/or a good example of Python using > 3rd party API's? (Prefer

Re: Matching Directory Names and Grouping Them

2007-01-11 Thread J
Steve- Thanks for the reply. I think what I'm trying to say by similar is pattern matching. Essentially, walking through a directory tree starting at a specified root folder, and returning a list of all folders that matches a pattern, in this case, a folder name containing a four digit number repr

RE: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim Wise
I clean before a compile. The exe contains all the modules (pyc) listed in the trace back message (linecache, zipextimporter, and optparse), except boot_common.py. Should that be in the exe? I'm trying to build on Windows XP using Python 2.4.4 and py2exe 0.6.5 Thanks. -- Tim Wise -Original

Re: Parallel Python

2007-01-11 Thread parallelpython
sturlamolden wrote: > [EMAIL PROTECTED] wrote: > > >That's right. ppsmp starts multiple interpreters in separate > > processes and organize communication between them through IPC. > > Thus you are basically reinventing MPI. > > http://mpi4py.scipy.org/ > http://en.wikipedia.org/wiki/Message_Pas

Re: Python nuube needs Unicode help

2007-01-11 Thread [EMAIL PROTECTED]
Progress! You managed to change the error message. File "./acc_test_script_generator.py", line 106, in loadData print u.encode('utf-8') AttributeError: Utterance instance has no attribute 'encode' I'm missing somethign really obvious here, but I don't know what it is... Diez B. Roggisch

Re: Python nuube needs Unicode help

2007-01-11 Thread [EMAIL PROTECTED]
Yeah, that's what i don't know how to do. Chris Mellon wrote: > On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > HELP! > > Guy who was here before me wrote a script to parse files in Python. > > > > Includes line: > > print u > > where u is a line from a file we ar

Re: Intellectual Property Talk at PyCon

2007-01-11 Thread VanL
Robert Kern wrote: > I don't have any suggestions for other material to cover, but I'd like to > express my interest in keeping this in your agenda. This is an issue that > crops > up again and again with ill-informed opinions all around. Thanks for the feedback. +1 for discussing GPL incorpor

Re: Rational Numbers

2007-01-11 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Facundo Batista <[EMAIL PROTECTED]> writes: |> Noud Aldenhoven wrote: |> |> > When I was programming in a mathematical project I began to wonder if python |> > supports rational numbers[1]. In a language like magma[2] it's not such a |> > problem. Does python supp

Re: py2exe: zipfile=None raised ImportError

2007-01-11 Thread Tim
I see the py2exe mail list posts to this group... I think I have a handle on the problem: After I build the exe, I rename it. The renamed exe is the one that raises the error. The original exe works fine. -- Tim -- http://mail.python.org/mailman/listinfo/python-list

Tools Designing large/complicated applications

2007-01-11 Thread Carl J. Van Arsdall
For those of you that work on larger applications but still code in python... do your development teams use any tools to facilitate the design? (i'm not asking about editors here, i'm really asking about software design tools) Are these the same tools you would use to help engineer software in

Re: os.popen() not executing command on windows xp

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 14:09, nic wrote: import os pstr = r'"c:\Program Files\Grisoft\AVG Free\avgscan.exe" "c:\program files\temp1\test1.txt"' a = os.popen(pstr) print a.read() I've confirmed the string I'm inputting to os.popen is EXACTLY the same as the one I can successfully execute manually

Re: Matching Directory Names and Grouping Them

2007-01-11 Thread Virgil Dupras
>From your example, if you want to group every path that has the same last 9 characters, a simple solution could be something like: groups = {} for path in paths: group = groups.setdefault(path[-9:],[]) group.append(path) I didn't actually test it, there ight be syntax errors. J wrote: >

Re: Parallel Python

2007-01-11 Thread parallelpython
> > Thus there are different levels of parallelization: > > 1 file/database based; multiple batch jobs > 2 Message Passing, IPC, RPC, ... > 3 Object Sharing > 4 Sharing of global data space (Threads) > 5 Local parallelism / Vector computing, MMX, 3DNow,... > > There are good reasons for all of thes

Re: Fixed keys() mapping

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 14:19, George Sakkis wrote: The implementation I came up with goes like this: each fkdict instance stores only the values as a list in self._values. The keys and the mapping of keys to indices are stored in a dynamically generated subclass of fkdict, so that self._keys and

Re: Fixed keys() mapping

2007-01-11 Thread George Sakkis
For what it's worth, I added it to the Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/499373 George -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a good example on instantiating, calling, using, an API from Python on Windows?

2007-01-11 Thread kj7ny
To be more exact, I am trying to use Python to talk to a Livelink system (http://www.opentext.com/) through their LAPI interface (.dll's, I think). I'll see if I can generate a more intelligent answer to your question, but for now, I'm far enough in the dark that this is as good as I can get. Tha

Re: PDF rendering toolkit?

2007-01-11 Thread Joshua J. Kugler
Jorge Vargas wrote: > On 1/6/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: >> > I'm looking for a tool to take an actual .pdf file and display it in a >> > window (I'm using wxwidgets at the moment) >> >> No idea if there is a one-shot-kills-them-all solution out there - but >> if you have a way

Re: Doing date/time + TZ math in python

2007-01-11 Thread Joshua J. Kugler
[EMAIL PROTECTED] wrote: >> The problem is, how do I create a datetime object and tell it that it's >> America/Anchorage *daylight savings time* instead of whatever the system >> is >> currently set at? pytz only has America/Anchorage, and I saw no way to >> tell it explicitly that the timezone i

Re: Parallel Python

2007-01-11 Thread jairodsl
Hi, You guys forgot pyMPI, http://pympi.sourceforge.net/ It works fine !!! A little hard installation and configuration but finally works !!! Cordially, Jairo Serrano Bucaramanga, Colombia [EMAIL PROTECTED] wrote: > > > > Thus there are different levels of parallelization: > > > > 1 file/datab

Re: os.popen() not executing command on windows xp

2007-01-11 Thread Collin Stocks
I have no clue what is wrong. If all else fails, use os.system() instead of os.popen(). Pipes tend not to always work in windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: RotatingFileHandler + subprocess module problems

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 15:59, Stephen Hansen wrote: If I run app1, and then app2, it all works fine. Specifically, the apps are logging correctly and I can see with Process Explorer that each has a handle to the appropriate files. However, I have a setting to make App2 run App1 in the backgrou

Re: Universal Feed Parser - How do I keep attributes?

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 12:01, Max Erickson wrote: Gabriel Genellina <[EMAIL PROTECTED]> wrote: > At Wednesday 10/1/2007 14:38, [EMAIL PROTECTED] wrote: > >> >>> d = >> >>> feedparser.parse('http://weather.yahooapis.com/forecastrss?p= > 94089') >> >>> d.feed.yweather_location >>u'' > > You have t

Re: dot operations

2007-01-11 Thread Dan Bishop
On Jan 11, 10:21 am, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > On Thursday, Jan 11th 2007 at 11:41 +0100, quoth robert: > > =>[EMAIL PROTECTED] wrote:=>> Hi, > =>> Frequently I get to do like this: > =>> a = (1, 2, 3, 4) # some dummy values > =>> b = (4, 3, 2, 1) > =>> import operator > =>> c =

Re: Python nuube needs Unicode help

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 18:27, [EMAIL PROTECTED] wrote: >HELP! >Guy who was here before me wrote a script to parse files in Python. > >Includes line: >print u >where u is a line from a file we are parsing. >However, we have started recieving data from Brazil. If I open file to >parse in VI, looks li

Re: Python nuube needs Unicode help

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 20:42, [EMAIL PROTECTED] wrote: Progress! You managed to change the error message. File "./acc_test_script_generator.py", line 106, in loadData print u.encode('utf-8') AttributeError: Utterance instance has no attribute 'encode' I'm missing somethign really obviou

Re: How to modify object attribute by python C API

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 18:37, Huayang Xia wrote: I get a python object by running a class' constructor. Then I need to modify the instance's attribute just like obj.attr1.attr2 = 'a' if in python's term. PyObject* py_obj_attr1 = PyObject_GetAttrString(obj, "attr1"); PyObject_SetAttrStrin

Explanation about for loop

2007-01-11 Thread raghu
can any one help me explaining for loop and its execution and its syntax with a simple example. -- http://mail.python.org/mailman/listinfo/python-list

Re: Explanation about for loop

2007-01-11 Thread Amit Khemka
On 11 Jan 2007 20:48:19 -0800, raghu <[EMAIL PROTECTED]> wrote: > can any one help me explaining for loop and its execution and its > syntax with a simple example. Well Guido did that: http://docs.python.org/tut/node6.html#SECTION00620 -- Amit Khemka -- onyomo.com Home Page

Re: Explanation about for loop

2007-01-11 Thread Paul McGuire
"raghu" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > can any one help me explaining for loop and its execution and its > syntax with a simple example. > Bookmark this page: http://docs.python.org/ref/ref.html "for loop" reference page: http://docs.python.org/ref/for.html Bookmark

Re: Is there a way to protect a piece of critical code?

2007-01-11 Thread Hendrik van Rooyen
"Paul Rubin" wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> writes: > > am aware of Queue module - the same app uses it for something else. > > I dont like too many try -- excepts in the code - I find they confuse > > me when I try to read it later - and in this case

Re: Explanation about for loop

2007-01-11 Thread Gabriel Genellina
At Friday 12/1/2007 01:48, raghu wrote: can any one help me explaining for loop and its execution and its syntax with a simple example. This section of Dive Into Python explain for loops: http://diveintopython.org/file_handling/for_loops.html (And you could read the whole book too) -- Gabrie

Re: Is there a way to protect a piece of critical code?

2007-01-11 Thread Hendrik van Rooyen
"Paul Rubin" wrote: > Paul Rubin writes: > > def get_from_queue(queue): > >try: > > return queue.get(block=False) > >except Queue.Empty: > > return QUEUE_IS_EMPTY > > Alternatively: > > def get_f

Re: Urgent Openings with the World's Leading Software Company !!!

2007-01-11 Thread Hendrik van Rooyen
"Software Hiring" <[EMAIL PROTECTED]> wrote: > If you're interested in relocating to India for such a good > opportunity and be a part of the World's Best Software Company and if > you have good skill sets in: > > C, C++, C#, Java (for .Net Platform or Visual Studio) > > OR > > C, C++, Java,

Re: Announcement -- ZestyParser

2007-01-11 Thread Adam Atlas
Thanks for the responses; you're right, and I have now posted the examples online. I just released version 0.6.0, by the way, which has several worthwhile improvements and much better documentation. It also includes an example for parsing RDF Notation3, to demonstrate a parsing task a bit more comp

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Travis E. Oliphant
oyekomova wrote: > Thanks for your help. I compared the following code in NumPy with the > csvread in Matlab for a very large csv file. Matlab read the file in > 577 seconds. On the other hand, this code below kept running for over 2 > hours. Can this program be made more efficient? FYI - The csv f

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-11 Thread John Nagle
Heikki Toivonen wrote: > [EMAIL PROTECTED] wrote: > >> That's a problem for me. I need short timeouts; I'm accessing sites >>that might or might not have SSL support, and I need to quickly time >>out when there's no SSL server. > > > You should be able to do short timeouts, just not using the

Re: Is there a way to protect a piece of critical code?

2007-01-11 Thread Hendrik van Rooyen
"robert" <[EMAIL PROTECTED]> wrote: > pushing data objects through an inter-thread queue is a major source for trouble - as this thread shows again. > Everybody builds up a new protocol and worries about Empty/Full, Exception-handling/passing, None-Elements, ... > I've noticed that those troubles

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Travis E. Oliphant
oyekomova wrote: > Thanks for your help. I compared the following code in NumPy with the > csvread in Matlab for a very large csv file. Matlab read the file in > 577 seconds. On the other hand, this code below kept running for over 2 > hours. Can this program be made more efficient? FYI - The csv f

Re: Maths error

2007-01-11 Thread Hendrik van Rooyen
"Nick Maclaren" <[EMAIL PROTECTED]> wrote: > Yes, but that wasn't their point. It was that in (say) iterative > algorithms, the error builds up by a factor of the base at every step. > If it wasn't for the fact that errors build up, almost all programs > could ignore numerical analysis and still

Re: Newbie - converting csv files to arrays in NumPy - Matlab vs. Numpy comparison

2007-01-11 Thread Robert Kern
Travis E. Oliphant wrote: > If you use numpy.fromfile, you need to skip past the initial header row > yourself. Something like this: > > fid = open('somename.csv') # I think you also meant to include this line: header = fid.readline() > data = numpy.fromfile(fid, sep=',').reshape(-1,6) > # fo

Re: Wierd M2Crypto bug - phony "peer did not return certificate" error

2007-01-11 Thread John Nagle
OK, I have a one-line fix. To Connection.py of M2Crypto: def connect(self, addr): self.socket.connect(addr) self.addr = addr self.socket.settimeout(None) # Back to normal timeout (NEW) self.setup_ssl() self.set_connect_state() ret = self.connect_ssl() check =

Re: Python nuube needs Unicode help

2007-01-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Chris Mellon wrote: > On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > >> > audio="313-20070102144528.wav" grammarSet="G3" rawText="não" >> recValue="{data:CHOICE=NO;}" conf="970" rawText2="" conf2="0" >> transcribedText="não" parsableText="nã

Re: General Question About Python

2007-01-11 Thread Torabisu
billie wrote: > Torabisu wrote: > > > Its quite weird, we're looking for Python skills but are battling to > > find at the moment... Normally Python on its own will probably not > > land you a job, but the last two companies I've worked for are doing > > indepth Python development, so hopefully t

<    1   2   3   >