[ANN] ftputil 2.4.2 released

2009-11-13 Thread Stefan Schwarzer
ftputil 2.4.2 is now available from http://ftputil.sschwarzer.net/download . Changes since version 2.4.1 --- - Some FTP servers seem to have problems using *any* directory argument which contains slashes. The new default for FTP commands now is to change into the

ANN: ActivePython 2.6.4.8 is now available

2009-11-13 Thread Sridhar Ratnakumar
I'm happy to announce that ActivePython 2.6.4.8 is now available for download from: http://www.activestate.com/activepython/ This is a patch release that updates ActivePython to core Python 2.6.4. We recommend that you try 2.6 version first. See the release notes for full details:

Poll on PyPI rating system

2009-11-13 Thread Martin v. Löwis
PyPI (pypi.python.org) recently got a rating system which includes the option of posting comments about a package release also. Several people have expressed a strong dislike of that system and want to see it changed or removed. In order to find out what the community thinks, we are now performing

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 anthonir...@gmail.com wrote: Hi all    I just wanted to know which module is best for developing designing interface in python . i have come across some modules

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Alf P. Steinbach
* Peter Nilsson: Alf P. Steinbach al...@start.no wrote: One reaction to url: url: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

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Richard Heathfield
In hdj4aj$7k...@news.eternal-september.org, 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

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

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

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

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

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 wuwe...@gmail.com wrote: On Nov 13, 10:47 am, Kevin Cole dc.l...@gmail.com 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

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 gui

Re: A beginner question about GUI use and development

2009-11-13 Thread Enrico
uap12 anders.u.pers...@gmail.com 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

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

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.

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 rantingr...@gmail.com 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

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

Re: 2to3 ParseError with UTF-8 BOM

2009-11-13 Thread Gabriel Genellina
En Fri, 06 Nov 2009 14:12:57 -0300, Farshid fla...@gmail.com escribió: On Nov 5, 7:18 pm, Benjamin Peterson benja...@python.org 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

Re: Python C API and references

2009-11-13 Thread Gabriel Genellina
En Thu, 12 Nov 2009 06:23:54 -0300, lallous lall...@lgwm.org 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,

Re: Python Go

2009-11-13 Thread Duncan Booth
Paul Rubin http://phr...@nospam.invalid wrote: Nah, exceptions are an ugly effect that gets in the way of parallelism. Haskell handles lookups through its type system; dealing with lookup errors (say by chaining the Maybe type) is clean and elegant. Erlang handles it by crashing the

Re: Unexpected python exception

2009-11-13 Thread Gabriel Genellina
En Wed, 11 Nov 2009 11:11:31 -0300, Ralax ralaxmys...@gmail.com escribió: On Nov 11, 6:59 pm, Richard Purdie rpur...@rpsys.net wrote: def B(): os.stat(/) import os Traceback (most recent call last): File ./test.py, line 12, in module B() File ./test.py, line 8, in B

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 eyal.gor...@gmail.com 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

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); \                        

object indexing and item assignment

