ANN: WebStack 1.0 released

2005-10-21 Thread Paul Boddie
WebStack 1.0 has finally been released! What is it? --- From the introductory text: WebStack is a package which provides a simple, common API for Python Web applications, allowing such applications to run within many different environments with virtually no changes to application code.

Re: connect to https unpossible. Please help.

2005-10-21 Thread Tim Roberts
Mark Delon [EMAIL PROTECTED] wrote: i want to log via python script to https page: 'https://brokerjet.ecetra.com/at/' # But it does not work. I am using following code(see below) Has somebody any ideas? How can I get to this https page? Need I to know some infos from provider(certificates,

Re: Sequence and/or pattern matching

2005-10-21 Thread Séb
Sorry for the confusion, I think my example was unclear. Thank you Mike for this piece of code who solves a part of my problem. In fact, the sequences are unknown at the beginning, so the first part of the code has to find possible sequences and if those sequences are repeated, counts how many

Re: sqlstring -- a library to build a SELECT statement

2005-10-21 Thread Tim Roberts
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: An Example: import sqlstring model = sqlstring.TableFactory() print model.person SELECT person.* FROM [person] person The [bracket] syntax is unique to Microsoft. Everyone else, including Microsoft SQL Server, uses double quotes to protect special

Re: Accessing a dll from Python

2005-10-21 Thread Tim Roberts
dcrespo [EMAIL PROTECTED] wrote: Can someone give me lights on how can I deal with dlls from python? My main purpose is to get access to a Unitech PT600 Bar Code system. I have the dll that works fine through Visual Basic. But I'm migrating to Python, so I need a way to use the same dll, or a C

RE: sqlstring -- a library to build a SELECT statement

2005-10-21 Thread Robert Brewer
Title: RE: sqlstring -- a library to build a SELECT statement Tim Roberts wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: An Example: import sqlstring model = sqlstring.TableFactory() print model.person SELECT person.* FROM [person] person The [bracket] syntax is unique to

Re: Cursor Location

2005-10-21 Thread Tim Roberts
Samantha [EMAIL PROTECTED] wrote: Is there any code that would allow a person to click a location on the screen and have that location saved for a future use? For example to imbed a watermark on an image or text, etc. Getting the point is easy. If you are using wxPython, your EVT_LEFT_UP

Re: Question on class member in python

2005-10-21 Thread Johnny Lee
It looks like there isn't a last word of the differrences -- http://mail.python.org/mailman/listinfo/python-list

a simple question about the third index in slice

2005-10-21 Thread 700MHz
I cannot quite understand when the third index is a negative number,like this: a = '0123456789' a[1:10:2] I know the index step is 2, so it will collect items from offset 1, 3, 5, 7, 9 but when a negative number come,like: a[1::-1] answer '10', and a[1:10:-1] only answer '', what is the different

Re: reload fails if module not in sys.path

