Re: unify els database

2007-07-03 Thread rbsharp
On Jul 2, 3:35 pm, luca72 <[EMAIL PROTECTED]> wrote: > Hello > > How i can use to connect to a unify els database with python > > Regards > > Luca Hello, could you be more specific. I know that there is a ODBC-Driver for unify, if this is an option then it might be easier. Or do you want to connec

Re: Correct abstraction for TK

2007-07-03 Thread Laurent Pointal
[EMAIL PROTECTED] a écrit : > I'm looking for a good example of how to correctly abstract TK code > from the rest of my program. I want to just get some user info and > then get 4 values from the GUI. Right now I've written it OOP per the > examples on python.org but it doesn't seem to be meshing v

Re: Python compilation ??

2007-07-03 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: > Absolutely. I should, of course, have said that only imported modules > have the results of the compilation stored as a .pyc file. > > One must presume this is to save the file write time during development > when the program is almost always different

Re: Correct abstraction for TK

2007-07-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > I'm looking for a good example of how to correctly abstract TK code > from the rest of my program. I want to just get some user info and > then get 4 values from the GUI. Right now I've written it OOP per the > examples on python.org but it doesn't seem to be meshing ver

Re: Probably simple syntax error

2007-07-03 Thread Duncan Booth
ptn <[EMAIL PROTECTED]> wrote: > PASCAL -->PYTHON > 5 div 2 --> 5/2 better: 5//2 The behaviour of 5/2 varies according to command line options and/or __future__ imports. e.g. If you start Python with the -Qwarn option 5/2 will generate a warning; if you start P

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Paul Rubin
[EMAIL PROTECTED] writes: > As for the primacy of UTC vs. TAI, this is the classical chicken and > egg problem. The bureaucratic reality is opposed to the physical > reality. Well, if you're trying to pick just one timestamp standard, I'd say you're better off using a worldwide one rather than a

Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : > Hi, > > I m sorry but I m bored at work (and no ones looking so I can write > some Python) and following a job advertisement post,I decided to write > the code to do its for the one entitled Ninjas or something like that. > I was wondering what could be done to my follo

Re: Python compilation ??

2007-07-03 Thread Bruno Desthuilliers
Evan Klitzke a écrit : > On 7/2/07, Cathy Murphy <[EMAIL PROTECTED]> wrote: >> Is python a compiler language or interpreted language. If it is >> interpreter >> , then why do we have to compile it? > > It's an interpreted language. It is compiled into bytecode By this definition, Java is an int

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Richard Heathfield
Paul Rubin said: > [EMAIL PROTECTED] writes: >> As for the primacy of UTC vs. TAI, this is the classical chicken and >> egg problem. The bureaucratic reality is opposed to the physical >> reality. > > Well, if you're trying to pick just one timestamp standard, I'd say > you're better off using a

DatePart From String

2007-07-03 Thread Robert Rawlins - Think Blue
Hello Guys, I have a date/time as a string which looks like this: 2007-02-01 00:00:00 I'm trying to get my hands on the different date parts of that string in the following formats: Time Only: 00:00:00 Day As Number: 01 Month As Number: 02 Day As Word: Monday I've tried using the

Re: try/finally in threads

2007-07-03 Thread Diez B. Roggisch
George Sakkis wrote: > I posted this on the Pyro list but I'm not sure if it's related > specifically to Pyro. The "finally" clause below is not executed when > f() runs on on a (daemon) thread and the program exits. DAEMON here is > a global Pyro.code.Daemon instance. > > def f(): >try: DAEM

Re: need help with win32com

