ANN: eGenix mxODBC 3.0 Developer Licenses (mxODBC Database Interface)

2007-05-30 Thread eGenix Team: M.-A. Lemburg
eGenix.com mxODBC 3.0 Developer Licenses Available eGenix is pleased to announce the immediate availability of developer licenses for our

ANN: PyTables 2.0rc2 released

2007-05-30 Thread Francesc Altet
Announcing PyTables 2.0rc2 PyTables is a library for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data with support for full 64-bit file addressing. PyTables runs on top of the HDF5

Re: is and ==

2007-05-30 Thread Erik Max Francis
BlueJ774 wrote: Can someone please explain to me the difference between the is keyword and the == boolean operator. I can't figure it out on my own and I can't find any documentation on it. I can't understand why this works: if text is None: and why this always returns false:

Re: is and ==

2007-05-30 Thread BlueJ774
On May 30, 12:57 am, Erik Max Francis [EMAIL PROTECTED] wrote: BlueJ774 wrote: Can someone please explain to me the difference between the is keyword and the == boolean operator. I can't figure it out on my own and I can't find any documentation on it. I can't understand why this works:

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Tim Roberts
Frank Swarbrick [EMAIL PROTECTED] wrote: Then you'd really love COBOL! :-) Frank COBOL programmer for 10+ years Hey, did you hear about the object-oriented version of COBOL? They call it ADD ONE TO COBOL. -- Tim Roberts, [EMAIL PROTECTED] Providenza Boekelheide, Inc. --

Re: Key Listeners

2007-05-30 Thread kaens
On 29 May 2007 19:14:33 -0700, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? -- http://mail.python.org/mailman/listinfo/python-list I'm pretty sure pygame's got some, don't know about built-ins. --

Re: Key Listeners