2009-11-13 Thread King
class MyFloat(object): def __init__(self, value=0.): self.value = value def set(self, value): self.value = value def get(self): return self.value class MyColor(object): def __init__(self, value=(0,0,0)): self.value = (MyFloat(value[0]),

Re: #define (from C) in Python

2009-11-13 Thread Bearophile
Santiago Romero: Obviously, I prefer to write well structured code but I had to sacrifize SIZE by SPEED In C99 you have inline (and gcc/gcc-llvm usually inline small functions anyway) that helps avoid many macros.  Now I'm porting the emulator to a scripted language, so I need even more

Re: object indexing and item assignment

2009-11-13 Thread Benjamin Kaplan
On Fri, Nov 13, 2009 at 7:57 AM, King animator...@gmail.com wrote: class MyFloat(object):    def __init__(self, value=0.):        self.value = value    def set(self, value):        self.value = value    def get(self):        return self.value class MyColor(object):    def

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

2009-11-13 Thread Gabriel Genellina
En Thu, 12 Nov 2009 23:29:03 -0300, greg g...@cosc.canterbury.ac.nz escribió: Carl Banks wrote: You can define constants to access specific registers: R1L = 1 R1H = 2 R1 = 1 breg[R1H] = 2 print wreg[R1] But keep in mind that named constants at the module level are really global variables,

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

2009-11-13 Thread Bearophile
Try creation an extension module with ShedSkin. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: #define (from C) in Python

2009-11-13 Thread garabik-news-2005-05
Santiago Romero srom...@gmail.com wrote: #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);

Re: bootstrapping on machines without Python

2009-11-13 Thread Tim Golden
Jonathan Hartley wrote: 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

Re: A beginner question about GUI use and development

2009-11-13 Thread Philip Semanchuk
On Nov 13, 2009, at 3:55 AM, uap12 wrote: 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

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread BGB / cr88192
Peter Nilsson ai...@acay.com.au wrote in message news:ed7d74f6-c84d-40f1-a06b-642f988fb...@x25g2000prf.googlegroups.com... Alf P. Steinbach al...@start.no wrote: One reaction to url: url:http://preview.tinyurl.com/ProgrammingBookP3 has been that turtle graphics may be off-putting to some

Re: bus error in Py_Finalize with ctypes imported

2009-11-13 Thread Robin
On Nov 13, 2:14 pm, Robin robi...@gmail.com wrote: I am trying to embed Python in a MATLAB mex function. This is loaded into the MATLAB interpreter - I would like the Python interpreter to be initialized once and stay there for future calls. I added a call to Py_Finalize as a mexAtExit handler

Re: bootstrapping on machines without Python

2009-11-13 Thread Martin P. Hellwig
Jonathan Hartley wrote: 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

tkFileDialog question

2009-11-13 Thread Matt Mitchell
Hi, This is my first attempt to write a script with any kind of gui. All I need the script to do is ask the user for a directory and then do stuff with the files in that directory. I used tkFileDialog.askdirectory(). It works great but it pops up an empty tk window. Is there any way to

bus error in Py_Finalize with ctypes imported

2009-11-13 Thread Robin
Hi, I am trying to embed Python in a MATLAB mex function. This is loaded into the MATLAB interpreter - I would like the Python interpreter to be initialized once and stay there for future calls. I added a call to Py_Finalize as a mexAtExit handler which is called when the library is unloaded in

Re: Does turtle graphics have the wrong associations?

2009-11-13 Thread Jonathan Campbell
Alf P. Steinbach wrote: One reaction to url: url: 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. Incidentally ... something you may wish to consider for inclusion in you book

Vote on PyPI comments

2009-11-13 Thread Chris Withers
Hi All, Apologies for the cross post, but I'm not sure this has received the publicity it deserves... PyPI grew a commenting and rating system a while back, apparently in response to requests from users. However, since it's been rolled out, there's been a backlash from package maintainers

Re: Vote on PyPI comments

2009-11-13 Thread Michele Simionato
On Nov 13, 4:39 pm, Chris Withers ch...@simplistix.co.uk wrote: PyPI grew a commenting and rating system a while back, apparently in response to requests from users. However, since it's been rolled out, there's been a backlash from package maintainers who already have mailing lists, bug

Re: ANN: esky 0.2.1

2009-11-13 Thread Aahz
In article mailman.344.1258083604.2873.python-l...@python.org, Ryan Kelly r...@rfk.id.au wrote: Esky is an auto-update framework for frozen python apps, built on top of bbfreeze. It provides a simple API through which apps can find, fetch and install updates, and a bootstrapping mechanism that

Adding methods to an object instance

2009-11-13 Thread lallous
Hello class __object(object): def __getitem__(self, idx): return getattr(self, idx) class __dobject(object): pass x = __object() setattr(x, 0, hello) print x[0] y = __dobject(a=1,b=2) setattr(y, 0, world) #print y[0] How can I, given an object of instance __dobject, add to that

Re: wsgi with separate css file

2009-11-13 Thread Rami Chowdhury
On Fri, 13 Nov 2009 08:34:57 -0800, Alena Bacova athenk...@gmail.com wrote: Hi all, I just wanted to know if anybody tried using wsgi as a web server that would be serving html file with separate css file. I managed to make my wsgi server display only on html file ( it has got the form

wsgi with separate css file

2009-11-13 Thread Alena Bacova
Hi all, I just wanted to know if anybody tried using wsgi as a web server that would be serving html file with separate css file. I managed to make my wsgi server display only on html file ( it has got the form tag, and I'm serving do_get and do_post call to) but I would like to have formatting

Re: Adding methods to an object instance

2009-11-13 Thread Bruno Desthuilliers
lallous a écrit : Hello class __object(object): ot the convention for reusing reserved words as identifiers is to *suffix* them with a single underscore, ie: class object_(object): # /ot def __getitem__(self, idx): return getattr(self, idx) class __dobject(object): pass x

object serialization as python scripts

2009-11-13 Thread King
I have looked upon various object serialization de-serialization techniques. (shelve, pickle, anydbm, custom xml format etc.) What I personally feel that instead of all these methods for saving the objects it would be easier to save the data as python scripts itself. In this case, loading the data

Dynamic property names on class

2009-11-13 Thread Bryan
I have several properties on a class that have very similar behavior. If one of the properties is set, all the other properties need to be set to None. So I wanted to create these properties in a loop like: class Test(object): for prop in ['foo', 'bar', 'spam']: #

[ANN] pyOpenSSL 0.10

2009-11-13 Thread exarkun
I'm happy to announce the release of pyOpenSSL 0.10. pyOpenSSL 0.10 exposes several more OpenSSL APIs, including support for running TLS connections over in-memory BIOs, access to the OpenSSL random number generator, the ability to pass subject and issuer parameters when creating an

Re: object serialization as python scripts

2009-11-13 Thread Diez B. Roggisch
King schrieb: I have looked upon various object serialization de-serialization techniques. (shelve, pickle, anydbm, custom xml format etc.) What I personally feel that instead of all these methods for saving the objects it would be easier to save the data as python scripts itself. In this case,

Re: Dynamic property names on class

2009-11-13 Thread Diez B. Roggisch
Bryan schrieb: I have several properties on a class that have very similar behavior. If one of the properties is set, all the other properties need to be set to None. So I wanted to create these properties in a loop like: class Test(object): for prop in ['foo', 'bar', 'spam']:

Re: object indexing and item assignment

2009-11-13 Thread John Posner
King wrote: class MyFloat(object): def __init__(self, value=0.): self.value = value def set(self, value): self.value = value def get(self): return self.value class MyColor(object): def __init__(self, value=(0,0,0)): self.value =

Re: Dynamic property names on class

2009-11-13 Thread Bryan
On Nov 13, 9:34 am, Diez B. Roggisch de...@nospam.web.de wrote: Bryan schrieb: I have several properties on a class that have very similar behavior. If one of the properties is set, all the other properties need to be set to None.  So I wanted to create these properties in a loop like:

Re: Unexpected python exception

2009-11-13 Thread Tino Wildenhain
Am 11.11.2009 15:29, schrieb Richard Purdie: On Wed, 2009-11-11 at 05:04 -0800, Chris Rebert wrote: On Wed, Nov 11, 2009 at 4:37 AM, Richard Purdierpur...@rpsys.net wrote: snip Is there a way to make the global x apply to all functions without adding it to each one? Thankfully, no. Hmm

Re: object serialization as python scripts

2009-11-13 Thread King
Why is it easier than the above mentioned - they are *there* (except the custom xml), and just can be used. What don't they do you want to do? Other than that, and even security issues put aside, I don't see much difference between pickle and python code, except the latter being more

Re: object serialization as python scripts

2009-11-13 Thread Chris Rebert
On Fri, Nov 13, 2009 at 10:26 AM, King animator...@gmail.com wrote: Why is it easier than the above mentioned - they are *there* (except the custom xml), and just can be used. What don't they do you want to do? Other than that, and even security issues put aside, I don't see much difference

converting latitude and longitude

2009-11-13 Thread Ronn Ross
I'm attempting to convert latitude and longitude coordinates from degrees minutes and second to decimal form. I would like to go from: N39 42 36.3 W77 42 51.5 to: -77.739855,39.70 Does anyone know of a library or some existing out their to help with this conversion? --

[no subject]

2009-11-13 Thread Ronn Ross
I'm attempting to convert latitude and longitude coordinates from degrees minutes and second to decimal form. I would like to go from: N39 42 36.3 W77 42 51.5 to: -77.739855,39.70 Does anyone know of a library or some existing out their to help with this conversion? --

Re: Vote on PyPI comments

2009-11-13 Thread Daniel Fetchinson
PyPI grew a commenting and rating system a while back, apparently in response to requests from users. However, since it's been rolled out, there's been a backlash from package maintainers who already have mailing lists, bug trackers, etc for their packages and don't want to have to try and

Re: converting latitude and longitude

2009-11-13 Thread MRAB
Ronn Ross wrote: I'm attempting to convert latitude and longitude coordinates from degrees minutes and second to decimal form. I would like to go from: N39 42 36.3 W77 42 51.5 to: -77.739855,39.70 Does anyone know of a library or some existing out their to help with this conversion?

Re: bootstrapping on machines without Python

2009-11-13 Thread M.-A. Lemburg
Jonathan Hartley wrote: 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

Python 2.6.3 TarFile Module Add odd behavior

2009-11-13 Thread Tilson, Greg (IS)
In Windows Python 2.6.3 calling TarFile.add requires arcname= to be set to work with WinZIP or WinRAR Documentation reads: TarFile.add(name, arcname=None, recursive=True, exclude=None) Add the file name to the archive. name may be any type of file (directory, fifo, symbolic link, etc.). If

Re: Dynamic property names on class

2009-11-13 Thread Diez B. Roggisch
Bryan schrieb: On Nov 13, 9:34 am, Diez B. Roggisch de...@nospam.web.de wrote: Bryan schrieb: I have several properties on a class that have very similar behavior. If one of the properties is set, all the other properties need to be set to None. So I wanted to create these properties in a

Re: Vote on PyPI comments

2009-11-13 Thread Diez B. Roggisch
Michele Simionato schrieb: On Nov 13, 4:39 pm, Chris Withers ch...@simplistix.co.uk wrote: PyPI grew a commenting and rating system a while back, apparently in response to requests from users. However, since it's been rolled out, there's been a backlash from package maintainers who already have

Re: run all scripts in sub-directory as subroutines?

2009-11-13 Thread Tobiah
This works fine, but in the sub-modules the sys.path appropriately returns the same as from the parent, I want them to know their own file names. How?? I can pass it to them, but wondered if there is a more self-sufficient way for a module to know from where it was invoked. I like the idea

Re: python simply not scaleable enough for google?

2009-11-13 Thread Aaron Watters
On Nov 11, 3:15 pm, Terry Reedy tjre...@udel.edu wrote: Robert P. J. Day wrote: I can imagine a day when code compiled from Python is routinely time-competitive with hand-written C. That time is now, in many cases. I still stand by my strategy published in Unix World ages ago: get it working

Re: Psyco on 64-bit machines

2009-11-13 Thread Russ P.
On Nov 12, 12:06 pm, Russ P. russ.paie...@gmail.com wrote: I have a Python program that runs too slow for some inputs. I would like to speed it up without rewriting any code. Psyco seemed like exactly what I need, until I saw that it only works on a 32-bit architecture. I work in an

Re: python simply not scaleable enough for google?

2009-11-13 Thread Brian J Mingus
On Fri, Nov 13, 2009 at 12:19 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Thu, 12 Nov 2009 22:20:11 -0800, Vincent Manis wrote: When I was approximately 5, everybody knew that higher level languages were too slow for high-speed numeric computation (I actually didn't

RE: tkFileDialog question

2009-11-13 Thread Matt Mitchell
--- The information contained in this electronic message and any attached document(s) is intended only for the personal and confidential use of the designated recipients named above. This message may be confidential. If the reader of this message is not the

Re: bootstrapping on machines without Python

2009-11-13 Thread Thomas Heller
M.-A. Lemburg schrieb: Jonathan Hartley wrote: 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

2.6.4 Mac x86_64 ?

2009-11-13 Thread chris grebeldinger
Hi All, I've been having some trouble getting a x86_64/i386 universal readline.so to build against libedit, on MacOS 10.5.6 as Apple does. Does anyone have any pointers about what changes I need to make to setup.py or readline.c to achive this? Has someone already done this and would like to share

Re: A beginner question about GUI use and development

2009-11-13 Thread CM
On Nov 13, 3:55 am, uap12 anders.u.pers...@gmail.com wrote: 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.

Re: wsgi with separate css file

2009-11-13 Thread Aaron Watters
RE: serving static CSS files using WSGI ...However, this method is fragile and very inefficient. If you want to   eventually deploy this application somewhere, I would suggest starting   with a different method. The WHIFF WSGI tools are meant to make this kind of thing easy. In fact the

Re: python simply not scaleable enough for google?

2009-11-13 Thread Terry Reedy
Aaron Watters wrote: On Nov 11, 3:15 pm, Terry Reedy tjre...@udel.edu wrote: Robert P. J. Day wrote: I can imagine a day when code compiled from Python is routinely time-competitive with hand-written C. That time is now, in many cases. By routinely, I meant ***ROUTINELY***, as in C become

Re: New syntax for blocks

2009-11-13 Thread Bruno Desthuilliers
r a écrit : On Nov 12, 7:44 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote Oh, but those hundreds of thousands of man-hours lost to bugs caused by assignment-as-an-expression is nothing compared to the dozens of man- minutes saved by having one fewer line of code! OK, what

Re: converting latitude and longitude

2009-11-13 Thread ezd
On Nov 13, 2:25 pm, MRAB pyt...@mrabarnett.plus.com wrote: Ronn Ross wrote: I'm attempting to convert latitude and longitude coordinates from ... Does anyone know of a library or some existing out their to help with this conversion? Some time ago I saw file named LLUTM... for such

Re: The ol' [[]] * 500 bug...

2009-11-13 Thread Jon Clements
On 13 Nov, 21:26, kj no.em...@please.post wrote: ...just bit me in the fuzzy posterior.  The best I can come up with is the hideous   lol = [[] for _ in xrange(500)] Is there something better?   That's generally the accepted way of creating a LOL. What did one do before comprehensions

Re: QuerySets in Dictionaries

2009-11-13 Thread scoopseven
On Nov 12, 8:55 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 12 Nov 2009 10:39:33 -0800, scoopseven wrote: I need to create a dictionary of querysets.  I have code that looks like: query1 = Myobject.objects.filter(status=1) query2 =

Re: New syntax for blocks

2009-11-13 Thread Bruno Desthuilliers
r a écrit : On Nov 12, 2:37 pm, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Oh i get it now! If i assign a valid value to a variable the variable is also valid...thats...thats... GENUIS! *sarcasm* It's not about assigning a valid value to a variable, it's about the

Re: bootstrapping on machines without Python

2009-11-13 Thread mmanns
On Fri, 13 Nov 2009 02:40:28 -0800 (PST) Jonathan Hartley tart...@tartley.com wrote: Even my very limited understanding of the issues is enough to see that the idea is far from trivial. [...] In the long run, to be useful for real projects, the bootstrapper would need to manage some nasty

Re: QuerySets in Dictionaries

2009-11-13 Thread Jerry Hill
On Fri, Nov 13, 2009 at 5:10 PM, scoopseven mark.ke...@gmail.com wrote: I actually had a queryset that was dynamically generated, so I ended up having to use the eval function, like this... d = {} for thing in things: query_name = 'thing_' + str(thing.id) query_string =

Re: #define (from C) in Python

2009-11-13 Thread Santiago Romero
Hey, I got 100% with ASM ZX Spectrum emulator on a low end 386 :-) (I do not remember the CPU freqeuncy anymore, maybe 25MHz). Yes, in ASM a simple 25 or 33Mhz 386 computer was able to emulate the Spectrum. At least, under MSDOS, like did Warajevo, Z80, x128 and Spectrum from Pedro Gimeno.

__import__ returns module without it's attributes?

2009-11-13 Thread Zac Burns
I've overloaded __import__ to modify modules after they are imported... but running dir(module) on the result only returns __builtins__, __doc__, __file__, __name__, __package__, and __path__. Why is this? More importantly, where can I hook in that would allow me to see the contents of the

Re: ANN: esky 0.2.1

2009-11-13 Thread Ryan Kelly
Recently I was looking into distribution mechanisms, and I passed over bbfreeze because I saw no indication that Python 2.6 was supported. Not sure if it's officially supported, but I do most of my development on Python 2.6 and bbfreeze hasn't given me any problems as yet. Also,

Compiler malware rebutted

2009-11-13 Thread Aahz
Ken Thompson's classic paper on bootstrapped malware finally gets a rebuttal: http://lwn.net/Articles/360040/ -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ [on old computer technologies and programmers] Fancy tail fins on a brand new '59 Cadillac didn't mean

A terminators' club for clp

2009-11-13 Thread kj
This is meta-question about comp.lang.python. I apologize in advance if it has been already discussed. Also, I don't know enough about the underlying mechanics of comp.lang.python, so this may be *totally unfeasible*, but how about giving a few bona fide *and frequent* clp posters the ability

Re: python simply not scaleable enough for google?

2009-11-13 Thread Paul Rubin
Tim Chase python.l...@tim.thechases.com writes: Or even just pipe to your text editor of choice: vi, emacs, ed, cat, and even Notepad has a wrap long lines sort of setting or does the right thing by default (okay, so cat relies on your console to do the wrapping, but it does wrap). No, auto

Re: A terminators' club for clp

2009-11-13 Thread Paul Rubin
kj no.em...@please.post writes: frequent* clp posters the ability to *easily* delete spam from the comp.lang.python server? Um, this is usenet; there is no comp.lang.python server. Are you saying you want a moderated newsgroup? Hmm, maybe this group is busy enough that there is some merit to

Re: A terminators' club for clp

2009-11-13 Thread r
On Nov 13, 5:29 pm, kj no.em...@please.post wrote: This is meta-question about comp.lang.python.  I apologize in advance if it has been already discussed.  Also, I don't know enough about the underlying mechanics of comp.lang.python, so this may be *totally unfeasible*, but how about giving a

Re: Compiler malware rebutted

2009-11-13 Thread David M. Besonen
On 11/13/2009 3:26 PM, Aahz wrote: Ken Thompson's classic paper on bootstrapped malware finally gets a rebuttal: http://lwn.net/Articles/360040/ thanks for pointing this out. -- david -- http://mail.python.org/mailman/listinfo/python-list

Re: New syntax for blocks

2009-11-13 Thread r
On Nov 13, 3:20 pm, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: (...snip...) I think because (like me) Carl put's the language before sewing circles. I think it's just personal like all the times before, Well, to be true, you did manage to make a clown of yourself

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

2009-11-13 Thread Andrew MacIntyre
Gabriel Genellina wrote: En Mon, 09 Nov 2009 16:05:31 -0300, Eyal Gordon eyal.gor...@gmail.com 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

Re: ANN: esky 0.2.1

2009-11-13 Thread Aahz
In article mailman.391.1258154934.2873.python-l...@python.org, Ryan Kelly r...@rfk.id.au wrote: Out of curiosity, what freezer package did you settle on in the end? I'm curious it see if esky could easily switch between different freezers (although it currently depends on some rather deep

Re: Compiler malware rebutted

2009-11-13 Thread Aahz
In article mailman.392.1258160060.2873.python-l...@python.org, David M. Besonen dav...@panix.com wrote: On 11/13/2009 3:26 PM, Aahz wrote: Ken Thompson's classic paper on bootstrapped malware finally gets a rebuttal: http://lwn.net/Articles/360040/ thanks for pointing this out. Actually, I

Re: python simply not scaleable enough for google?

2009-11-13 Thread Robert Brown
Vincent Manis vma...@telus.net writes: On 2009-11-11, at 14:31, Alain Ketterlin wrote: I'm having some trouble understanding this thread. My comments aren't directed at Terry's or Alain's comments, but at the thread overall. 1. The statement `Python is slow' doesn't make any sense to me.

Re: python simply not scaleable enough for google?

2009-11-13 Thread Robert Brown
Vincent Manis vma...@telus.net writes: My point in the earlier post about translating Python into Common Lisp or Scheme was essentially saying `look, there's more than 30 years experience building high-performance implementations of Lisp languages, and Python isn't really that different from

Re: query regarding file handling.

2009-11-13 Thread Rhodri James
On Thu, 12 Nov 2009 09:59:40 -, ankita dutta ankita.dutt...@gmail.com wrote: hi all, i have a file of 3x3 matrix of decimal numbers(tab separated). like this : 0.020.380.01 0.040.320.00 0.030.400.02 now i want to read 1 row and get the sum of a particular

Re: python simply not scaleable enough for google?

2009-11-13 Thread Robert Brown
J Kenneth King ja...@agentultra.com writes: mcherm mch...@gmail.com writes: I think you have a fundamental misunderstanding of the reasons why Python is slow. Most of the slowness does NOT come from poor implementations: the CPython implementation is extremely well-optimized; the Jython and

Re: python simply not scaleable enough for google?

2009-11-13 Thread Vincent Manis
On 2009-11-13, at 12:46, Brian J Mingus wrote: You're joking, right? Try purchasing a computer manufactured in this millennium. Monitors are much wider than 72 characters nowadays, old timer. I have already agreed to make my postings VT100-friendly. Oh, wait, the VT-100, or at least some

Re: python simply not scaleable enough for google?

2009-11-13 Thread Vincent Manis
On 2009-11-13, at 15:32, Paul Rubin wrote: This is Usenet so please stick with Usenet practices. Er, this is NOT Usenet. 1. I haven't, to the best of my recollection, made a Usenet post in this millennium. 2. I haven't fired up a copy of rn or any other news reader in at least 2

  1   2   >