Re: Unexpected python exception

2009-11-13 Thread Gabriel Genellina
En Wed, 11 Nov 2009 11:11:31 -0300, Ralax escribió: On Nov 11, 6:59 pm, Richard Purdie wrote: def B(): os.stat("/") import os Traceback (most recent call last): File "./test.py", line 12, in B() File "./test.py", line 8, in B os.stat("/") UnboundLocalError: local variab

Re: python simply not scaleable enough for google?

2009-11-13 Thread Steven D'Aprano
On Fri, 13 Nov 2009 04:48:59 -0600, Tim Chase wrote: > There might be some stand-alone news-readers that aren't smart enough to > support word-wrapping/line-breaking, in which case, join the 80's and > upgrade to one that does. Of course I can change my software. That fixes the problem for me. Or

Re: #define (from C) in Python

2009-11-13 Thread Santiago Romero
> > #define STORE_nn_rr(dreg) \ > >                         r_opl = Z80ReadMem(r_PC); r_PC++;\ > >                         r_oph = Z80ReadMem(r_PC); r_PC++; \ > >                         r_tmp = dreg; \ > >                         Z80WriteMem((r_op),r_tmpl, regs); \ > >                         Z80

Re: questions regarding stack size use for multi-threaded python programs

2009-11-13 Thread Gabriel Genellina
En Mon, 09 Nov 2009 16:05:31 -0300, Eyal Gordon escribió: background: we are using python 2.4.3 on CentOS 5.3 with many threads - and our shell's default stack size limit is set to 10240KB (i.e. ~10MB). we noticed that python's Threading module appears to create threads with this value as t

Re: Python C API and references

2009-11-13 Thread Gabriel Genellina
En Thu, 12 Nov 2009 06:23:54 -0300, lallous escribió: Everytime I use PyObject_SetAttrString(obj, attr_name, py_val) and I don't need the reference to py_val I should decrement the reference after this call? If you own a reference to py_val, and you don't need it anymore, you must decremen

Re: 2to3 ParseError with UTF-8 BOM

2009-11-13 Thread Gabriel Genellina
En Fri, 06 Nov 2009 14:12:57 -0300, Farshid escribió: On Nov 5, 7:18 pm, Benjamin Peterson wrote: Try the 2to3 distributed in Python 3.1. I get the same error with the 2to3 script in Python 3.1 Reported as http://bugs.python.org/issue7313 -- Gabriel Genellina -- http://mail.python.org/m

Re: Writing an emulator in python - implementation questions (for performance)

2009-11-13 Thread Santiago Romero
I'm going to quote all the answers in a single post, if you all don't mind: > [greg] > But keep in mind that named "constants" at the module level > are really global variables, and therefore incur a dictionary > lookup every time they're used. > > For maximum speed, nothing beats writing the nu

Re: A beginner question about GUI use and development

2009-11-13 Thread Vladimir Ignatov
Hi, I have working with wxPython since about 2003 and still have a "mixed" feeling about it. Periodically I was catched in some traps especially in graphics-related parts of my code (just one example: try to find documentation about DC.Blit behaviour then UserScale != 1.0). For fresh-starters I

Re: 3.x and 2.x on same machine (is this info at Python.org??)

2009-11-13 Thread Dave Angel
Dan Bishop wrote: On Nov 12, 1:52 pm, rantingrick wrote: Hello, Currently i am using 2.6 on Windows and need to start writing code in 3.0. I cannot leave 2.x yet because 3rd party modules are still not converted. So i want to install 3.0 without disturbing my current Python2.x. What i'm afr

Re: python simply not scaleable enough for google?

2009-11-13 Thread Tim Chase
Steven D'Aprano wrote: Vincent, could you please fix your mail client, or news client, so that it follows the standard for mail and news (that is, it has a hard-break after 68 or 72 characters? This seems an awfully curmudgeonly reply, given that word-wrapping is also client-controllable. Eve

bootstrapping on machines without Python

2009-11-13 Thread Jonathan Hartley
While examining py2exe et al of late, my thoughts keep returning to the idea of writing, in C or similar, a compiled stand-alone executable 'bootstrapper', which: 1) downloads and install a Python interpreter if none exists 2) runs the application's Python source code using this interpreter. An ap

