Add vs in-place add of str to list

2008-10-02 Thread rs387
Hi I'm trying to understand why it is that I can do a = [] a += 'stuff' a ['s', 't', 'u', 'f', 'f'] but not a = [] a = a + 'stuff' Traceback (most recent call last): File stdin, line 1, in module TypeError: can only concatenate list (not str) to list Can someone explain the logic? Why

Re: How to read a jpg bytearray from a Flash AS3 file

2008-10-02 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Thanks! I'm using form = cgi.FieldStorage(). When I print out the contents of form, I get this: FieldStorage(None, None, '\xff\xd8\xff\xe0\x00\x10JFIF \x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xdb

Re: Add vs in-place add of str to list

2008-10-02 Thread Erik Max Francis
rs387 wrote: I'm trying to understand why it is that I can do a = [] a += 'stuff' a ['s', 't', 'u', 'f', 'f'] but not a = [] a = a + 'stuff' Traceback (most recent call last): File stdin, line 1, in module TypeError: can only concatenate list (not str) to list Can someone explain the

Re: how to make smtplib.SMTP('localhost') work on window xp

2008-10-02 Thread Tim Roberts
zxo102 [EMAIL PROTECTED] wrote: In my case, I implement an application with python to accomplish collecting real time data from a serial port: com1 which is connected to some xbee hardwares. The python logging module is used to save the information generated at runtime into a log file. Since the

Re: I built a nice html templater!

2008-10-02 Thread Tim Roberts
Derick van Niekerk [EMAIL PROTECTED] wrote: Ok - so it's not really an awesome achievement and only handles basic templating needs (no loops and other programming constructs) but maybe someone will find it useful. sarcasm Sure, that's what the world needed. We didn't have enough Python HTML

Re: Event-driven framework (other than Twisted)?

2008-10-02 Thread Phillip B Oldham
On Oct 2, 1:32 am, James Mills [EMAIL PROTECTED] wrote: http://hg.shortcircuit.net.au/index.wsgi/pymills/file/b7498cd4c6a4/ex... Thanks for the example, but its not loading. -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-driven framework (other than Twisted)?

2008-10-02 Thread Phillip B Oldham
On Oct 2, 1:28 am, James Mills [EMAIL PROTECTED] wrote: Phillip, I have been developing a rather unique event-driven and component architecture library for quite some time that is (not twisted). Actually it's nothing like twisted, but based on 2 core concepts:  * Everything is a Component  

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread est
On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote: wow. It's giga-size file. I need stream reading it, md5 it. It may break for a while. So use generators and consume the stream ? --JamesMills -- -- -- Problems are

Re: RELEASED Python 2.6 final

2008-10-02 Thread nneonneo
Hmm, I was looking forward to trying this out, but the Windows installer link (http://www.python.org/ftp/python/2.6/python-2.6.msi) is presently broken (as is the link for the 64-bit Windows version). While I'm at it, I might also point out that http://www.python.org/download/windows/ is quite

Re: pyhton or json, list or array?

2008-10-02 Thread Bernhard Walle
Hi, * bruce [2008-09-30 13:01]: i was told that it's json, but i have no idea how to convert it/manipulate it.. See http://json.org/ for a list of available JSON parsers for Python. I personally used python-simplejson, and I was happy with it. :-) Regards, Bernhard --

Re: Odd Errors

2008-10-02 Thread Aaron Castironpi Brady
On Oct 2, 12:52 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], Steven D'Aprano wrote: On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Aaron Castironpi Brady wrote: Do you ever want

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread Aaron Castironpi Brady
On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote: On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote: wow. It's giga-size file. I need stream reading it, md5 it. It may break for a while. So use generators and consume the

Re: what does python -i use as input stream (stdin)?

2008-10-02 Thread Almar Klein
I did not understand completely what you want, and rereading previous posts I got even more confused... Could you provide a complete description of what you want to do? Is it a single process, or two separate processes? Running on the same machine or remotely? All python or there is another

Re: ssh keepalive

2008-10-02 Thread loial
Show us a bit of your code, so we can see why is None there. def command ( self , command ) : process requested command through ssh print command if not self._connected : return False , No SSH connection available try : stdin , stdout