2005-10-21 Thread Fredrik Lundh
Lonnie Princehouse wrote: Maybe it could fall back to module.__file__ if the module isn't found in sys.path?? ... or reload could just take an optional path parameter... Or perhaps I'm the only one who thinks this is silly: my_module = imp.load_module(module_name,

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Andrew Jaffe wrote: Hi, I have a class with various class-level variables which are used to store global state information for all instances of a class. These are set by a classmethod as in the following class sup(object): cvar1 = None cvar2 = None @classmethod

Re: a simple question about the third index in slice

2005-10-21 Thread Fredrik Lundh
someone wrote: I cannot quite understand when the third index is a negative number,like this: a = '0123456789' a[1:10:2] I know the index step is 2, so it will collect items from offset 1, 3, 5, 7, 9 but when a negative number come,like: a[1::-1] answer '10', and a[1:10:-1] only answer '',

Re: Would there be support for a more general cmp/__cmp__

2005-10-21 Thread Antoon Pardon
Op 2005-10-20, Steve Holden schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Ergo: use rich comparisons. rich comparosons can only solve the problem partly. Python does have the cmp function and that can give totaly inconsistent results even when the order defined by the rich comparison

Re: Set an environment variable

2005-10-21 Thread Christian
The closest thing you can do is that: -myScript.py-- print 'export MY_VARIABLE=value' -- -myScript.sh-- python myScript.py /tmp/chgvars.sh . /tmp/chgvars.sh

Re: Set an environment variable

2005-10-21 Thread Erik Max Francis
Christian wrote: Can I write a .py script that calls a .sh script that executes the export command and then calls another .py script (and how would the first .py script look)? No, the shell script that the Python program would invoke would be a different process and so commands executed in

Re: sort problem

2005-10-21 Thread Michele Petrazzo
Kent Johnson wrote: or learn about decorate-sort-undecorate: lst = [ ...whatever ] lst = [ x[3], i, x for i, x in enumerate(lst) ] I think that here the code must be changed (for the future): lst = [ (x[3], i, x) for i, x in enumerate(lst) ] lst.sort() lst = [ x for _, _, x in lst ] Wow,

Re: classmethods, class variables and subclassing

2005-10-21 Thread Steve Holden
Andrew Jaffe wrote: Andrew Jaffe wrote: Hi, I have a class with various class-level variables which are used to store global state information for all instances of a class. These are set by a classmethod as in the following class sup(object): cvar1 = None cvar2 = None

Re: Set an environment variable

2005-10-21 Thread Christian
Erik Max Francis wrote: Christian wrote: Can I write a .py script that calls a .sh script that executes the export command and then calls another .py script (and how would the first .py script look)? No, the shell script that the Python program would invoke would be a different

Re: classmethods, class variables and subclassing

2005-10-21 Thread Steve Holden
Andrew Jaffe wrote: Andrew Jaffe wrote: [...] The problem is that I actually do want to call these methods on the class itself, before I've made any instances. Except you could use staticmethods with an explicit class argument ... regards Steve -- Steve Holden +44 150 684 7255 +1

python and outlook

2005-10-21 Thread dt
Hi everyone, Are there any links or sites on how to read outlook mail boxes or address book? -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-21 Thread Sybren Stuvel
Mike Meyer enlightened us with: It's simpler to use eval and command substitution: eval $(python myScript.py) This looks like the best solution to me. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take

Re: Set an environment variable

2005-10-21 Thread Steve Holden
Christian wrote: The closest thing you can do is that: -myScript.py-- print 'export MY_VARIABLE=value' -- -myScript.sh-- python myScript.py /tmp/chgvars.sh . /tmp/chgvars.sh

Re: override a property

2005-10-21 Thread Robin Becker
Kay Schluehr wrote: Robin Becker wrote: I thought that methods were always overridable. In this case the lookup on the class changes the behaviour of the one and only property. How can something be made overridable that is actually overridable? I didn't know how to better express the

Re: Python vs Ruby

2005-10-21 Thread Michele Simionato
Tom Anderson: I have no idea what Scheme is, but I'll cettainly look it up as soon as I'm done writing this. You won't like it. Give yourself another 5-10 years, and you might start to find it strangely intriguing. +1 ;-) Michele Simionato --

Re: Set an environment variable

2005-10-21 Thread Chris F.A. Johnson
On 2005-10-21, Christian wrote: Erik Max Francis wrote: Christian wrote: Can I write a .py script that calls a .sh script that executes the export command and then calls another .py script (and how would the first .py script look)? No, the shell script that the Python program would

Re: Searching for txt file and importing to ms access

2005-10-21 Thread Mark Line
Once i have this working i was planing to kept all the txt files as logs, i'd have to give them a real name and stuff. But thanks for you help so far Mark Mike Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Mark Line [EMAIL PROTECTED] writes: I'm managed to get some code

Re: get a copy of a string leaving original intact

2005-10-21 Thread Fredrik Lundh
Bell, Kevin wrote: I'm having trouble with something that seems like it should be simple. I need to copy a file, say abc-1.tif to another directory, but if it's in there already, I need to transfer it named abc-2.tif but I'm going about it all wrong. Here's what doesn't work: (I'll add the

Python extension module segmentation fault

2005-10-21 Thread Rolf Wester
Hi, I' trying to make an extension module that passes Numeric arrays. The wrapper function is (swig generated and modified by myself): static PyObject *_wrap_my_func(PyObject *self, PyObject *args) { PyObject * resultobj = 0 ; PyObject * obj0 = 0 ; PyArrayObject * mat = 0 ;

Re: connect to https unpossible. Please help.

2005-10-21 Thread Mark Delon
Hi Tim, really than u very much! I think u have helped me! I will try, that what u said. I have found probably simplier solution. Is it so? ...but without success:-(. I want to download some URLs via python script. With some URLs I have success with some NOT. Why? I do following:

Re: Python vs Ruby

2005-10-21 Thread Harald Armin Massa
Casey, I have heard, but have not been able to verify that if a program is about 10,000 lines in C++ it is about 5,000 lines in Java and it is about 3,000 lines in Python (Ruby to?) BTW: it is normally only 50 lines in Perl. Not that you could read it, though Harald --

finding a number...

2005-10-21 Thread Enrique Palomo Jiménez
After ftp a file from mvs to windows, i find: is an offset, so up to 2GB, a commercial application drives crazy this is the result 2147450785| 2147466880| 2147483412| ÓÕÖZÖ²YÕXÕ| ÓÕÖZÖÔÓÔÕZ| ÓÕÖZÖÒ²YÖ0| could i know what's that? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python extension module segmentation fault

2005-10-21 Thread Robert Kern
Rolf Wester wrote: Hi, I' trying to make an extension module that passes Numeric arrays. The wrapper function is (swig generated and modified by myself): static PyObject *_wrap_my_func(PyObject *self, PyObject *args) { PyObject * resultobj = 0 ; PyObject * obj0 = 0 ;

RE: python and outlook

2005-10-21 Thread Tim Golden
[dt] Are there any links or sites on how to read outlook mail boxes or address book? Easiest thing to probably to automate the Outlook COM object or a MAPI Session for CDO access. You can do this easily with the pywin32 extensions. http://pywin32.sf.net You can then use pretty much any

Should i pick up Numeric, Numarray or SciPy.core?

2005-10-21 Thread jelle
#No rant intended I'm not at all confused wether I should learn an one of the advanced array modules, I'm slightly confused over which I should pick up. I'm impressed with the efforts of SciPy and Scientific, but since I'm fairly new to programming OO, choosing Numarray over Numeric hasnt been

Re: Python vs Ruby

2005-10-21 Thread Torsten Bronger
Hallöchen! Harald Armin Massa [EMAIL PROTECTED] writes: Casey, I have heard, but have not been able to verify that if a program is about 10,000 lines in C++ it is about 5,000 lines in Java and it is about 3,000 lines in Python (Ruby to?) BTW: it is normally only 50 lines in Perl. Not

Request to mailing list Lesstif rejected

2005-10-21 Thread lesstif-admin
Your request to the Lesstif mailing list Posting of your message titled hello has been rejected by the list moderator. The moderator gave the following reason for rejecting your request: Non-members are not allowed to post messages to this list. Any questions or comments should be

Re: Python extension module segmentation fault

2005-10-21 Thread Rolf Wester
Robert Kern wrote: Did you call import_array() in init_mytest()? No I didn't. Thank you very much for your help. Now it works. With kind regards Rolf Wester -- http://mail.python.org/mailman/listinfo/python-list

Re: Should i pick up Numeric, Numarray or SciPy.core?

2005-10-21 Thread Robert Kern
jelle wrote: #No rant intended I'm not at all confused wether I should learn an one of the advanced array modules, I'm slightly confused over which I should pick up. I'm impressed with the efforts of SciPy and Scientific, but since I'm fairly new to programming OO, choosing Numarray over

Re: A macro editor

2005-10-21 Thread bruno modulix
Tom Anderson wrote: On Thu, 20 Oct 2005, Diez B. Roggisch wrote: So - _I_ think the better user-experience comes froma well-working easy to use REPL to quickly give the scripts a try. I'd agree with that. Which is better, a difficult language with lots of fancy tools to help you write

do cc list from smtplib

2005-10-21 Thread eight02645999
hi i have email code: def email(HOST,FROM,TO,SUBJECT,BODY): import smtplib import string, sys body = string.join(( From: %s % FROM, To: %s % TO, Subject: %s % SUBJECT, , BODY), \r\n) print body server = smtplib.SMTP(HOST) server.sendmail(FROM,

Re: do cc list from smtplib

2005-10-21 Thread Tim Williams (gmail)
On 21 Oct 2005 02:34:40 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] def email(HOST,FROM,TO,CC,SUBJECT,BODY): import smtplib import string, sys body = string.join(( From: %s % FROM, To: %s % TO, CC: %s % CC, Subject: %s % SUBJECT, , BODY), \r\n)

Re: do cc list from smtplib

2005-10-21 Thread Steve Holden
Tim Williams (gmail) wrote: On 21 Oct 2005 02:34:40 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] def email(HOST,FROM,TO,CC,SUBJECT,BODY): import smtplib import string, sys body = string.join(( From: %s % FROM, To: %s % TO, CC: %s % CC, Subject: %s % SUBJECT, ,

Re: do cc list from smtplib

2005-10-21 Thread Tim Williams (gmail)
On 21/10/05, Steve Holden [EMAIL PROTECTED] wrote: Assuming that TO and CC are single addresses it would be saner to use: :) Assuming that the envelope TOs (inc CCs) are the same as the Header-TOs and Header-CCs Actually, I think this would be safer ! def email(HOST,FROM,TO,CC, RECIPS,

Re: do cc list from smtplib

2005-10-21 Thread Bean
Tim Williams (gmail) wrote: On 21 Oct 2005 02:34:40 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] def email(HOST,FROM,TO,CC,SUBJECT,BODY): import smtplib import string, sys body = string.join(( From: %s % FROM, To: %s % TO, CC: %s % CC, Subject: %s %

Re: How to get a raised exception from other thread

2005-10-21 Thread Peter Hansen
dcrespo wrote: Ok, sorry about the above question. I solved it adding this to the main thread: try: SrvrTCP = module.ThreadedTCPServer(ip,port) SrvrTCP.start() except Exception, description: MsgBox(self,TCPServer Error:\n\n+str(description),title=TCPServer,style=wx.OK |

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Steve Holden wrote: Andrew Jaffe wrote: The problem is that I actually do want to call these methods on the class itself, before I've made any instances. Except you could use staticmethods with an explicit class argument ... Steve, Yep, that would work! Thanks. But it does seem like a bit

Re: Python vs Ruby

2005-10-21 Thread Tom Anderson
On Thu, 20 Oct 2005, Mike Meyer wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: other than haskell and SQL, the others are more or less the same to me so getting familiar with them is not too difficult. There are actually lots of good train your brain type languages. Members of the

Re: Set an environment variable

2005-10-21 Thread Christian
Steve Holden wrote: :: one.py :: import os os.environ['STEVE'] = You are the man os.system(python two.py) print Ran one :: two.py :: import os print STEVE is, os.environ['STEVE'] print Ran two [EMAIL PROTECTED] tmp]$ python one.py

Re: classmethods, class variables and subclassing

2005-10-21 Thread Steve Holden
Andrew Jaffe wrote: Steve Holden wrote: Andrew Jaffe wrote: The problem is that I actually do want to call these methods on the class itself, before I've made any instances. Except you could use staticmethods with an explicit class argument ... Steve, Yep, that would work! Thanks.

pushing python to multiple windows machines

2005-10-21 Thread [EMAIL PROTECTED]
I am working on a project that requires python to be installed on a large number of windows servers and was wondering if anyone has found a method to do this. I found the article from 2003, but nobody ever stated that they have found an option for this.

Re: Set an environment variable

2005-10-21 Thread Steve Holden
Christian wrote: Steve Holden wrote: :: one.py :: import os os.environ['STEVE'] = You are the man os.system(python two.py) print Ran one :: two.py :: import os print STEVE is, os.environ['STEVE'] print Ran two [EMAIL PROTECTED] tmp]$ python

Re: TK question

2005-10-21 Thread jepler
In the FileDialog module there are both LoadFileDialog and SaveFileDialog. Is the latter what you want? Jeff pgptzMbfYw5VI.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

RE: pushing python to multiple windows machines

2005-10-21 Thread Tim Golden
[EMAIL PROTECTED] I am working on a project that requires python to be installed on a large number of windows servers and was wondering if anyone has found a method to do this. I found the article from 2003, but nobody ever stated that they have found an option for this. I'm not quite

Re: Python vs Ruby

2005-10-21 Thread Alex Stapleton
On 21 Oct 2005, at 09:31, Harald Armin Massa wrote: Casey, I have heard, but have not been able to verify that if a program is about 10,000 lines in C++ it is about 5,000 lines in Java and it is about 3,000 lines in Python (Ruby to?) BTW: it is normally only 50 lines in Perl. Not

Re: Python vs Ruby

2005-10-21 Thread bruno modulix
Amol Vaidya wrote: Casey Hawthorne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What languages do you know already? What computer science concepts do you know? What computer programming concepts do you know? Have you heard of Scheme? Ruby is a bit Perl like -- so if you

Embedded Python - Sharing memory among scripts, threads

2005-10-21 Thread adsheehan
Hi, I have a multi-threaded C++ software app that embeds Python. When multi-threading (native system threads) it is possible that multiple instances of a Python script are active. I have a requirement to 'share' some data values between these script instances (e.g. counters, file handles etc).

Re: ANN: Beginning Python (Practical Python 2.0)

2005-10-21 Thread Magnus Lie Hetland
In article [EMAIL PROTECTED], Dennis Lee Bieber wrote: [snip] Must be printed on thinner paper... Both run around 600 pages, but the older book is a third thicker... G Heh. Yeah. The new book has more material, too (new chapters, among other things), so I guess the new layout also has an

Looking for client+server sample code (httplib and/or urlib)

2005-10-21 Thread Philippe C. Martin
Hi, Are there such samples/tutorial out there ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: Set an environment variable

2005-10-21 Thread Christian
Steve Holden wrote: Time you answered your own questions by trying things at the interactive interpreter prompt! regards Steve Right again, Steve. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python vs Ruby

2005-10-21 Thread Michael Ekstrand
On Friday 21 October 2005 07:07, bruno modulix wrote: Python is more like Java. troll Err... Python is more like what Java would have been if Java was a smart dynamic hi-level object oriented language !-) /troll +1. Python is easily applicable to most of the problem domain of Java, but

Re: ANN: Beginning Python (Practical Python 2.0)

2005-10-21 Thread Kent Johnson
Magnus Lie Hetland wrote: I guess it has actually been out for a while -- I just haven't received my copies yet... Anyways: My book, Beginning Python: From Novice to Professional (Apress, 2005) is now out. Apress is offering a $10 rebate if you purchase the book before October 30. See for

Re: http/urlib pos/get question (newbie)

2005-10-21 Thread Philippe C. Martin
I have found what I needed ... in one of my books :E) regards, Philippe Philippe C. Martin wrote: Hi, (I am _very_ new to web programming) I am writing a client module (browser plugin) and server module (Python CGI) that need to exchange information. I want the transaction to be

Re: Looking for client+server sample code (httplib and/or urlib)

2005-10-21 Thread Philippe C. Martin
I have found what I needed ... in one of my books :E) Philippe Philippe C. Martin wrote: Hi, Are there such samples/tutorial out there ? Regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list