Re: A beginner question about GUI use and development

2009-11-13 Thread Enrico
"uap12" ha scritto nel messaggio news:1a446fef-4250-4152-8c30-cfe2edb61...@j4g2000yqe.googlegroups.com... > Hi! > I have written som Python programs but no one with a GUI yet, > i have look around and found a lot of diffrent gui module. > > I will develop program that will use a small amout of GUI

Re: A beginner question about GUI use and development

2009-11-13 Thread Marcus Gnaß
uap12 wrote: > When i givet the program away i like to pack it, so the enduser > just run it, i don't like to tell the user to install Python, and/or > som GUI package. is this possible. So Tkinter would be your choice, cause its shipped with Python ... > In the beginning it is okej to code the

Re: Linux, Python 2.5.2, serverless binding LDAP?

2009-11-13 Thread Michael Ströder
Kevin Cole wrote: > On Nov 12, 8:01 pm, alex23 wrote: >> On Nov 13, 10:47 am, Kevin Cole wrote: >>> I recently asked our IT department how to gain access to an >>> addressbook. After carefully explaining that I was on a Linux system >>> using Python, I got the reply: >>> "You should use our LDAP

Choosing GUI Module for Python

2009-11-13 Thread Dylan Palmboom
-Original Message- From: catalinf...@gmail.com [mailto:catalinf...@gmail.com] Sent: 13 November 2009 10:06 AM To: python-list@python.org Subject: Re: Choosing GUI Module for Python Tkinter is deafult on python . Is more easy to use any editor text (geany). I don?t see a good IDE for GUI O

Re: open source linux -> windows database connectivity?

2009-11-13 Thread M.-A. Lemburg
Tony Schmidt wrote: >> Note: The client part of this product is free. You only need to >> get a license for the server part. > > Yeah, but don't I need the server part to make the connection? Sure, but you don't need to get a license per client, unlike for e.g. the combination mxODBC + EasySoft O

A beginner question about GUI use and development

2009-11-13 Thread uap12
Hi! I have written som Python programs but no one with a GUI yet, i have look around and found a lot of diffrent gui module. I will develop program that will use a small amout of GUI part eg. program to show status about server etc. I have looked att wxWidget, but i like a rekommendation here (Wi

Re: #define (from C) in Python

2009-11-13 Thread Ulrich Eckhardt
Santiago Romero wrote: > Well, In the above concrete example, that would work, but I was > talking for multiple code lines, like: > > > #define LD_r_n(reg) (reg) = Z80ReadMem(r_PC++) > > #define LD_rr_nn(reg) r_opl = Z80ReadMem(r_PC); r_PC++; \ > r_oph = Z80ReadMem(r_PC

Re: Writing an emulator in python - implementation questions (for performance)

2009-11-13 Thread Santiago Romero
> How about >     page, index = divmod(address, 16384) Surely, much better and faster :-) Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: Create video with text?

2009-11-13 Thread catalinf...@gmail.com
On Nov 12, 9:24 am, AK wrote: > Hi, what would be the best python package (or a framework that can be > scripted in python) that can make a video with text moving around, > jumping, zooming in/out and various other text effects? See the > following link for an example: > >

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Richard Heathfield
In , Alf P. Steinbach wrote: > But in reality the intellectual challenge of something in the > traditional "basic" category can be greater than for something > conventionally regarded as "advanced". And consequently is much harder to teach. I have nothing but admiration for primary school childr

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Alf P. Steinbach
* Peter Nilsson: "Alf P. Steinbach" wrote: One reaction to http://preview.tinyurl.com/ProgrammingBookP3> has been that turtle graphics may be off-putting to some readers because it is associated with children's learning. [I'll be honest and say that I merely glanced at the two pdf files.] Wh

Re: Choosing GUI Module for Python

2009-11-13 Thread catalinf...@gmail.com
Tkinter is deafult on python . Is more easy to use any editor text (geany). I donțt see a good IDE for GUI On Nov 9, 6:49 am, Antony wrote: > Hi all >    I just wanted to know which module is best for developing designing > interface in python . > i have come across some modules which are listed h

<    1   2