Re: Database GUI generation from schema

2008-10-02 Thread Bruno Desthuilliers
Eric Wertman a écrit : Sorry if this is misplaced, but I could have sworn I saw a link on this list to a package that would auto-generate data entry type forms from a database schema, similar to django's auto-admin interface. Does anyone recall a package like that? I did some searching, but

Re: Peek inside iterator (is there a PEP about this?)

2008-10-02 Thread Peter Otten
Luis Zarrabeitia wrote: On Wednesday 01 October 2008 01:14:14 pm Peter Otten wrote: Luis Zarrabeitia wrote: a = iter([1,2,3,4,5]) # assume you got the iterator from a function and b = iter([1,2,3]) # these two are just examples. Can you provide a concrete use case? I'd like to...

docs.python.org inaccessible

2008-10-02 Thread Lawrence D'Oliveiro
Been getting 403 errors all afternoon. At one time I used to assiduously download PDF files of all the documentation I wanted to refer to. These days I've grown accustomed to just having a bunch of Web browser windows semi-permanently open. Until a rude shock like this happens to hit me. Maybe I

using SSh problem!

2008-10-02 Thread sa6113
I want to connect form a windows machine to a Linux one using SSH (I use Paramiko) and simply copy a file to Linux machine. Would you please help me how should I start? Is there any useful code? -- View this message in context:

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread est
On Oct 2, 4:22 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote: On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote: wow. It's giga-size file. I need stream reading

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread Gabriel Genellina
En Wed, 01 Oct 2008 16:50:05 -0300, est [EMAIL PROTECTED] escribió: import md5 a=md5.md5() import pickle pickle.dumps(a) Traceback (most recent call last): File stdin, line 1, in module File C:\Python25\lib\pickle.py, line 1366, in dumps Pickler(file, protocol).dump(obj) File

Re: RELEASED Python 2.6 final

2008-10-02 Thread skip
Chris Also, the docs currently seem broken. Known problem. The elves are working on it. -- Skip Montanaro - [EMAIL PROTECTED] - http://www.webfast.com/~skip/ -- http://mail.python.org/mailman/listinfo/python-list

how best to use a dictionary in this function?

2008-10-02 Thread Terrence Brannon
Ok, here is some code: def calc_profit(std_clicks, vip_clicks, ad_rate=200, upline_status=None): payout = {} payout_std = std_clicks * rates['std'].per_click payout_vip = vip_clicks * rates['vip'].per_click ... now note that std_clicks and vip_clicks are passed to the function.

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread Aaron Castironpi Brady
On Oct 2, 4:03 am, est [EMAIL PROTECTED] wrote: On Oct 2, 4:22 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED] wrote: On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote: On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote: On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:

Re: RELEASED Python 2.6 final

2008-10-02 Thread skip
nneonneo Hmm, I was looking forward to trying this out, but the Windows nneonneo installer link nneonneo (http://www.python.org/ftp/python/2.6/python-2.6.msi) is nneonneo presently broken (as is the link for the 64-bit Windows nneonneo version). We are aware of it. Because

Re: how best to use a dictionary in this function?

2008-10-02 Thread Aaron Castironpi Brady
On Oct 2, 4:18 am, Terrence Brannon [EMAIL PROTECTED] wrote: Ok, here is some code: def calc_profit(std_clicks, vip_clicks, ad_rate=200, upline_status=None):     payout = {}     payout_std = std_clicks * rates['std'].per_click     payout_vip = vip_clicks * rates['vip'].per_click ... now

Re: using SSh problem!

2008-10-02 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], sa6113 wrote: I want to connect form a windows machine to a Linux one using SSH (I use Paramiko) and simply copy a file to Linux machine. Do you want to be able to connect without having to enter a password? You'll need to set up a public/private key pair for

docs.python.org access should be working again

2008-10-02 Thread skip
Sorry for the problem with docs.python.org. Python 2.6 includes a complete rework of the Python documentation suite. There were problems with the installation location which should be resolved now. If you visit http://docs.python.org/ and still see the 2.5.2 doc page, force a page reload