2007-07-03 Thread Graeme Glass
On Jul 2, 6:38 pm, Thomas <[EMAIL PROTECTED]> wrote: > I want to be able to access an excel file and extract the code from > the macro that is in the file. How can I do this? > > -- > ~Thomas~ http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/483742 -- http://mail.python.org/mailman/listi

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-07-03 Thread Jorgen Grahn
On Fri, 29 Jun 2007 21:15:00 -0600, William Heymann <[EMAIL PROTECTED]> wrote: > On Friday 29 June 2007, Martin v. Löwis wrote: >> > There was no need for me to use 64 so I have switched back to 32 and >> > works fine. >> > >> > Python is not ready for the 64 world yet ;) >> >> It's a matter of sta

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
HI, Thanks to everyone for your comments ( i never knew "with" existed, but to quote Borat "I like", unfortunately I cant apply for the job as i m in the UK and dont have the experience but hey 10 minutes of programming python beats 12 hours of programming in Clipper-derived unreadable drivel (you

Python IRC bot using Twisted

2007-07-03 Thread ddtm
I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ words/documentation/examples/ircLogBot.py) to create my own bot. But I have a problem. I'm trying to make my bot send messages periodically. But I can't find a way of adding Timer or something similar to my code so that it could wo

Python 2.5 from source without tcl/tk

2007-07-03 Thread Florian Demmer
Hi, I am going nuts here... I thought had a solution for this a few weekas ago but my hdd crashed and i put the note i wrote somewhere I had no backup. The system is a RedHat Enterprise 4 and I cannot install additional rpms. While the ./configure seems to go through fine I get a "INFO: Can't loc

Re: DatePart From String

2007-07-03 Thread Dave
Robert Rawlins - Think Blue thinkbluemedia.co.uk> writes: > I’ve tried using the time.strptime() function without much success so > thought I’d come and ask your advice. > How exactly does it not work?? This works for me: from time import mktime, strptime from datetime import datetime dateti

Re: Bug in Python class static variable?

2007-07-03 Thread Bruza
On Jul 2, 1:21 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > Bruza <[EMAIL PROTECTED]> wrote: > > On Jul 2, 3:52 am, Duncan Booth <[EMAIL PROTECTED]> wrote: > >> Bruza <[EMAIL PROTECTED]> wrote: > >> > I am trying to define a class static variable. But the value of the > >> > static variable seems

15 Exercises to Know A Programming Language

2007-07-03 Thread Martin
I am trying to improve my Python skills through some exercises. Currently I am working on Larry's "15 exercises to know a programming language " (http://www.knowing.net/ PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx). The first exercise is this: "Write a program that takes as its first

Re: need help with win32com

2007-07-03 Thread John Machin
On Jul 3, 7:06 pm, Graeme Glass <[EMAIL PROTECTED]> wrote: > On Jul 2, 6:38 pm, Thomas <[EMAIL PROTECTED]> wrote: > > > I want to be able to access an excel file and extract the code from > > the macro that is in the file. How can I do this? > > > -- > > ~Thomas~ > > http://aspn.activestate.com/AS

Python and ARexx (was Re: Tiny/small/minimalist Python?)

2007-07-03 Thread Jorgen Grahn
On Tue, 03 Jul 2007 05:25:28 GMT, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 02:26:43 +0200, Irmen de Jong > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> Back in the days my port of Python to the Commodore Amiga machine ran >> quite comfortably on a

Freeze and problem with shared libraries

2007-07-03 Thread [EMAIL PROTECTED]
I am trying to use freeze to create a single binary executable for one of my program. When I run freeze, it runs fine with the following modules. These modules are available in the dyn-load directory and I can import them from the python interpreter. Warning: unknown modules remain: _bisect _heapq

A new data structrue in python: Tree

2007-07-03 Thread Roc Zhou
Recently I tried to create a new data structure in python: Tree, by operator overloading. I want it can act as a builtin type, such as list and dict. Luckily the basic definition has been finished now, the document is in the code and unittest. And I have put the HTML doc at: http://crablfs.source

restructuredtext latin1 encoding (FAQ?)

2007-07-03 Thread Helmut Jarausch
Hi, I did try to find something on the net but I couldn't find anything useful. Is there a way to write documents with the reST tools using the Latin1 encoding? Many thanks for a hint, Helmut Jarausch Lehrstuhl fuer Numerische Mathematik RWTH - Aachen University D 52056 Aachen, Germany -- htt

Re: restructuredtext latin1 encoding (FAQ?)

2007-07-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Jul 2007 12:12:04 +0200, Helmut Jarausch wrote: > Is there a way to write documents with the reST tools using the Latin1 > encoding? Yes of course there is. Just write the documents in Latin-1 encoding. Take a look at the charset command line options if Latin-1 is not the default enc

Re: 15 Exercises to Know A Programming Language

2007-07-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Jul 2007 09:58:16 +, Martin wrote: > "Write a program that takes as its first argument one of the words > 'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a > series of numbers. The program applies the appropriate function to > the series." > > My solution so far is t

RE: DatePart From String

2007-07-03 Thread Robert Rawlins - Think Blue
Hello Dave, Thanks for getting back to me, I had been trying to use it like this: time.strptime('2007-01-01 00:00:00','%H:%M:%S') I was getting an error thrown at me: ValueError: time data did not match format: data=2007-01-01 00:00:00 fmt=%H:%M:%S I see how your solution works, but I'm hopi

Re: restructuredtext latin1 encoding (FAQ?)

2007-07-03 Thread Helmut Jarausch
Marc 'BlackJack' Rintsch wrote: > On Tue, 03 Jul 2007 12:12:04 +0200, Helmut Jarausch wrote: > >> Is there a way to write documents with the reST tools using the Latin1 >> encoding? > > Yes of course there is. Just write the documents in Latin-1 encoding. > Take a look at the charset command li

newbie-question

2007-07-03 Thread TK
Hi, how can I implement a socket timeout? Thanx for help. o-o THomas -- http://mail.python.org/mailman/listinfo/python-list

Re: 15 Exercises to Know A Programming Language

2007-07-03 Thread Martin
On Jul 3, 12:25 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 09:58:16 +, Martin wrote: > > "Write a program that takes as its first argument one of the words > > 'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a > > series of numbers. The program

Re: newbie-question

2007-07-03 Thread Bjoern Schliessmann
TK wrote: > how can I implement a socket timeout? What exactly do you mean by "socket timeout"? Which OS? > Thanx for help. Thanks for choosing an adequate subject next time. Regards, Björn -- BOFH excuse #84: Someone is standing on the ethernet cable, causing a kink in the cable -- htt

Re: newbie-question

2007-07-03 Thread Stargaming
TK wrote: > how can I implement a socket timeout? Risking an inadequate answer (since your description was not that detailled, try to express a little more exact!), I can suggest http://starship.python.net/crew/theller/pyhelp.cgi to browse the documentation. If you enter "timeout", the first ma

Re: 15 Exercises to Know A Programming Language

2007-07-03 Thread Daniel Nogradi
> > > "Write a program that takes as its first argument one of the words > > > 'sum,' 'product,' 'mean,' or 'sqrt' and for further arguments a > > > series of numbers. The program applies the appropriate function to > > > the series." > > > > > My solution so far is this: > > > > >http://dpaste.co

Re: Programming Idiomatic Code

2007-07-03 Thread Bruno Desthuilliers
Nathan Harmston a écrit : > HI, (snip) > I have one question though: > > Using a module global for this kind of data is usually a bad idea > (except eventually for run-once throw-away scripts, and even then...) > > Why is this a bad idea? Don't you have any idea ? -- http://mail.python.org/mail

Re: 15 Exercises to Know A Programming Language

2007-07-03 Thread John Machin
On Jul 3, 7:58 pm, Martin <[EMAIL PROTECTED]> wrote: > I am trying to improve my Python skills through some exercises. > Currently I am working on Larry's "15 exercises to know a programming > language " (http://www.knowing.net/ > PermaLink,guid,f3b9ba36-848e-43f8-9caa-232ec216192d.aspx). The first

Re: PEP 3107 and stronger typing (note: probably a newbie question)

2007-07-03 Thread Roy Smith
[EMAIL PROTECTED] (Alex Martelli) wrote: > Eckel's and Martin's well-known essays on why good testing can replace > strict static type checking: > > I've read the first before. I just re-read it. T

Re: good matlab interface

2007-07-03 Thread [EMAIL PROTECTED]
On Jul 2, 3:02 pm, Brian Blais <[EMAIL PROTECTED]> wrote: > On Jun 30, 2007, at 2:31 AM, felix seltzer wrote: > > > Does any one know of a good matlab interface? > > I would just use scipy or numpy, but i also need to use > > the matlab neural network functions. I have tried PyMat, but am > > havi

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 09:46:59 -, ddtm <[EMAIL PROTECTED]> wrote: >I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ >words/documentation/examples/ircLogBot.py) to create my own bot. But I >have a problem. I'm trying to make my bot send messages periodically. >But I can't find a

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Martin Gregorie
Peter J. Holzer wrote: > On 2007-07-03 05:12, Scott David Daniels <[EMAIL PROTECTED]> wrote: >> TOPS-20 did an interesting format which suggest an interesting variant: >> Tops-20: 36-bit (the machine word size) fixed-bit representation >>of days since a given moment (the first

Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Samuel
Hi, When using telnetlib, the connection sometimes breaks with the following error: "error: (32, 'Broken pipe')" where the traceback points to self.sock.send(buffer) in telnetlib.py. The problem is unreproducible, but happens fairly often (approx. 5% of the time). Any idea how to debug such a

what is wrong with that r"\"

2007-07-03 Thread alf
question without words: >>> r"\" File "", line 1 r"\" ^ SyntaxError: EOL while scanning single-quoted string >>> r"\ " '\\ ' -- http://mail.python.org/mailman/listinfo/python-list

Re: unify els database

2007-07-03 Thread luca72
Hello and thanks for your answer, the unify db is on unix-sco and i need to connect with linux machine with python Regards Luca -- http://mail.python.org/mailman/listinfo/python-list

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 05:12:22 -0700, Samuel <[EMAIL PROTECTED]> wrote: >Hi, > >When using telnetlib, the connection sometimes breaks with the >following error: > >"error: (32, 'Broken pipe')" > >where the traceback points to > >self.sock.send(buffer) > >in telnetlib.py. The problem is unreproducible

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Neil Cerutti
On 2007-07-02, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Jul 2, 3:56 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > from pyparsing import * It's always good when your messages start like that. ;) > """ > Ok, here is the step-by-step, beginning with your posted BNF. > (Based on your test cases,

connecting to serial port + python

2007-07-03 Thread Japan Shah
Hello, I am trying to connect my Nokia 6610 using usb cable, I have installed usb-serial driver of it. I hv tested it with Hyperterminal and it works fine. but when I wrote a python script I am not able to receive the responce from the device. import os import re import time import sys from th

Re: what is wrong with that r"\"

2007-07-03 Thread kyosohma
On Jul 3, 7:15 am, alf <[EMAIL PROTECTED]> wrote: > question without words: > > >>> r"\" >File "", line 1 > r"\" > ^ > SyntaxError: EOL while scanning single-quoted string > >>> r"\ " > '\\ ' One slash escapes the following character, so the proper way of writing it is either r

Re: what is wrong with that r"\"

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 06:16:43 -0700, [EMAIL PROTECTED] wrote: >On Jul 3, 7:15 am, alf <[EMAIL PROTECTED]> wrote: >> question without words: >> >> >>> r"\" >>File "", line 1 >> r"\" >> ^ >> SyntaxError: EOL while scanning single-quoted string >> >>> r"\ " >> '\\ ' > >One slash esca

Re: what is wrong with that r"\"

2007-07-03 Thread kyosohma
On Jul 3, 8:25 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 06:16:43 -0700, [EMAIL PROTECTED] wrote: > >On Jul 3, 7:15 am, alf <[EMAIL PROTECTED]> wrote: > >> question without words: > > >> >>> r"\" > >>File "", line 1 > >> r"\" > >> ^ > >> SyntaxError:

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Paul McGuire
Neil - >> The above shadows 'id'; I suppose 'ident' would be better. Doh! I found the id() shadowing later, changed my var to id_ so as not to stray from your BNF too much. >> How can I make it barf for testcases like '(+ 2 3))'? It doesn't >> seem to expect an Eof. To force parsing to the end of

mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
I'm trying to use urllib2 to download a page (I'd rather use urllib, but I need to change the User-Agent header to look like a browser or G**gle won't send it to me, the big meanies). The following (pinched from Dive Into Python) seems to work perfectly in Idle, but falls at the final hurdle when r

Re: Python IRC bot using Twisted

2007-07-03 Thread ddtm
On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 09:46:59 -, ddtm <[EMAIL PROTECTED]> wrote: > >I'm using an example of IRC bot (_ttp://twistedmatrix.com/projects/ > >words/documentation/examples/ircLogBot.py) to create my own bot. But I > >have a problem. I

Re: The file executing

2007-07-03 Thread Benjamin
On Jul 2, 9:47 pm, Justin Ezequiel <[EMAIL PROTECTED]> wrote: > On Jul 3, 9:40 am, Benjamin <[EMAIL PROTECTED]> wrote: > > > How does one get the path to the file currently executing (not the > > cwd). Thank you > > os.path.dirname(sys.argv[0]) The returns the file that was called first, but not th

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Peter J. Holzer
On 2007-07-03 08:57, Richard Heathfield <[EMAIL PROTECTED]> wrote: > Paul Rubin said: >> [EMAIL PROTECTED] writes: >>> As for the primacy of UTC vs. TAI, this is the classical chicken and >>> egg problem. The bureaucratic reality is opposed to the physical >>> reality. >> >> Well, if you're tryin

Re: what is wrong with that r"\"

2007-07-03 Thread Neil Cerutti
On 2007-07-03, alf <[EMAIL PROTECTED]> wrote: > question without words: > > >>> r"\" >File "", line 1 > r"\" > ^ > SyntaxError: EOL while scanning single-quoted string > >>> r"\ " > '\\ ' >From the Python Language Reference 2.4.1 String Literals: When an "r" or "R" prefix is p

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > [snip] > >Thank you very much! It's a very useful information. One more >question: can I cancel the DelayedCall using its ID (it is returned >from callLater(...)) f

Re: The file executing

2007-07-03 Thread Sebastian Wiesner
[ Benjamin <[EMAIL PROTECTED]> ] > On Jul 2, 9:47 pm, Justin Ezequiel <[EMAIL PROTECTED]> > > wrote: > > On Jul 3, 9:40 am, Benjamin <[EMAIL PROTECTED]> wrote: > > > How does one get the path to the file currently executing (not the > > > cwd). Thank you > > > > os.path.dirname(sys.argv[0]) > > The

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread Richard Heathfield
Peter J. Holzer said: > On 2007-07-03 08:57, Richard Heathfield <[EMAIL PROTECTED]> wrote: >> Paul Rubin said: >>> [EMAIL PROTECTED] writes: As for the primacy of UTC vs. TAI, this is the classical chicken and egg problem. The bureaucratic reality is opposed to the physical re

MySQL -->Python-->XML for JSviz

2007-07-03 Thread Picio
Hello all, I need some advice to choose an xml generator for jsviz a tool in javascript to create some wonderful graphs (SnowFlake or Force directed). Starting from a SQL table (mysql) I need to create a XML file with a structure like this:

Fwd: Infotech Enterprises Limited

2007-07-03 Thread Vivek Kumar
-- Forwarded message -- From: Mahendra <[EMAIL PROTECTED]> Date: Jul 3, 2007 5:17 PM Subject: Infotech Enterprises Limited To: [EMAIL PROTECTED] Hi Further to our discussions, We are looking for Python developers/ C++ who are willing to work in Hyderabad. Infotech Enterprises L

Re: Programming Idiomatic Code

2007-07-03 Thread Douglas Woodrow
On Tue, 3 Jul 2007 10:19:07, Nathan Harmston <[EMAIL PROTECTED]> wrote > >i m in the UK and dont have the experience but hey 10 minutes of >programming python beats 12 hours of programming in Clipper-derived >unreadable drivel (you dont know how much I appreciate Python atm). "Clipper-derived unr

Re: Correct abstraction for TK

2007-07-03 Thread Luke Hoersten
Thanks for all the suggestions guys. I'm realizing that I need to chose more of a specific paradigm. With closures, I was able to stay away from unneeded classes before but Tk brings it to a whole other level. Thanks again, Luke On Jul 3, 2:50 am, Paul Rubin wrote: > [E

Re: mysteries of urllib/urllib2

2007-07-03 Thread Ben Cartwright
On Jul 3, 9:43 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > The following (pinched > from Dive Into Python) seems to work perfectly in Idle, but falls at > the final hurdle when run as a cgi script - can anyone suggest > anything I may have overlooked? > > request = urllib2.Request(some_URL) > req

allow scripts to use .pth files?

2007-07-03 Thread Alan Isaac
Suppose I have a directory `scripts`. I'd like the scripts to have access to a package that is not "installed", i.e., it is not on sys.path. On this list, various people have described a variety of tricks they use, but nobody has proposed a pretty way to allow this. I am therefore assuming there i

Re: trouble with sqlite under debian etch

2007-07-03 Thread Gerhard Häring
Rustom Mody wrote: > I was trying to follow the sqlalchemy tutorial on my debian etch box > and got stuck with installation. Any help/pointers will be welcome. > > First after installing sqlalchemy needed some sqlite package > synaptic showed me packages python-pysqlite, python-pysqlite1.1 and >

POpen - Wait For Process To Complete

2007-07-03 Thread Robert Rawlins - Think Blue
Hello guys, Quite a simple one I'm hoping. I've got a process that I run using popen which writes to a file, I'm then going to read the file and parse its contents. However, getting the application to wait until the process is complete and finished writing before it reads and parses the file is

python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread [EMAIL PROTECTED]
Hi I'm considering learning Python...but with the python 3000 comming very soon, is it worth waiting for?? I know that the old style of coding python will run parallel with the new, but I mean, its going to come to an end eventually. What do you think?? Chris -- http://mail.python.org/mailman/li

Re: mysteries of urllib/urllib2

2007-07-03 Thread Adrian Smith
On Jul 3, 11:25 pm, Ben Cartwright <[EMAIL PROTECTED]> wrote: > On Jul 3, 9:43 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > The following (pinched > > from Dive Into Python) seems to work perfectly in Idle, but > > falls at the final hurdle when run as a cgi script - can > > anyone suggest any

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Daniel Nogradi
> Hi > I'm considering learning Python...but with the python 3000 comming > very soon, is it worth waiting for?? I know that the old style of > coding python will run parallel with the new, but I mean, its going to > come to an end eventually. > > What do you think?? > Chris 99% of what you would

error return without exception set

2007-07-03 Thread Will McGugan
Hi, Can anyone suggest a likely cause for the following exception... Exception exceptions.SystemError: 'error return without exception set' in ignored Thanks Will McGugan -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm considering learning Python...but with the python 3000 comming > very soon, is it worth waiting for?? I know that the old style of > coding python will run parallel with the new, but I mean, its going to > come to an end eventually. It will be ye

Re: mysteries of urllib/urllib2

2007-07-03 Thread Ben Cartwright
On Jul 3, 11:14 am, Adrian Smith <[EMAIL PROTECTED]> wrote: > > > The following (pinched > > > from Dive Into Python) seems to work perfectly in Idle, but > > > falls at the final hurdle when run as a cgi script > > Put this at the top of your cgi script: > > > import cgitb; cgitb.enable() Did you

Re: ebay

2007-07-03 Thread jim
On 6 20 , 11 20 , jim <[EMAIL PROTECTED]> wrote: > hello: madam and sir . we sell all kinds of laptops and digital > cam .our product is a quantity best, the price is the lowest in the > world, i think you will be interested in our product . thanks a lot! > Our Website:http://www.prs-123.com/Msn:

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 15:13:46 -, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >Hi >I'm considering learning Python...but with the python 3000 comming >very soon, is it worth waiting for?? I know that the old style of >coding python will run parallel with the new, but I mean, its going to >com

Re: Python IRC bot using Twisted

2007-07-03 Thread ddtm
On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: > >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > > [snip] > > >Thank you very much! It's a very useful information. One more > >question: can I c

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Samuel
On Jul 3, 3:03 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > EPIPE results when writing to a socket for which writing has been shutdown. > This most commonly occurs when the socket has closed. You need to handle > this exception, since you can't absolutely prevent the socket from being > cl

ANN: Leo 4.4.3.1 released

2007-07-03 Thread Edward K Ream
Leo 4.4.3.1 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.3.1: - Fixed a

Re: Python IRC bot using Twisted

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 15:51:30 -, ddtm <[EMAIL PROTECTED]> wrote: >On 3, 17:55, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Tue, 03 Jul 2007 13:44:34 -, ddtm <[EMAIL PROTECTED]> wrote: >> >On 3, 16:01, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> > [snip] >> >> >Thank yo

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Neil Cerutti
On 2007-07-03, Paul McGuire <[EMAIL PROTECTED]> wrote: > Here is my alternative solution (not using results names). I used > the base WAE class to accept the tokens as the initialization var, > then unpack the list into variables in each respective calc() > method. I did not see the need for a su

RE: MySQL -->Python-->XML for JSviz

2007-07-03 Thread Sells, Fred
Sometimes sneaky is better than elegant. You could shell down to a command line invocation of mysql and specify -xml as the output format. I'm not sure how close that format is to what you need or how much you could leverage views (if using mysql 5.0). You could also use a command line xslt proce

Re: Debugging "broken pipe" (in telnetlib)

2007-07-03 Thread Jean-Paul Calderone
On Tue, 03 Jul 2007 08:54:25 -0700, Samuel <[EMAIL PROTECTED]> wrote: >On Jul 3, 3:03 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> EPIPE results when writing to a socket for which writing has been shutdown. >> This most commonly occurs when the socket has closed. You need to handle >> thi

wxPython Cannot convert from the charset 'latin-1'

2007-07-03 Thread Helmut Jarausch
Hi, I'm trying to teach "dugui.py" (a tiny GUI for restructuredtext written in wxPython) to accept files in isolatin-1 encoding. It displays e.g. German umlauts correctly but then I get a popup window saying Python Error Cannot convert from the charset 'latin-1'! How can I find out where this

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Paul McGuire
On Jul 3, 11:08 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > C:\WINNT\system32\cmd.exe /c python wae.py > ** > File "wae.py", line 6, in __main__ > Failed example: > parse('(+ 3 45)') > Exception raised: > Traceback (mos

Re: mysteries of urllib/urllib2

2007-07-03 Thread John Nagle
Adrian Smith wrote: > I'm trying to use urllib2 to download a page (I'd rather use urllib, > but I need to change the User-Agent header to look like a browser or > G**gle won't send it to me, the big meanies). The following (pinched > from Dive Into Python) seems to work perfectly in Idle, but fall

Re: POpen - Wait For Process To Complete

2007-07-03 Thread Yongjian Xu
That's by using the P3/P4 classes not the function. the function does not provide wait() call, it simply does it for you by default. Jim On 7/3/07, Robert Rawlins - Think Blue <[EMAIL PROTECTED]> wrote: Hello guys, Quite a simple one I'm hoping. I've got a process that I run using popen whi

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Paul McGuire
By the way, the next release of pyparsing will allow you to shortcut all of these .setResultsName calls, using this notation instead: binop = ( LPAR + oneOf("+ -")('op') + wae('lhs') + wae('rhs') + RPAR ) with_ = ( LPAR + "with" + LPAR + id_('bound_i

Re: Portable general timestamp format, not 2038-limited

2007-07-03 Thread sla29970
On Jul 3, 1:10 am, Paul Rubin wrote: > Well, if you're trying to pick just one timestamp standard, I'd say > you're better off using a worldwide one rather than a national one, no > matter how the bureaucracies work. TAI is derived from atomic clocks > all over the world

python app to emulate terminal to dialup bulletin board

2007-07-03 Thread Sells, Fred
We need to automate the download of data that is now done manually via a terminal session to a dialup bulletin board. The user uses this to upload and download files. Hard to believe in this day and age, but true. I've tried google, but the terms are just too common; all I get is clutter. So I

PyObjC and Xcode

2007-07-03 Thread Horace Enea
I'm trying to use Python on a Mac running OSX 10.4.9. I installed Python 2.5 along with Idle. My problem is that Xcode no longer works with PyObjC. It gives an error message: ImportError: No module named PyObjCTools. I've down-loaded PyObjC and re-installed it along with PyObjCTools, but still

Re: Pretty Scheme, ??? Python

2007-07-03 Thread Neil Cerutti
On 2007-07-03, Paul McGuire <[EMAIL PROTECTED]> wrote: > 2. Change the parse actions to deref the 0'th element of t for > binop and with_. > > num.setParseAction(lambda t: Num(int(t.number))) > id_.setParseAction(lambda t: Id(t.name)) > binop.setParseAction(lambda t: BinOp(t[0].op, t[0].lhs, t[0].r

Re: allow scripts to use .pth files?

2007-07-03 Thread half . italian
On Jul 3, 7:35 am, Alan Isaac <[EMAIL PROTECTED]> wrote: > Suppose I have a directory `scripts`. > I'd like the scripts to have access to a package > that is not "installed", i.e., it is not on sys.path. > On this list, various people have described a variety > of tricks they use, but nobody has pr

Re: object references/memory access

2007-07-03 Thread John Nagle
dlomsak wrote: > Paul Rubin wrote: > >>dlomsak <[EMAIL PROTECTED]> writes: >> >>>knowledge of the topic to help. If the above are not possible but you >>>have a really good idea for zipping large amounts of data from one >>>program to another, I'd like to hear it. > Well, I was using the regular

Re: wxPython Cannot convert from the charset 'latin-1'

2007-07-03 Thread kyosohma
On Jul 3, 11:16 am, Helmut Jarausch <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to teach "dugui.py" (a tiny GUI for restructuredtext written in > wxPython) to accept files in isolatin-1 encoding. It displays e.g. German > umlauts correctly but then I get a popup window saying > Python Error >

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread M�ta-MCI
Hi! > Python 3000 doesn't include many significant changes to the language One exemple : non-Ascii characters in identifiers (= no significatif change?) Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: how to send files via bluetooth with python to a mobile

2007-07-03 Thread Drex
Hi, I tried the example from the site http://dev.zuckschwerdt.org/openobex/wiki/ObexFtpExampleClientPython but I am getting the following error: /home/daniel/projekty/_moje/python/send_txt_to_mobile.py Traceback (most recent call last): File "/home/daniel/projekty/_moje/python/send_txt_to_mobil

Re: object references/memory access

2007-07-03 Thread John Nagle
Steve Holden wrote: > Karthik Gurusamy wrote: > >> On Jul 1, 12:38 pm, dlomsak <[EMAIL PROTECTED]> wrote: > > [...] > >> >> I have found the stop-and-go between two processes on the same machine >> leads to very poor throughput. By stop-and-go, I mean the producer and >> consumer are constantly

Re: error return without exception set

2007-07-03 Thread Peter Otten
Will McGugan wrote: > Can anyone suggest a likely cause for the following exception... > > Exception exceptions.SystemError: 'error return without exception set' > in ignored The "Exception ... ignored" part is probably caused by an exception in a finally block during garbage collection: >>> d

Help building GUI with Tix

2007-07-03 Thread infidel
I am trying to build a GUI using the Tix module. What I want is a paned window with a tree in the left pane and a notebook in the right pane. I keep getting an error that I don't understand when adding these widgets to the panes: PythonWin 2.5.1 (r251:54863, May 1 2007, 17:47:05) [MSC v.1310 32

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> > Using a module global for this kind of data is usually a bad idea > > (except eventually for run-once throw-away scripts, and even then...) > > > > Why is this a bad idea? > > Don't you have any idea ? > -- Not really.problem with access, using unneeded memory... I grasping at straws here.

Re: Programming Idiomatic Code

2007-07-03 Thread Nathan Harmston
> "Clipper-derived unreadable drivel" > > I'm intrigued, what language are you working in? > > Clipper v5 was a pretty impressive development language for 1990 - with > code blocks, a flexible pre-processor, garbage collection, exception > handling, decent speed and an API to allow easy integration

Re: python 3.0 or 3000 ....is it worth waiting??? Newbie Question

2007-07-03 Thread Marc 'BlackJack' Rintsch
On Tue, 03 Jul 2007 19:54:57 +0200, Méta-MCI wrote: >> Python 3000 doesn't include many significant changes to the language > > One exemple : non-Ascii characters in identifiers (= no significatif > change?) Not in the sense that old code doesn't work anymore. ASCII sources still work in Pyth

  1   2   >