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 EXPRESS

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

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

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 wri

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 Kron

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 -- http://

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 -- http://mail.python.

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 co

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'.enco

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() >>

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).gro

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 emula

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')

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

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 function/procedure

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.

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 d

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 >>N

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 soft

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

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 t

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 thi

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

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". -- http://mail.python.org/mailman/lis

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 fir

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 >

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 p

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) l.item

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

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)

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

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 me

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

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 = f.re

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

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. Lo"wis" <[EMAIL PROTECTED]> wrote: > > > > > 人言落日是天涯,望极天涯不见家 schrieb: > > > > Who could explain the follow issue ? > > print u'\u0394' > > > Δ > > print u'\u20ac' > > > Traceback (most recent ca

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. Lo"wis" <[EMAIL PROTECTED]> wrote: > > > > > 人言落日是天涯,望极天涯不见家 schrieb: > > > > Who could explain the follow issue ? > > print u'\u0394' > > > Δ > > print u'\u20ac' > > > Traceback (most recent ca

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 transfor

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.. > > T

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 follow

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 sho

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 a

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

Re: Key Listeners

2007-05-30 Thread Benedict Verheyen
kaens schreef: >> > > 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 keypr

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__(...): class B: __metaclass__ = C b= B() The ty

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? http://sti

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 lov

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";) >>pri

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__(...): > > > class

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: >

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 t

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'] > bl

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 the

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 /] -- htt

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

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 v.131

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 app

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

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 '__assert_p

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 try

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 sta

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 pass

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

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 p

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

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' objec

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. Pytho

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.) H

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 le

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 = Lis

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. -- http://mail.p

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 Li

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 with

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 >> anyo

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

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

2007-05-30 Thread yuce
re: BJörn, I think selecting a GPL license will increase the number of usable packages, since using Python license with GPL is perfectly fine as long as the whole software is licensed under GPL [I am not really sure it is a must to license the whole package under GPL] re: farksimm; I'd put (in nor

Re: google maps api for py?

2007-05-30 Thread Jon Crump
Kev, Geopy is pretty cool: http://exogen.case.edu/projects/geopy/ On Wed, 30 May 2007, Bell, Kevin wrote: > 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: print bypasses calling write method for objects inheriting from file?

2007-05-30 Thread Peter Otten
Gabriel Genellina wrote: > 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 sup

Appending a log file and see progress as program executes

2007-05-30 Thread Karim Ali
Hi, I am writing a program that will take several days to execute :) and would like to append to a log file but be able to open that file at any time and see the errors that have occured. So this is what I am doing: -- flog = open('out.log', 'a') ...

is there a standard way to "install" egg-files under windows ?

2007-05-30 Thread Stef Mientki
hello, after 4 months playing around with Python, and I still have troubles with egg files. Sometimes it works, sometimes it doesn't. If I google on "python egg", I get lost of links, which contains huge pages of information, and I'm totally scared off. I've used several methods, the last one, s

Re: python -- prolog bridge error

2007-05-30 Thread yuce
I've updated install doc for pyswip, you can have a look at: http://code.google.com/p/pyswip/wiki/INSTALL Happy hacking, Yuce -- http://mail.python.org/mailman/listinfo/python-list

Off Topic: What is the good book to learn Python ?

2007-05-30 Thread Katie Tam
I am new to this filed and begin to learn this langague. Can you tell me the good books to start with ? Katie Tam Network administrator http://www.linkwaves.com/main.asp http://www.linkwaves.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Appending a log file and see progress as program executes

2007-05-30 Thread Matteo
On May 30, 1:03 pm, "Karim Ali" <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing a program that will take several days to execute :) and would > like to append to a log file but be able to open that file at any time and > see the errors that have occured. > > So this is what I am doing: > > --

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

2007-05-30 Thread Nebur
> However by being *VERY* perverse, I was able to reproduce the above > error by overwriting AttributeError with some other exception class (say > SyntaxError): > AttributeError = SyntaxError > Then your code will be will produce a real AttributeError, but miss it > because (despite the spelli

Re: Appending a log file and see progress as program executes

2007-05-30 Thread Grant Edwards
On 2007-05-30, Karim Ali <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing a program that will take several days to execute :) and would > like to append to a log file but be able to open that file at any time and > see the errors that have occured. > > So this is what I am doing: > > ---

  1   2   >