Re: pushing python to multiple windows machines

2005-10-21 Thread [EMAIL PROTECTED]
hey tim - Thanks for you input. I'm looking at it from the Windows perspective of needing to push a python interpreter out to multiple machines. I'll check out Moveable Python as you suggested. thanks -shawn -- http://mail.python.org/mailman/listinfo/python-list

wanna stop by my homemade glory hole?

2005-10-21 Thread kevin
hi there where are u plz -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Beginning Python (Practical Python 2.0)

2005-10-21 Thread Jaime Wyant
Also, if any of you guys aren't listening to Ron's Python411 podcast, you're missing out on a quality podcast about Python. While not necessarily `hardcore python' material, Ron does touch on various things happening in the community along with discussion about nifty python packages / modules

gnuplot stdout python question

2005-10-21 Thread bwaha
I've posted this question to comp.graphics.apps.gnuplot too but given that this python group may also comprise a lot of gnuplot users, and is far more active, I've posted this question here too. My apologies to those who read this twice. I posted to cgag before I decided to post here with a more

Re: pushing python to multiple windows machines

2005-10-21 Thread Larry Bates
Do you really need to install the interpreter or do you want to install a Python application to a bunch of servers? Using a combination of py2exe and InnoInstaller I push applications (and services, and COM objects) to lots of Windows servers just as normal setup.exe files which can be distributed