2007-05-30 Thread Gary Herron
Mike wrote: Are there key listeners for Python? Either built in or third party? (As always on forums like this, you're most likely to get answers if you define your terms. A little Goggling informs me that in Java a key listener is a Java term for a component that generates an event when

Re: RDFXML Parser For qualified Dublin Core Database File

2007-05-30 Thread Steve Holden
Brandon McGinty wrote: Hi All, My goal is to be able to read the www.gutenberg.org http://www.gutenberg.org/ rdf catalog, parse it into a python structure, and pull out data for each record. The catalog is a Dublin core RDF/XML catalog, divided into sections for each book and details

Re: Professional Grant Proposal Writing Workshop (July 2007: University of Montana, Missoula)

2007-05-30 Thread Steve Holden
Anthony Jones wrote: [...] At its foundation, this course will address the basics of foundation, corporation, and government grant research. However, this course will teach a strategic funding research approach that encourages students to see research not as something they do before they

Re: Rats! vararg assignments don't work

2007-05-30 Thread Gary Herron
samwyse wrote: I'm a relative newbie to Python, so please bear with me. After seeing how varargs work in parameter lists, like this: def func(x, *arglist): and this: x = func(1, *moreargs) I thought that I'd try this: first, *rest = arglist Needless to say, it didn't work.

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-30 Thread Xah Lee
Prefix, Infix, Postfix notations in Mathematica 2000-02-21, 2007-05 [In the following essay, I discuss prefix, infix, postfix notations and Mathematica's syntax for them. The full HTML formatted article is available at: http://xahlee.org/UnixResource_dir/writ/notations.html ] THE HEAD OF

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread 人言落日是天涯,望极天涯不见家
On 5月30日, 下午1时23分, Martin v. Lowis [EMAIL PROTECTED] wrote: 人言落日是天涯,望极天涯不见家 schrieb: Who could explain the follow issue ? print u'\u0394' Δ print u'\u20ac' Traceback (most recent call last): File stdin, line 1, in module UnicodeEncodeError: 'gbk' codec can't encode character

print bypasses calling write method for objects inheriting from file?

2007-05-30 Thread MisterPete
I created an object that inherits from file and was a bit surprised to find that print seems to bypass the write method for objects inheriting from file. An optimization I suppose. Does this surprise anyone else at all or am I missing something? import sys class FromObject(object): def

Re: Periodic tasks.

2007-05-30 Thread Irmen de Jong
Ramashish Baranwal wrote: Hi, I am trying to execute some tasks periodically, those familiar with unix can think of it as equivalent to cron jobs. I have tried looking around, but couldn't find a way. Would appreciate any pointers or clues.. Thanks, -Ram Have a look at Kronos, a

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-30 Thread Hendrik van Rooyen
[EMAIL PROTECTED] wrote: Hi, Is it possible to have different items in a listbox in different colors? Or is it just one color for all items in a listbox? Thanks Rahul You specify text and foreground colour when you make the box, so I don't think its possible. - Hendrik --

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Hendrik van Rooyen
Maric Michaud [EMAIL PROTECTED] wrote: Is typist ok ? It's the google's translation for dactylo. Typist is fine, although MCP that I am, I tend to think of typist as female... I would call a male one a typer, but I dont think it is correct English. - Hendrik --

Re: print bypasses calling write method for objects inheriting from file?

2007-05-30 Thread Peter Otten
MisterPete wrote: I created an object that inherits from file and was a bit surprised to find that print seems to bypass the write method for objects inheriting from file. An optimization I suppose. Does this surprise anyone else at all or am I missing something? No, your analysis is

Re: Unicode to HTML entities

2007-05-30 Thread Duncan Booth
Clodoaldo [EMAIL PROTECTED] wrote: On May 29, 12:57 pm, Richard Brodie [EMAIL PROTECTED] wrote: Clodoaldo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I was looking for a function to transform a unicode string into htmlentities. u'São Paulo'.encode('ascii',

Re: Key Listeners

2007-05-30 Thread [EMAIL PROTECTED]
On 30 mai, 04:14, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? What is a key listener ? -- http://mail.python.org/mailman/listinfo/python-list

binascii.unhexlify ... not clear about usage, and output

2007-05-30 Thread Vishal
Hi, I have a file with a long list of hex characters, and I want to get a file with corresponding binary characters here's what I did: import binascii f1 = 'c:\\temp\\allhex.txt' f2 = 'c:\\temp\\allbin.txt' sf = open(f1, 'rU') df = open(f2, 'w') slines = sf.readlines() for line in

Re: multiline regular expression (replace)

2007-05-30 Thread Zdenek Maxa
Hi, Thanks a lot for useful hints to all of you who replied to my question. I could easily do now what I wanted. Cheers, Zdenek Holger Berger wrote: Hi, yes: import re a= I Am Multiline but short anyhow b=(I[\s\S]*line) print re.search(b, a,re.MULTILINE).group(1) gives I Am

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-30 Thread Eric Brunel
On Tue, 29 May 2007 19:02:03 +0200, [EMAIL PROTECTED] wrote: Hi, Is it possible to have different items in a listbox in different colors? Or is it just one color for all items in a listbox? Thanks Rahul AFAIK, this is not possible with a listbox. You can however quite easily emulate the

Re: binascii.unhexlify ... not clear about usage, and output

2007-05-30 Thread Peter Otten
Vishal wrote: I have a file with a long list of hex characters, and I want to get a file with corresponding binary characters here's what I did: import binascii f1 = 'c:\\temp\\allhex.txt' f2 = 'c:\\temp\\allbin.txt' sf = open(f1, 'rU') df = open(f2, 'w') slines = sf.readlines() for

writing to a file

2007-05-30 Thread montyphyton
as i understand there are two ways to write data to a file: using f.write(foo) and print f, foo. what i want to know is which one is faster (if there is any difference in speed) since i'm working with very large files. of course, if there is any other way to write data to a file, i'd love to hear

calling Postgresql stored procedure

2007-05-30 Thread Alchemist
I am using Python 2.4 and Postgresql 8.2 database server. On the database I have created a stored function, example, CREATE OR REPLACE FUNCTION calculateaverage() I created a new python script and would like to call my database stored function. How can I call a database stored

Re: Speex bindings for python 2.5

2007-05-30 Thread JarodEvans
On 30 mai, 02:30, momobear [EMAIL PROTECTED] wrote: I forgot to give the url http://www.freenet.org.nz/python/pySpeex/ I Couldn't Open the website. Maybe it was a temporary shutdown, I have no problem here. -- http://mail.python.org/mailman/listinfo/python-list

Re: Speex bindings for python 2.5

2007-05-30 Thread David H Wild
In article [EMAIL PROTECTED], momobear [EMAIL PROTECTED] wrote: I forgot to give the url :http://www.freenet.org.nz/python/pySpeex/ I Couldn't Open the website. It works if you knock the colon off the front of the URL as given. -- David Wild using RISC OS on broadband www.davidhwild.me.uk

A REAL money maker. IT WORKS!!!!

2007-05-30 Thread Signs Graphics Center
was up man does this stuff realy works -- http://mail.python.org/mailman/listinfo/python-list

Re: writing to a file

2007-05-30 Thread Szabolcs Nagy
[EMAIL PROTECTED] wrote: as i understand there are two ways to write data to a file: using f.write(foo) and print f, foo. well print will add a '\n' or ' ' if you use ',' after it what i want to know is which one is faster (if there is any difference there shouldn't be any noticable

Re: Rats! vararg assignments don't work

2007-05-30 Thread samwyse
Gary Herron wrote: samwyse wrote: I'm a relative newbie to Python, so please bear with me. After seeing how varargs work in parameter lists, like this: def func(x, *arglist): and this: x = func(1, *moreargs) I thought that I'd try this: first, *rest = arglist Needless to say,

Re: Key Listeners

2007-05-30 Thread Benedict Verheyen
[EMAIL PROTECTED] schreef: On 30 mai, 04:14, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? What is a key listener ? I thought it was a rather straightforward name. Something that listens for a key. In other words, a piece of software that

Re: Rats! vararg assignments don't work

2007-05-30 Thread samwyse
George Sakkis wrote: On May 29, 11:33 pm, Matimus [EMAIL PROTECTED] wrote: Your attemtp: [code] first, rest = arglist[0], arglist[1:] [/code] Is the most obvious and probably the most accepted way to do what you are looking for. As for adding the fucntionality you first suggested, it isn't

Python 2.5 and WXPython demo's

2007-05-30 Thread Andrew P
Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find a program to run the demo. Any advice? (apologies if this has been posted before).

Re: Rats! vararg assignments don't work

2007-05-30 Thread Wildemar Wildenburger
George Sakkis wrote: The time machine did it again: http://www.python.org/dev/peps/pep-3132/. Uhm, John Swartzwelder, right? :D /W -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread Steve Holden
Andrew P wrote: Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find a program to run the demo. Any advice? (apologies if this has

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread Wildemar Wildenburger
Andrew P wrote: Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find a program to run the demo. Any advice? (apologies if this has

Re: writing to a file

2007-05-30 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: as i understand there are two ways to write data to a file: using f.write(foo) and print f, foo. what i want to know is which one is faster (if there is any difference in speed) since i'm working with very large files. of course, if there is any other way to write

Re: Rats! vararg assignments don't work

2007-05-30 Thread Bruno Desthuilliers
Matimus a écrit : (snip) Remember, in Python there is only one way to do it. Actually, it's : There should be one-- and preferably only one --obvious way to do it.. ... Which is quite different. Please notice the should, preferably and obvious. --

Python + Prolog

2007-05-30 Thread Jgressier
For those who may also work with Prolog : http://code.google.com/p/pyswip/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Key Listeners

2007-05-30 Thread Bruno Desthuilliers
Benedict Verheyen a écrit : [EMAIL PROTECTED] schreef: On 30 mai, 04:14, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? What is a key listener ? (snip) In google, the first link is a link to the java sun home page. The first sentence on

Re: Unicode to HTML entities

2007-05-30 Thread Tommy Nordgren
On 29 maj 2007, at 17.52, Clodoaldo wrote: I was looking for a function to transform a unicode string into htmlentities. Not only the usual html escaping thing but all characters. As I didn't find I wrote my own: # -*- coding: utf-8 -*- from htmlentitydefs import codepoint2name def

Re: pyAntTasks

2007-05-30 Thread kilnhead
On May 28, 7:56 am, kilnhead [EMAIL PROTECTED] wrote: I am trying to use pyAntTasks in Eclipse. I have followed the example in the ibm doc, but I get the following error: [taskdef] Could not load definitions from resource pyAntTasks.properties. It could not be found. I have added

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-30 Thread rfg007
On May 29, 2:02 pm, [EMAIL PROTECTED] wrote: Hi, Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it justonecolor for all items in alistbox? Thanks Rahul from Tkinter import * root = Tk() l = Listbox(root) l.pack() for x in range(10): l.insert(END, x)

Re: Rats! vararg assignments don't work

2007-05-30 Thread Maric Michaud
samwyse a écrit : George Sakkis wrote: On May 29, 11:33 pm, Matimus [EMAIL PROTECTED] wrote: Your attemtp: [code] first, rest = arglist[0], arglist[1:] [/code] Is the most obvious and probably the most accepted way to do what you are looking for. As for adding the fucntionality you

Re: Key Listeners

2007-05-30 Thread kaens
On 5/30/07, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Benedict Verheyen a écrit : [EMAIL PROTECTED] schreef: On 30 mai, 04:14, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? What is a key listener ? (snip) In google, the first

Re: calling Postgresql stored procedure

2007-05-30 Thread Weinhandl Herbert
Alchemist schrieb: I am using Python 2.4 and Postgresql 8.2 database server. On the database I have created a stored function, example, CREATE OR REPLACE FUNCTION calculateaverage() I created a new python script and would like to call my database stored function. How can I call a

Re: Periodic tasks.

2007-05-30 Thread vasudevram
Steve Howell wrote: Thanks. Here are two links, not sure those are exactly what are being referenced here, but look in the ballpark: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413137 http://docs.python.org/lib/module-sched.html You're welcome. The ActiveState recipe you

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread stef
Wildemar Wildenburger wrote: Andrew P wrote: Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find a program to run the demo. Any

Re: Rats! vararg assignments don't work

2007-05-30 Thread Sion Arrowsmith
samwyse [EMAIL PROTECTED] wrote: samwyse wrote: I thought that I'd try this: first, *rest = arglist Needless to say, it didn't work. [ ... ] My use-case is (roughtly) this: first, *rest = f.readline().split() return dispatch_table{first}(*rest) first, rest =

Re: Key Listeners

2007-05-30 Thread momobear
On May 30, 10:14 am, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? try pykeylogger, that's maybe u want. -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTPAuthenticationError

2007-05-30 Thread Ramashish Baranwal
To help debug this, you may want to try the following. 1) Copy smptlib.py into your local directory. On my box, you can find it here, or import sys; print sys.path to help find it on your box: /usr/local/lib/python2.3 2) Go the login() method, add some print statements there to see

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread momobear
On May 30, 3:05 pm, 人言落日是天涯,望极天涯不见家 [EMAIL PROTECTED] wrote: On 5月30日, 下午1时23分, Martin v. Lowis [EMAIL PROTECTED] wrote: 人言落日是天涯,望极天涯不见家 schrieb: Who could explain the follow issue ? print u'\u0394' Δ print u'\u20ac' Traceback (most recent call last): File stdin, line 1,

Re: Unicode to HTML entities

2007-05-30 Thread Clodoaldo
On May 30, 8:53 am, Tommy Nordgren [EMAIL PROTECTED] wrote: On 29 maj 2007, at 17.52, Clodoaldo wrote: I was looking for a function to transform a unicode string into htmlentities. Not only the usual html escaping thing but all characters. As I didn't find I wrote my own: # -*-

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread momobear
On May 30, 3:05 pm, 人言落日是天涯,望极天涯不见家 [EMAIL PROTECTED] wrote: On 5月30日, 下午1时23分, Martin v. Lowis [EMAIL PROTECTED] wrote: 人言落日是天涯,望极天涯不见家 schrieb: Who could explain the follow issue ? print u'\u0394' Δ print u'\u20ac' Traceback (most recent call last): File stdin, line 1,

Re: Unicode to HTML entities

2007-05-30 Thread Clodoaldo
On May 30, 4:25 am, Duncan Booth [EMAIL PROTECTED] wrote: Clodoaldo [EMAIL PROTECTED] wrote: On May 29, 12:57 pm, Richard Brodie [EMAIL PROTECTED] wrote: Clodoaldo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I was looking for a function to transform a unicode string into

Pydev 1.3.4 Released

2007-05-30 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.4 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

Re: Periodic tasks.

2007-05-30 Thread momobear
On May 29, 2:33 pm, Ramashish Baranwal [EMAIL PROTECTED] wrote: Hi, I am trying to execute some tasks periodically, those familiar with unix can think of it as equivalent to cron jobs. I have tried looking around, but couldn't find a way. Would appreciate any pointers or clues.. Thanks,

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread Tijs
??? wrote: But the string contained the u'\u20ac' is get from remote host. Is there any method to decode it to the local 'mbcs'? remote_string = u'\u20ac' try: local_string = remote_string.encode('mbcs') except: # no mbcs equivalent available print encoding error else:

Re: Malformed big5 reading bug

2007-05-30 Thread Facundo Batista
tsuraan wrote: Python enters some sort of infinite loop when attempting to read data from a malformed file that is big5 encoded (using the codecs library). This behaviour can be observed under Linux and FreeBSD, using Python 2.4 and 2.5. A really simple example illustrating the bug follows:

Re: xmlrpclib hangs execution

2007-05-30 Thread Arno Stienen
I'm sorry to keep bumping my request, but I've been working on this problem for several months now and am stuck. Perhaps you do not have a direct answer, but know someone or someforum where I could ask these XML-RPC or TCP/IP package questions. Thanks, Arno. Arno Stienen wrote: Perhaps I

Re: Scope - import and globals

2007-05-30 Thread Tijs
HMS Surprise wrote: In the file snippet below the value for the global hostName is determined at runtime. Functions imported from the parent baseClass file such as logon also need access to this variable but cannot see it the with the implementation I have attempted here. Use a class

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread kyosohma
On May 30, 7:29 am, stef [EMAIL PROTECTED] wrote: Wildemar Wildenburger wrote: Andrew P wrote: Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run

Windows build of PostgreSQL library for 2.5

2007-05-30 Thread Ben Sizer
I've been looking for a Windows version of a library to interface to PostgreSQL, but can only find ones compiled under Python version 2.4. Is there a 2.5 build out there? -- Ben Sizer -- http://mail.python.org/mailman/listinfo/python-list

Re: Key Listeners

2007-05-30 Thread Bruno Desthuilliers
kaens a écrit : On 5/30/07, Bruno Desthuilliers [EMAIL PROTECTED] wrote: Benedict Verheyen a écrit : [EMAIL PROTECTED] schreef: On 30 mai, 04:14, Mike [EMAIL PROTECTED] wrote: Are there key listeners for Python? Either built in or third party? What is a key listener ? (snip) In

Re: Key Listeners

2007-05-30 Thread Benedict Verheyen
kaens schreef: snip What, he wants to know if there's a way in python to capture keystrokes, and do something with them depending on what they are. I mean, it's very unlikely that you would ask for something called a key listener if you didn't want to do something like: if keypress ==

New-style classes and special methods

2007-05-30 Thread Raj B
Hi My question is about how special methods are stored internally in Python objects. Consider a new-style class which implements special methods such as __call__ and __new__ class C(type): def __call__(...): body class B: __metaclass__ = C stuff b=

Re: Windows build of PostgreSQL library for 2.5

2007-05-30 Thread Frank Millman
On May 30, 4:15 pm, Ben Sizer [EMAIL PROTECTED] wrote: I've been looking for a Windows version of a library to interface to PostgreSQL, but can only find ones compiled under Python version 2.4. Is there a 2.5 build out there? -- Ben Sizer Is this what you are looking for?

google maps api for py?

2007-05-30 Thread Bell, Kevin
I see that the weapon of choice for google maps is javascript... Is there anything for python? Kev -- http://mail.python.org/mailman/listinfo/python-list

Re: writing to a file

2007-05-30 Thread sturlamolden
On May 30, 1:41 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: what i want to know is which one is faster (if there is any difference in speed) since i'm working with very large files. of course, if there is any other way to write data to a file, i'd love to hear

Re: xmlrpclib hangs execution

2007-05-30 Thread Tijs
Arno Stienen wrote: Arno Stienen wrote: Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server = xmlrpclib.Server(http://10.10.101.62:29500;) print

Re: New-style classes and special methods

2007-05-30 Thread Alex Martelli
Raj B [EMAIL PROTECTED] wrote: Hi My question is about how special methods are stored internally in Python objects. Consider a new-style class which implements special methods such as __call__ and __new__ class C(type): def __call__(...): body class B:

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread 人言落日是天涯,望极天涯不见家
On 5月30日, 下午9时03分, Tijs [EMAIL PROTECTED] wrote: ??? wrote: But the string contained the u'\u20ac' is get from remote host. Is there any method to decode it to the local 'mbcs'? remote_string = u'\u20ac' try: local_string = remote_string.encode('mbcs') except: # no

Re: Rats! vararg assignments don't work

2007-05-30 Thread Alex Martelli
samwyse [EMAIL PROTECTED] wrote: ... Actually, I'm surprised that the PEP does as much as it does. If tuples are implemented as S-expressions, then something like this: Tuples are implemented as compact arrays of pointer-to-PyObject (so are lists, BTW). So, for example, a 10-items tuple

Re: How to print this character u'\u20ac' to DOS terminal

2007-05-30 Thread Tijs
人言落日是天涯,望极天涯不见家 wrote: Yes, it works, thank you. But I doubt this way may not work on linux. Maybe I should write some additional code for supporting both windows and linux OS. Depends on what you want to do. Printing to a DOS terminal is hard in Linux :-) If you write server code, best to

Re: writing to a file

2007-05-30 Thread sturlamolden
On May 30, 4:53 pm, sturlamolden [EMAIL PROTECTED] wrote: import numpy byte = numpy.uint8 desc = numpy.dtype({'names':['r','g','b'],'formats':[byte,byte,byte]}) mm = numpy.memmap('myfile.dat', dtype=desc, offset=4096, shape=(480,640), order='C') red = mm['r'] green = mm['g'] blue =

Re: Windows build of PostgreSQL library for 2.5

2007-05-30 Thread Ben Sizer
On 30 May, 15:42, Frank Millman [EMAIL PROTECTED] wrote: On May 30, 4:15 pm, Ben Sizer [EMAIL PROTECTED] wrote: I've been looking for a Windows version of a library to interface to PostgreSQL, but can only find ones compiled under Python version 2.4. Is there a 2.5 build out there? Is

Creating a distro of python... What would you include in it?

2007-05-30 Thread farksimmons
I am creating a distro of Python to be licensed as GPL am wondering, what would anyone suggest as to 3rd party modules being put into it (non-commercial of course!)? I know I'd put MySQLdb into it at the very least. Any suggestions? Thanks, Fark Simmons [insert clever tagline here /] --

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread John DeRosa
+1 QOTW On Wed, 30 May 2007 06:18:36 GMT, Tim Roberts [EMAIL PROTECTED] wrote: Frank Swarbrick [EMAIL PROTECTED] wrote: Then you'd really love COBOL! :-) Frank COBOL programmer for 10+ years Hey, did you hear about the object-oriented version of COBOL? They call it ADD ONE TO COBOL. --

Anyone else has seen forrtl: error (200) ...

2007-05-30 Thread Alexander Eisenhuth
Hello, Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a script. Instead i get: forrtl: error (200): program aborting due to control-C event If I start python in interactive mode Ctrl+C is passed: bash-3.2$ python Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC

Call for Ruby Champion !!

2007-05-30 Thread IT Recruiter
Hello friends! I am looking for a Ruby Champion to lead the race in Website development within Java environment... Who loves programming, with new techniques as well as old. Who also enjoys hand coding open source technologies with in-depth knowledge of statistical methods Has a practical

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Szabolcs Nagy
John DeRosa wrote: +1 QOTW Hey, did you hear about the object-oriented version of COBOL? They call it ADD ONE TO COBOL. actually it is ADD 1 TO COBOL GIVING COBOL http://en.wikipedia.org/wiki/COBOL#Aphorisms_and_humor_about_COBOL -- http://mail.python.org/mailman/listinfo/python-list

How can an Exception pass over an except clause ?

2007-05-30 Thread Nebur
I'm using the contract.py library, running Python 2.4.4. Now I'm confronted with the following exception backtrace: (...) File /usr/lib/python2.4/site-packages/contract.py, line 1265, in _check_preconditions p = f.__assert_pre AttributeError: 'function' object has no attribute

Re: New-style classes and special methods

2007-05-30 Thread Raj B
Yes, special methods populate the slots in the structures which Python uses to represent types. Objects/typeobject.c in the Python source distribution does the hard work, particularly in function type_new Thanks for that quick response. I am quite comfortable with C code and am

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Joe Riopel
Using camel case instead of the under_score means less typing. I am lazy. fooBar foo_bar -- http://mail.python.org/mailman/listinfo/python-list

Re: Call for Ruby Champion !!

2007-05-30 Thread Robin Becker
IT Recruiter wrote: Hello friends! I am looking for a Ruby Champion to lead the race in Website development within Java environment... Who loves programming, with new techniques as well as old. Who also enjoys hand coding open source technologies with in-depth knowledge of

Re: Anyone else has seen forrtl: error (200) ...

2007-05-30 Thread Jason
On May 30, 9:33 am, Alexander Eisenhuth [EMAIL PROTECTED] wrote: Hello, Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a script. Instead i get: forrtl: error (200): program aborting due to control-C event If I start python in interactive mode Ctrl+C is passed:

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread projecktzero
On May 30, 12:36 am, Hendrik van Rooyen [EMAIL PROTECTED] wrote: Maric Michaud [EMAIL PROTECTED] wrote: Typist is fine, although MCP that I am, I tend to think of typist as female... - Hendrik What does being a Microsoft Certified Professional(MCP) have to do with thinking of a typist as

Re: Creating a distro of python... What would you include in it?

2007-05-30 Thread Simon Hibbs
On 30 May, 16:25, [EMAIL PROTECTED] wrote: I am creating a distro of Python to be licensed as GPL am wondering, what would anyone suggest as to 3rd party modules being put into it (non-commercial of course!)? I know I'd put MySQLdb into it at the very least. Any suggestions? What you put

Re: How can an Exception pass over an except clause ?

2007-05-30 Thread Gary Herron
Nebur wrote: I'm using the contract.py library, running Python 2.4.4. Now I'm confronted with the following exception backtrace: (...) File /usr/lib/python2.4/site-packages/contract.py, line 1265, in _check_preconditions p = f.__assert_pre AttributeError: 'function' object has no

Re: How can an Exception pass over an except clause ?

2007-05-30 Thread Tijs
Nebur wrote: I'm using the contract.py library, running Python 2.4.4. Now I'm confronted with the following exception backtrace: (...) File /usr/lib/python2.4/site-packages/contract.py, line 1265, in _check_preconditions p = f.__assert_pre AttributeError: 'function' object has no

Re: Anyone else has seen forrtl: error (200) ...

2007-05-30 Thread Tijs
Alexander Eisenhuth wrote: Hello, Ctrl+C is not passed to the interpreter (i guess it) while I'm executing a script. Instead i get: forrtl: error (200): program aborting due to control-C event I don't know what forrtl is, but I think it is hijacking your SIGINT signal handler. Python

Re: google maps api for py?

2007-05-30 Thread Daniel Nogradi
I see that the weapon of choice for google maps is javascript... Is there anything for python? I wrote the following for finding the latitude/longitude of a location. You need to set the variable 'key' to the actual key you got from google. (Indentation might get mixed up on the way.)

Re: Creating a distro of python... What would you include in it?

2007-05-30 Thread BJörn Lindqvist
On 30 May 2007 08:25:48 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I am creating a distro of Python to be licensed as GPL am wondering, what would anyone suggest as to 3rd party modules being put into it (non-commercial of course!)? I know I'd put MySQLdb into it at the very least.

Re: Tkinter Listbox - Different Text colors in one listbox

2007-05-30 Thread rahulnag22
On May 30, 6:04 am, [EMAIL PROTECTED] wrote: On May 29, 2:02 pm, [EMAIL PROTECTED] wrote: Hi, Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it justonecolor for all items in alistbox? Thanks Rahul from Tkinter import * root = Tk() l = Listbox(root)

Re: writing to a file

2007-05-30 Thread sturlamolden
On May 30, 4:53 pm, sturlamolden [EMAIL PROTECTED] wrote: However, numpy has a properly working memory mapped array class, numpy.memmap. It seems that NumPy's memmap uses a buffer from mmap, which makes both of them defunct for large files. Damn. mmap must be fixed. --

Re: Creating a distro of python... What would you include in it?

2007-05-30 Thread Shane Geiger
This is for Windows only, but since your target audience is newbies, that might be fine. Python Sumo-Distribution for Windows - Freely downloadable Python distributions for Windows with many extra packages already installed and ready for use. -- http://code.enthought.com/enthon/ BJörn

Re: Is PEP-8 a Code or More of a Guideline?

2007-05-30 Thread Szabolcs Nagy
Joe Riopel wrote: Using camel case instead of the under_score means less typing. I am lazy. fooBar foo_bar camel case makes source code extremely ugly in weird disturbing way YMMV -- http://mail.python.org/mailman/listinfo/python-list

Help with ctypes and PAM

2007-05-30 Thread [EMAIL PROTECTED]
Hello, I've been trying to write a PAM module using ctypes. In the conversation function (my_conv in the script below), you're passed in a pam_response** pointer. You're supposed to allocate an array of pam_response's and set the pointer's value to the new array. Then you fill in the array

Re: print bypasses calling write method for objects inheriting from file?

2007-05-30 Thread Gabriel Genellina
En Wed, 30 May 2007 04:24:30 -0300, Peter Otten [EMAIL PROTECTED] escribió: I created an object that inherits from file and was a bit surprised to find that print seems to bypass the write method for objects inheriting from file. An optimization I suppose. Does this surprise anyone else

Re: Python 2.5 and WXPython demo's

2007-05-30 Thread Andrew P
On May 30, 12:24 pm, Steve Holden [EMAIL PROTECTED] wrote: Andrew P wrote: Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows XP and it can't find

  1   2   >