Re: RELEASED Python 2.6 final

2008-10-02 Thread Francesco Guerrieri
On Thu, Oct 2, 2008 at 11:23 AM, [EMAIL PROTECTED] wrote: nneonneo Hmm, I was looking forward to trying this out, but the Windows nneonneo installer link nneonneo (http://www.python.org/ftp/python/2.6/python-2.6.msi) is nneonneo presently broken (as is the link for the 64-bit

Re: ssh keepalive

2008-10-02 Thread Gabriel Genellina
En Thu, 02 Oct 2008 05:26:25 -0300, loial [EMAIL PROTECTED] escribió: Show us a bit of your code, so we can see why is None there. Still not enough. From your first post, the error was: 'NoneType' object has no attribute 'exec_command' def command ( self , command ) :

Re: Database GUI generation from schema

2008-10-02 Thread Gabriel Genellina
En Wed, 01 Oct 2008 19:36:08 -0300, Eric Wertman [EMAIL PROTECTED] escribió: Sorry if this is misplaced, but I could have sworn I saw a link on this list to a package that would auto-generate data entry type forms from a database schema, similar to django's auto-admin interface. Does anyone

Re: Odd Errors

2008-10-02 Thread Lawrence D'Oliveiro
In message [EMAIL PROTECTED], Aaron Castironpi Brady wrote: On Oct 2, 12:52 am, Lawrence D'Oliveiro [EMAIL PROTECTED] central.gen.new_zealand wrote: In message [EMAIL PROTECTED], Steven D'Aprano wrote: On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: In message [EMAIL

Re: TypeError: can't pickle HASH objects?

2008-10-02 Thread est
On Oct 2, 5:07 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Wed, 01 Oct 2008 16:50:05 -0300, est [EMAIL PROTECTED] escribió: import md5 a=md5.md5() import pickle pickle.dumps(a) Traceback (most recent call last):   File stdin, line 1, in module   File

Re: using SSh problem!

2008-10-02 Thread sa6113
No, my problem isn't entering password or not ? I want to know what should I do to connect between different platform and copy a file . Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], sa6113 wrote: I want to connect form a windows machine to a Linux one using SSH (I use

Re: using SSh problem!

2008-10-02 Thread Tim Golden
sa6113 wrote: No, my problem isn't entering password or not ? I want to know what should I do to connect between different platform and copy a file . Did you try searching? This looks hopeful: http://commandline.org.uk/python/2008/may/28/sftp-python/ TJG --

Nice websites here123

2008-10-02 Thread dthavoccosta
http://retube.u.yuku.com/ retube http://urporntube.u.yuku.com/ urporntube http://porhub.u.yuku.com/ porhub http://pornhubevideo.u.yuku.com/ pornhubevideo http://megarotic.u.yuku.com/ megarotic http://megaroticcom.u.yuku.com/ megarotic com -- http://mail.python.org/mailman/listinfo/python-list

Nice websites here123

2008-10-02 Thread dthavoccosta
http://pornhubevideo.u.yuku.com/ pornhubevideo http://retube.u.yuku.com/ retube http://megarotic.u.yuku.com/ megarotic http://megaroticcom.u.yuku.com/ megarotic com http://urporntube.u.yuku.com/ urporntube http://porhub.u.yuku.com/ porhub Если Вы выберете несколько доменов, то DNS адреса сменятся

Re: RELEASED Python 2.6 final

2008-10-02 Thread olive
Surely you're joking! Everybody knows that python developers never sleep :-) Wrong! All my collegues are Java developers and I'm the only one who sleep (and like a log). Congratulations, by the way. Olivier. -- http://mail.python.org/mailman/listinfo/python-list

Re: using SSh problem!

2008-10-02 Thread Ulrich Eckhardt
sa6113 wrote: I want to connect form a windows machine to a Linux one using SSH (I use Paramiko) and simply copy a file to Linux machine. Would you please help me how should I start? For starters, I'd take a look at 'scp'. Other than that, what does the question you asked have to do with

Re: using SSh problem!

2008-10-02 Thread sa6113
One of the Python implementations of SSH is called Paramiko. Ulrich Eckhardt wrote: sa6113 wrote: I want to connect form a windows machine to a Linux one using SSH (I use Paramiko) and simply copy a file to Linux machine. Would you please help me how should I start? For starters, I'd

Re: Python on JavaScript VM's (such as V8)?

2008-10-02 Thread lkcl
On Sep 3, 10:02 pm, [EMAIL PROTECTED] wrote: Berco Beute: I wonder what it would take to implement Python in JavaScript so it it's been done. http://pyjamas.sf.net can run on those fancy new JavaScript VM's such as Chrome's V8 or that's been done, too.

Python on Javascript VMs (such as V8)

2008-10-02 Thread Luke Kenneth Casson Leighton
[folks, my apologies for the double-post via comp.lang.python whilst my tiny brain works backwards and notices - eventually - that comp.lang.python is mirrored from python-list duh] On Sep 3, 10:02 pm, [EMAIL PROTECTED] wrote: Berco Beute: I wonder what it would take to implement Python in

Determine minimum required version for a script

2008-10-02 Thread techtonik
Can somebody remind how to check script compatibility with old Python versions? I can remember PHP_CompatInfo class for PHP that parses a script or directory to find out the minimum version and extensions required for them to run, and I wonder if there was anything like this for Python? --

Re: Add vs in-place add of str to list

2008-10-02 Thread rs387
On Oct 2, 8:11 am, Erik Max Francis [EMAIL PROTECTED] wrote: It's because the `+=` operator is doing the equivalent of calling the `extend` method, which treats its argument as a generic sequence, and doesn't enforce type. I see. Do you know whether this is seen as a problem with the language

Ctypes behave differenty on windows 2000 and windows XP

2008-10-02 Thread dudeja . rajat
Hi, Im facing a strange problem with ctypes module on windows 2000. I did not face this problem with the windows Xp. The problem is this code and specifically c_long which behave differently on win2000 and winxp from ctypes import * h = windll.LoadLibrary(C:\\Windows\\System32\\myDll.dll)

Re: IDLE doesn't run on OSX 10.3.9

2008-10-02 Thread thomascribbs
Just installed TclTkAquaBI-8.4.9.0.dmg from http://tcltkaqua.sourceforge.net/...still have no IDLE startup... Please let me know other ideas...thanks. -Tom On Oct 1, 9:22 am, Kevin Walzer [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Just did a new install of Tcl/tk from

Sample code required to validate a xml file against XSD

2008-10-02 Thread hrishy
Hi Does anybody have a python xample program to validate a xml file against a XSD. regards Hrisy -- http://mail.python.org/mailman/listinfo/python-list

python-2.6

2008-10-02 Thread luca . ciciriello
-- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Scopri i games più scaricati su cellulare! Gioca la tua partita! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8272d=20081002 -- http://mail.python.org/mailman/listinfo/python-list

Re: Peek inside iterator (is there a PEP about this?)

2008-10-02 Thread Steven D'Aprano
On Wed, 01 Oct 2008 16:14:09 -0400, Terry Reedy wrote: Iterators are intended for 'iterate through once and discard' usages. Also for reading files, which are often seekable. I don't disagree with the rest of your post, I thought I'd just make an observation that if the data you are iterating

Re: python-2.6

2008-10-02 Thread Mike Driscoll
On Oct 2, 8:33 am, [EMAIL PROTECTED] wrote: Hi all. I've installed on may MacOS X 10.4.11 (PPC) Python-2.5.2, numpy and scipy. Now I'm interested to insall Python-2.6. My question is: What will happen to may scientific modules if now I jump fro 2.5.2 to 2.6? I've to reinstall numpy and

Pyjamas 0.3 Release: python-to-javascript compiler and AJAX library

2008-10-02 Thread Luke Kenneth Casson Leighton
Pyjamas 0.3 --- Pyjamas is a python-to-javascript compiler and an AJAX-based Widget toolkit for Web Development (for the sister project, running pyjamas-based apps on the desktop, see http://pyjd.sf.net which is based on http://webkit.org). Pyjamas Applications are written in python, yet

Re: Add vs in-place add of str to list

2008-10-02 Thread Mel
rs387 wrote: On Oct 2, 8:11 am, Erik Max Francis [EMAIL PROTECTED] wrote: It's because the `+=` operator is doing the equivalent of calling the `extend` method, which treats its argument as a generic sequence, and doesn't enforce type. I see. Do you know whether this is seen as a problem

Re: IDLE doesn't run on OSX 10.3.9

2008-10-02 Thread thomascribbs
Now I downloaded the latest Python 2.6 that came out yesterday, and also downloaded the latest ActiveTcl... I run a Terminal, cd /usr/local/bin, and type idle2.6...get this error message: Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/Current/bin/

Re: Python arrays and sting formatting options

2008-10-02 Thread Steven D'Aprano
On Wed, 01 Oct 2008 10:38:12 +, Marc 'BlackJack' Rintsch wrote: The first problem with with is that it looks like the Pascal with statement, but acts nothing like it. That may confuse anyone with Pascal experience, and there are a lot of us out there. But Python is not Pascal either.

code critique requested - just 60 lines

2008-10-02 Thread Terrence Brannon
Hi, I would like some feedback on how you would improve the following program: http://www.bitbucket.org/metaperl/ptc_math/src/21979c65074f/payout.py Basically, using non-strict dictionary keys can lead to bugs, so that worried me. Also, I'm not sure that my code is as crisp and concise as it

Re: Odd Errors

2008-10-02 Thread Steven D'Aprano
On Thu, 02 Oct 2008 18:52:58 +1300, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Steven D'Aprano wrote: On Wed, 01 Oct 2008 22:14:49 +1300, Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], Aaron Castironpi Brady wrote: Do you ever want to scream from the rooftops,

Re: code critique requested - just 60 lines

2008-10-02 Thread Steven D'Aprano
On Thu, 02 Oct 2008 07:51:30 -0700, Terrence Brannon wrote: Hi, I would like some feedback on how you would improve the following program: http://www.bitbucket.org/metaperl/ptc_math/src/21979c65074f/payout.py Well, for starters, I'd say that's the WORST implementation of Quicksort I've

windows help files ?

2008-10-02 Thread Stef Mientki
Hello, I've 2 questions about python help files: 1. how can I launch the windows help file (CHM), from python with a keyword as argument ? 2. now when my program should also run under Linux/Mac, how should I call the help file under Linux/Mac. Going to the website for the help

Re: Add vs in-place add of str to list

2008-10-02 Thread rs387
On Oct 2, 3:50 pm, Mel [EMAIL PROTECTED] wrote: rs387 wrote: I see. Do you know whether this is seen as a problem with the language design? No. OK, I get it now. I was assuming that the + could be implemented in terms of += as follows: def add(x,y): temp = list(x) temp += y

Re: using SSh problem!

2008-10-02 Thread Sean DiZazzo
On Oct 2, 3:27 am, sa6113 [EMAIL PROTECTED] wrote: No, my problem isn't entering password or not ? I want to know what should I do to connect between different platform and copy a file . Lawrence D'Oliveiro wrote: In message [EMAIL PROTECTED], sa6113 wrote: I want to connect form a

set DOS environment variable

2008-10-02 Thread bill
Hi all, Can Python set a DOS environment variable? TIA, Bill -- http://mail.python.org/mailman/listinfo/python-list

Re: set DOS environment variable

2008-10-02 Thread Dan Upton
On Thu, Oct 2, 2008 at 11:18 AM, bill [EMAIL PROTECTED] wrote: Hi all, Can Python set a DOS environment variable? TIA, Bill I'd look at http://www.python.org/doc/2.5.2/lib/os-procinfo.html . It looks like putenv should do what you want. It might only affect the current process and things

Re: RELEASED Python 2.6 final

2008-10-02 Thread konstantin
On Oct 2, 7:46 am, Barry Warsaw [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the release of Python 2.6 final. This is the production-ready version of the latest in the Python

Re: code critique requested - just 60 lines

2008-10-02 Thread bearophileHUGS
Terrence Brannon, I suggest you to shorten a lot some of those very long lines. # http://code.activestate.com/recipes/278259/ def sumDict(d): return reduce(lambda x,y:x+y, d.values()) Not all recipes are good, and that looks bad in various ways. Try this: def sumDictValues(d): return

Re: code critique requested - just 60 lines

2008-10-02 Thread Steven D'Aprano
On Thu, 02 Oct 2008 07:51:30 -0700, Terrence Brannon wrote: Hi, I would like some feedback on how you would improve the following program: http://www.bitbucket.org/metaperl/ptc_math/src/21979c65074f/payout.py Okay, I've read over the code, and tried to guess from context what it is supposed

problem with sockets code

2008-10-02 Thread Daniel
Hello, I can't seem to get my sockets code to work right. Here is what I have inside my RequestHandler handle() function: total_data=[] data = True logger_server.debug(self.__class__.__name__ + ' set data = True') while data:

Re: windows help files ?

2008-10-02 Thread Daniel
On Oct 2, 9:13 am, Stef Mientki [EMAIL PROTECTED] wrote: Hello, I've 2 questions about python help files: 1. how can I launch the windows help file (CHM), from python  with a keyword as argument ? 2. now when my program should also run under Linux/Mac,  how should I call the help file  

Re: Sample code required to validate a xml file against XSD

2008-10-02 Thread Daniel
On Oct 2, 7:32 am, hrishy [EMAIL PROTECTED] wrote: Hi Does anybody have a python xample program to validate a xml file against a XSD. regards Hrisy I just googled python validate a xml file against XSD and found this: http://mail.python.org/pipermail/xml-sig/2003-March/009244.html hope

Re: Database GUI generation from schema

2008-10-02 Thread Eric Wertman
Perhaps are you talking about dabo ? http://www.dabodev.com Yes, that was it. Thanks! I was a little dissapointed to see that the wikipedia entry for that software was deleted. Is dabo not widely used? -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: pylab without X11

2008-10-02 Thread Willem-Jan Vriend
Thanks that worked ! I changed the backend to Agg. Allthough a problem there is that with the backend Agg you only can write the resulting image to a file or a file like object, it does not accept the (apache) request handler to write the file to. And I do not want to save the file to disk

Re: index all instances by id - a memory leak?

2008-10-02 Thread Richard Levasseur
On Oct 1, 10:35 pm, Jason Scheirer [EMAIL PROTECTED] wrote: On Oct 1, 10:01 pm, Dan Barbus [EMAIL PROTECTED] wrote: On Oct 2, 7:54 am, Dan Barbus [EMAIL PROTECTED] wrote:     def getItemById(id):         return _itemsById[id] I just saw that this won't compile. Still, ignoring this,

Re: IDLE doesn't run on OSX 10.3.9

2008-10-02 Thread thomascribbs
Looks like installing TclTkAqua-8.4.10.dmg fixed it...IDLE runs now! -Tom On Oct 1, 9:22 am, Kevin Walzer [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Just did a new install of Tcl/tk from activestate.com and IDLE still not working... -Tom Did you install Tcl/Tk 8.5? It won't

Python equivalent of Perl e flag with regular expression

2008-10-02 Thread Friedman, Jason
I have lines that look like this: select column1, 'select' as type from table where column2 = 'foo' I want to return: SELECT column1, 'select' AS type FROM table WHERE column2 = 'foo' This is SQL with the keywords converted to uppercase. Note that the second select string is not a keyword and

self signing a py2exe winxp executable with signtool

2008-10-02 Thread William Heath
Hi All, I am trying to figure out how to self sign a py2exe winxp executable with signtool. Anyone know? I saw this which looked kind of promising: http://markmail.org/message/zj5nzechzgmjuu7c#query:signtool%20python+page:1+mid:s4jrb2hter4zxvg3+state:results -Tim P.S. Python rocks! --

Re: Database GUI generation from schema

2008-10-02 Thread Peter Decker
On Thu, Oct 2, 2008 at 11:24 AM, Eric Wertman [EMAIL PROTECTED] wrote: Perhaps are you talking about dabo ? http://www.dabodev.com Yes, that was it. Thanks! I was a little dissapointed to see that the wikipedia entry for that software was deleted. Is dabo not widely used? Depends on your

javascript to python

2008-10-02 Thread Joe Hrbek
Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. var dataListener = { data : , onStartRequest: function(request, context){}, onStopRequest: function(request, context, status){

Re: code critique requested - just 60 lines

2008-10-02 Thread Lie Ryan
On Thu, 02 Oct 2008 07:51:30 -0700, Terrence Brannon wrote: Hi, I would like some feedback on how you would improve the following program: http://www.bitbucket.org/metaperl/ptc_math/src/21979c65074f/payout.py Basically, using non-strict dictionary keys can lead to bugs, so that worried me.

Re: javascript to python

2008-10-02 Thread lkcl
On Oct 2, 5:54 pm, Joe Hrbek [EMAIL PROTECTED] wrote: Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. class dataListener: def __init__(self): data = def onStartRequest(self, request, context):

Re: windows help files ?

2008-10-02 Thread Lie Ryan
On Thu, 02 Oct 2008 17:13:50 +0200, Stef Mientki wrote: Hello, I've 2 questions about python help files: Python help files or your program's help files? 1. how can I launch the windows help file (CHM), from python with a keyword as argument ? I'm not really sure, but isn't CHM obsoleted

Re: javascript to python

2008-10-02 Thread Bruno Desthuilliers
Joe Hrbek a écrit : Could someone help me translate to something that would close to it in python? The anonymous functions are giving me problems. var dataListener = { data : , onStartRequest: function(request, context){}, onStopRequest: function(request, context,

Unpickling Exception-type objects

2008-10-02 Thread David McClosky
Hi everyone, I'm stumped over what is probably (hopefully?) a very simple problem. Suppose I have a class that multiply inherits from two classes, call them A and B. A inherits from a class that takes any number of arguments in __init__. B does not inherit from anything and requires one

Python 2.6, GUI not working on vista?

2008-10-02 Thread process
i just downloaded 2.6 and when running the gui nothing happens. anyone else with the same problem? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python equivalent of Perl e flag with regular expression

2008-10-02 Thread Peter Otten
Friedman, Jason wrote: I have lines that look like this: select column1, 'select' as type from table where column2 = 'foo' I want to return: SELECT column1, 'select' AS type FROM table WHERE column2 = 'foo' This is SQL with the keywords converted to uppercase. Note that the second

Re: Python 2.6, GUI not working on vista?

2008-10-02 Thread [EMAIL PROTECTED]
On Oct 2, 2:27 pm, process [EMAIL PROTECTED] wrote: i just downloaded 2.6 and when running the gui nothing happens. anyone else with the same problem? I have no idea what gui you're referring to. However, when I try to run Python on vista, I get: The application has failed to start because

Re: Python equivalent of Perl e flag with regular expression

2008-10-02 Thread George Sakkis
On Oct 2, 1:06 pm, Friedman, Jason [EMAIL PROTECTED] wrote: I have lines that look like this: select column1, 'select' as type from table where column2 = 'foo' I want to return: SELECT column1, 'select' AS type FROM table WHERE column2 = 'foo' This is SQL with the keywords converted to

how to find the directory where python is installed ?

2008-10-02 Thread Stef Mientki
hello, how can I determine the location of the Python installation under winXP / Linux, with a Python program ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 2.6 final

2008-10-02 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 1, 2008, at 11:46 PM, Barry Warsaw wrote: On behalf of the Python development team and the Python community, I am happy to announce the release of Python 2.6 final. This is the production-ready version of the latest in the Python 2

Re: how to find the directory where python is installed ?

2008-10-02 Thread Timothy Grant
On Thu, Oct 2, 2008 at 12:16 PM, Stef Mientki [EMAIL PROTECTED] wrote: hello, how can I determine the location of the Python installation under winXP / Linux, with a Python program ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list This what you're looking

Regular expressions and Unicode

2008-10-02 Thread Jeffrey Barish
I have a regular expression that I use to extract the surname: surname = r'(?u).+ (\w+)' However, when I apply it to this Unicode string, I get only the first 3 letters of the surname: name = 'Anton\xc3\xadn Dvo\xc5\x99\xc3\xa1k' surname_re = re.compile(surname) m = surname_re.search(name)

Re: how to find the directory where python is installed ?

2008-10-02 Thread Stef Mientki
Timothy Grant wrote: On Thu, Oct 2, 2008 at 12:16 PM, Stef Mientki [EMAIL PROTECTED] wrote: hello, how can I determine the location of the Python installation under winXP / Linux, with a Python program ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: why? __builtins__ key added from eval

2008-10-02 Thread Lie Ryan
On Tue, 30 Sep 2008 16:04:34 -0500, William Purcell wrote: I want to use eval to evaluate wx.TextCtrl inputs. How can I keep python from adding the __builtins__ key to mydict when I use it with eval? Other wise I have to __delitem__('__builtins__') everytime I use eval? mydict =

questions from a lost sheep

2008-10-02 Thread Joe Strout
Hi all, I used to by a big Python fan, many years ago [1]. I stopped using it after discovering REALbasic, because my main developmental need is to write desktop applications that are as native as possible on each platform, and because I really like a strongly-typed language with a good

tkinter textwidget problem

2008-10-02 Thread kib2
Hi, In a tkinter TextWidget I would like to retrieve the last typed word. I've tried this with the 'wordstart' Expression [From the effbot site, wordstart and wordend moves the index to the beginning (end) of the current word. Words are sequences of letters, digits, and underline, or single

Re: questions from a lost sheep

2008-10-02 Thread Chris Mellon
On Thu, Oct 2, 2008 at 2:22 PM, Joe Strout [EMAIL PROTECTED] wrote: Hi all, I used to by a big Python fan, many years ago [1]. I stopped using it after discovering REALbasic, because my main developmental need is to write desktop applications that are as native as possible on each platform,

Re: Python equivalent of Perl e flag with regular expression

2008-10-02 Thread skip
Jason With Perl I might do something like this: Jason $line =~ s/(select)/uc($1)/e; ... Jason How would I do this with Python? I'm sure there are plenty of ways to skin this particular cat, but how is 's/.../.../e' different from 's/.../.../'? (For those of us who are not Perl

Tkinter Entry blocked by tkFileDialog

2008-10-02 Thread Leonhard Vogt
Hello I have the following problem in Python 2.5 on Windows XP. On Ubuntu I do not see the problem. I have a Tkinter application as in the following example The entry-widget is somehow blocked (i cannot type characters into it) when I call askopenfilename before I create the widget. Calling

Re: Regular expressions and Unicode

2008-10-02 Thread skip
Jeffrey However, when I apply it to this Unicode string, I get only the Jeffrey first 3 letters of the surname: Jeffrey name = 'Anton\xc3\xadn Dvo\xc5\x99\xc3\xa1k' Maybe name = unicode('Anton\xc3\xadn Dvo\xc5\x99\xc3\xa1k', utf-8) ? Yup, that works: name =

Re: Regular expressions and Unicode

2008-10-02 Thread Peter Otten
Jeffrey Barish wrote: I have a regular expression that I use to extract the surname: surname = r'(?u).+ (\w+)' However, when I apply it to this Unicode string, I get only the first 3 letters of the surname: name = 'Anton\xc3\xadn Dvo\xc5\x99\xc3\xa1k' That's a byte string. You can

Re: questions from a lost sheep

2008-10-02 Thread skip
Joe I've started to think fondly of the rock-solid stability of Python, Joe and have been wondering if perhaps aggressive unit testing could Joe mitigate most of the problems of weak typing. Note: Python is not weakly typed. It is dynamically typed. But, yes, there is no

Inheritance but only partly?

2008-10-02 Thread process
Let's say I have a class X which has 10 methods. I want class Y to inherit 5 of them. Can I do that? Can I do something along the lines of super(Y, exclude method 3 4 7 9 10) ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Inheritance but only partly?

2008-10-02 Thread Gary Herron
process wrote: Let's say I have a class X which has 10 methods. I want class Y to inherit 5 of them. Can I do that? Can I do something along the lines of super(Y, exclude method 3 4 7 9 10) ? -- http://mail.python.org/mailman/listinfo/python-list No. But why do yo care? You can

  1   2   3   >