Re: Converting 2bit hex representation to integer ?

2005-10-21 Thread Peter Hansen
Madhusudan Singh wrote: I just tried n=str(x) print struct.unpack(b,n) I get (51,) What is the deal with the parenthesis and the comma ? If you really don't know what the parentheses and comma mean in the above output, I would suggest that you need to go back a step and walk

Re: pushing python to multiple windows machines

2005-10-21 Thread Roger Upole
[EMAIL PROTECTED] wrote: I am working on a project that requires python to be installed on a large number of windows servers and was wondering if anyone has found a method to do this. I found the article from 2003, but nobody ever stated that they have found an option for this.

Re: Python vs Ruby

2005-10-21 Thread Sion Arrowsmith
bruno modulix [EMAIL PROTECTED] wrote: Casey Hawthorne [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have heard, but have not been able to verify that if a program is about 10,000 lines in C++ it is about 5,000 lines in Java and it is about 3,000 lines in Python (Ruby to?) For a

Re: classmethods, class variables and subclassing

2005-10-21 Thread Andrew Jaffe
Steve Holden wrote: Andrew Jaffe wrote: Steve Holden wrote: Andrew Jaffe wrote: The problem is that I actually do want to call these methods on the class itself, before I've made any instances. Except you could use staticmethods with an explicit class argument ... Yep, that would work!

Re: finding a number...

2005-10-21 Thread Martin Blume
Enrique Palomo Jiménez After ftp a file from mvs to windows, i find: is an offset, so up to 2GB, a commercial application drives crazy [...] ??? I didn't understand your question, but 2 GB is popular limit for the maximal size of a file for some filesystems (e.g. ext2, FAT [???]). Maybe

Re: Python vs Ruby

2005-10-21 Thread vdrab
You can tell everything is well in the world of dynamic languages when someone posts a question with nuclear flame war potential like python vs. ruby and after a while people go off singing hymns about the beauty of Scheme... I love this place. v. --

win32 process information, using win32 extension

2005-10-21 Thread Java and Swing
i need to get information about the processes running on a windows pc (98, 2k, xp) i can get the pid's using, win32process.EnumProcesses()...and I can get a handle on a process using an id..such as handle = win32api.OpenProcess(win32con.PROCESS_QUERY_INFORMATION, 0, pids[0]) ..but how can i get

Psycopg2 date problems: Can't adapt

2005-10-21 Thread Steve Holden
I'm trying to copy data from an Access database to PostgreSQL, as the latter now appears to work well in the Windows environment. However I'm having trouble with date columns. The PostgreSQL table receiving the data has the following definition: CREATE TABLE Lines ( LinID SERIAL PRIMARY

RE: win32 process information, using win32 extension

2005-10-21 Thread Tim Golden
[Java and Swing] i need to get information about the processes running on a windows pc (98, 2k, xp) i can get the pid's using, win32process.EnumProcesses() but how can i get the name of the process, path to process, etc. You can probably do what you want with WMI. You'll have to make

Re: Psycopg2 date problems: Can't adapt

2005-10-21 Thread [EMAIL PROTECTED]
Is None a valid value for SQL ? Or should it be NULL ? May be it is because your input is NULL which is being converted to None in python but haven't been converted back to NULL on its way out. Steve Holden wrote: I'm trying to copy data from an Access database to PostgreSQL, as the latter now

Re: Accessing a dll from Python

2005-10-21 Thread Grant Edwards
On 2005-10-20, dcrespo [EMAIL PROTECTED] wrote: Can someone give me lights on how can I deal with dlls from python? Use the ctypes module. My main purpose is to get access to a Unitech PT600 Bar Code system. I have the dll that works fine through Visual Basic. But I'm migrating to Python,

Re: Set an environment variable

2005-10-21 Thread Grant Edwards
On 2005-10-21, Christian [EMAIL PROTECTED] wrote: The closest thing you can do is that: -myScript.py-- print 'export MY_VARIABLE=value' -- -myScript.sh-- python

Re: python and outlook

2005-10-21 Thread skip
dt Are there any links or sites on how to read outlook mail boxes or dt address book? Check the Outlook plugin code in SpamBayes http://www.spambayes.org/. Skip -- http://mail.python.org/mailman/listinfo/python-list

Compile C program - .pyc file

2005-10-21 Thread Ernesto
Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing a dll from Python

2005-10-21 Thread Simon Brunning
On 21/10/05, Grant Edwards [EMAIL PROTECTED] wrote: Sorry, I've no clue about anything VB-related unless it's Victoria Bitter. +1 QOTW. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Execute C code through Python

2005-10-21 Thread Ernesto
Thanks. Can anyone provide an example of using *subprocess* to run helloWorld.C through the python interpreter. -- http://mail.python.org/mailman/listinfo/python-list

Re: classmethods, class variables and subclassing

2005-10-21 Thread Steve Holden
Andrew Jaffe wrote: Steve Holden wrote: Andrew Jaffe wrote: Steve Holden wrote: Andrew Jaffe wrote: The problem is that I actually do want to call these methods on the class itself, before I've made any instances. Except you could use staticmethods with an explicit class argument ...

HELP! py2exe error - No module named decimal

2005-10-21 Thread Chris
I've just completed a project using the following (Windows XP, python 2.4.1, wxpython 2.6, and pymssql 0.7.3). The program runs great, but after I convert it to an exe (required for this project), it gives me the following error when I try to run it. Traceback (most recent call last): File

Re: Compile C program - .pyc file

2005-10-21 Thread Steve Holden
Ernesto wrote: Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? Thanks! Here's a start: http://codespeak.net/pipermail/pypy-dev/2003q1/000198.html regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden

Re: Psycopg2 date problems: Can't adapt

2005-10-21 Thread Steve Holden
[EMAIL PROTECTED] wrote: Steve Holden wrote: I'm trying to copy data from an Access database to PostgreSQL, as the latter now appears to work well in the Windows environment. However I'm having trouble with date columns. The PostgreSQL table receiving the data has the following definition:

RE: get a copy of a string leaving original intact

2005-10-21 Thread Bell, Kevin
I ended up slicing my string into a new one, rather than trying to have a copy of the string to alter in one case, or leave intact in another case. Thanks for the pointer on concatenating paths! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fredrik

Re: classmethods, class variables and subclassing

2005-10-21 Thread Steve Holden
Steve Holden wrote: [...] I think so. It's not normal adive, but it sounds like a metaclass might be what you need here. ^adive^advice^ spell-me-own-name-wrong-next-ly y'rs - evest -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

Re: Execute C code through Python

2005-10-21 Thread Fredrik Lundh
Ernesto wrote: Thanks. Can anyone provide an example of using *subprocess* to run helloWorld.C through the python interpreter. compile helloWorld, and run: import subprocess subprocess.call(helloWorld) (any special reason why you couldn't figure this out yourself, given the example

Re: Compile C program - .pyc file

2005-10-21 Thread Fredrik Lundh
Ernesto wrote: Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? unless you find a C-Python compiler, no. PYC files contain Python bytecode, C compilers usually generate native code for a given machine platform. /F --

Re: Compile C program - .pyc file

2005-10-21 Thread Ernesto
Fredrik Lundh wrote: Ernesto wrote: Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? unless you find a C-Python compiler, no. PYC files contain Python bytecode, C compilers usually generate native code for a given machine

Re: Compile C program - .pyc file

2005-10-21 Thread Fredrik Lundh
Steve Holden wrote: Here's a start: http://codespeak.net/pipermail/pypy-dev/2003q1/000198.html if anyone could turn ideas that only exist in Christian's brain into working systems, the world would look a lot different. /F -- http://mail.python.org/mailman/listinfo/python-list

coloring a complex number

2005-10-21 Thread Arthur
Spending the morning avoiding responsibilities, and seeing what it would take to color some complex numbers. class color_complex(complex): def __init__(self,*args,**kws): complex.__init__(*args) self.color=kws.get('color', 'BLUE') a=color_complex(1,7)

Re: Execute C code through Python

2005-10-21 Thread Grant Edwards
On 2005-10-21, Ernesto [EMAIL PROTECTED] wrote: Thanks. Can anyone provide an example of using *subprocess* to run helloWorld.C through the python interpreter. No. You can't run a .C file. You can run a .exe file (I'm guessing you're using Windows based on the question). -- Grant Edwards

Re: HELP! py2exe error - No module named decimal

2005-10-21 Thread Larry Bates
FYI there is a separate newsgroup for py2exe at gmane.comp.python.py2exe. You may want to post there also. Just as a suggestion, put an import decimal at the top of your program. It looks like _mssql might be doing dynamic imports in __load method which will confuse py2exe because it can't know

findwindow by its class name

2005-10-21 Thread James Hu
Hi, For the simple code: from wxPython.wx import * class MyApp(wxApp): def OnInit(self): frame = wxFrame(NULL, -1, Hello App) frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop() Is there any way to know this windows' class

Re: Compile C program - .pyc file

2005-10-21 Thread Grant Edwards
On 2005-10-21, Fredrik Lundh [EMAIL PROTECTED] wrote: Is there a way to compile a C program into a .pyc file that has the same behavior as the compiled C program? unless you find a C-Python compiler, no. Or a C-Python-byte-code compiler. PYC files contain Python bytecode, C compilers

Re: Execute C code through Python

2005-10-21 Thread Micah Elliott
On Oct 21, Grant Edwards wrote: I'm guessing you're using Windows based on the question. +1 QOTW. -- _ _ ___ |V|icah |- lliott http://micah.elliott.name [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >