November 20 Webinar: Interpolation with NumPy/SciPy

2009-11-15 Thread Amenity Applewhite
Having trouble viewing this email? Click here Friday, November 20: Interpolation with NumPy/SciPy Dear Amenity, It's time for our mid-month Scientific Computing with Python webinar! This month's topic is sure to prove very useful for data analysts: Interpolation with NumPy and SciPy. In

gevent 0.11.1 released

2009-11-15 Thread Denis Bilenko
gevent is a coroutine-based Python networking library that uses greenlet to provide a high-level synchronous API on top of libevent event loop. Features include: * convenient API around greenlets * familiar synchronization primitives (gevent.event, gevent.queue) * socket module that

Re: Vote on PyPI comments

2009-11-15 Thread Michele Simionato
On Nov 15, 5:17 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Fri, 13 Nov 2009 07:53:05 -0800, Michele Simionato wrote: I am skeptical about the utility of both rating and comments. If somebody wants to know if a package is good, she should ask here. Because unlike

Re: python simply not scaleable enough for google?

2009-11-15 Thread Terry Reedy
greg wrote: John Nagle wrote: Take a good look at Shed Skin. ... You give up some flexibility; a variable can have only one primitive type in its life, or it can be a class object. That's enough to simplify the type analysis to the point that most types can be nailed down before the

Re: Vote on PyPI comments

2009-11-15 Thread Daniel Fetchinson
I am skeptical about the utility of both rating and comments. If somebody wants to know if a package is good, she should ask here. Because unlike people writing comments, people here are never incompetent, misinformed, dishonest, confused, trolling or just wrong. But sometimes

Re: #define (from C) in Python

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

Re: Vote on PyPI comments

2009-11-15 Thread Jonathan Hartley
On Nov 15, 9:21 am, Daniel Fetchinson fetchin...@googlemail.com wrote: I am skeptical about the utility of both rating and comments. If somebody wants to know if a package is good, she should ask here. Because unlike people writing comments, people here are never incompetent,

Re: #define (from C) in Python

2009-11-15 Thread Santiago Romero
Python IS slower than perl, especially since you are dealing with objects. However, I'd suggest go the cPickle route - have a Z80Cpu module, and its C equivalent, cZ80, and use that one if available. This way, the emulator will be actually usable everywhere. Thanks for the advice but ... my

Changing the current directory

2009-11-15 Thread vsoler
Ever since I installed my Python 2.6 interpreter, I've been saving my *.py files in the C:\Program Files\Python26 directory, which is the default directory for such files in my system. However, I have realised that the above is not the best practice. Therefore I created the C:\Program

Re: More Python versions on an XP machine

2009-11-15 Thread Nobody
On Sat, 14 Nov 2009 14:45:48 +0100, Gabor Urban wrote: this a very MS specific question. I do use a rather old Python version, because we have a couple of applications written for that. Porting them to a newer Python is not allowed by the bosses. Now we will start a new project with latest

Changing the current directory (full post)

2009-11-15 Thread vsoler
Oops!!! something went wrong with my keyboard. Here you have my full post: Ever since I installed my Python 2.6 interpreter (I use IDLE), I've been saving my *.py files in the C:\Program Files\Python26 directory, which is the default directory for such files in my system. However, I have

Re: How to know if a file is a text file

2009-11-15 Thread Nobody
On Sat, 14 Nov 2009 17:02:29 +0100, Luca Fabbri wrote: I'm looking for a way to be able to load a generic file from the system and understand if he is plain text. The mimetype module has some nice methods, but for example it's not working for file without extension. Any suggestion? You

Re: How to know if a file is a text file

2009-11-15 Thread Chris Rebert
On Sun, Nov 15, 2009 at 4:06 AM, Nobody nob...@nowhere.com wrote: On Sat, 14 Nov 2009 17:02:29 +0100, Luca Fabbri wrote: I'm looking for a way to be able to load a generic file from the system and understand if he is plain text. The mimetype module has some nice methods, but for example it's

basic class question..

2009-11-15 Thread Pyrot
class rawDNA: import string trans = string.maketrans(GATC,CTAG) def __init__(self, template = GATTACA): self.template = template //shouldn't this make template accessible within the scope of rawDNA?? def noncoding(self): print

Re: How to know if a file is a text file

2009-11-15 Thread Luca
On Sat, Nov 14, 2009 at 6:51 PM, Philip Semanchuk phi...@semanchuk.com wrote: Hi Luca, You have to define what you mean by text file. It might seem obvious, but it's not. Do you mean just ASCII text? Or will you accept Unicode too? Unicode text can be more difficult to detect because you

Re: basic class question..

2009-11-15 Thread Diez B. Roggisch
Pyrot schrieb: class rawDNA: import string Importing here is unusual. Unless you have good reasons to do so, I suggest you put the imports on top of the file. trans = string.maketrans(GATC,CTAG) def __init__(self, template = GATTACA): self.template

python win32com problem

2009-11-15 Thread elca
hello , these day im very stress of one of some strange thing. i want to enumurate inside list of url, and every enumurated url i want to visit i was uplod incompleted script source in here = http://elca.pastebin.com/m6f911584 if anyone can help me really appreciate thanks in advance Paul

Re: basic class question..

2009-11-15 Thread Tim Chase
Pyrot wrote: class rawDNA: import string trans = string.maketrans(GATC,CTAG) def __init__(self, template = GATTACA): self.template = template //shouldn't this make template accessible within the scope of rawDNA?? No. Python's scope resolution

Re: basic class question..

2009-11-15 Thread Diez B. Roggisch
Diez B. Roggisch schrieb: Pyrot schrieb: class rawDNA: import string Importing here is unusual. Unless you have good reasons to do so, I suggest you put the imports on top of the file. trans = string.maketrans(GATC,CTAG) def __init__(self, template = GATTACA):

Code for finding the 1000th prime

2009-11-15 Thread mrholtsr
I am absolutely new to python and barely past beginner in programming. Also I am not a mathematician. Can some one give me pointers for finding the 1000th. prime for a course I am taking over the internet on Introduction to Computer Science and Programming. Thanks, Ray --

Re: Code for finding the 1000th prime

2009-11-15 Thread Diez B. Roggisch
mrholtsr schrieb: I am absolutely new to python and barely past beginner in programming. Also I am not a mathematician. Can some one give me pointers for finding the 1000th. prime for a course I am taking over the internet on Introduction to Computer Science and Programming. Thanks, Ray Do you

Stagnant Frame Data?

2009-11-15 Thread Mike
I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes, AutoChecker and Snapshot that evaluate variables in their caller's namespace using the frame

Re: python win32com problem

2009-11-15 Thread Jon Clements
On Nov 15, 1:08 pm, elca high...@gmail.com wrote: hello , these day im very stress of one of some strange thing. i want to enumurate inside list of url, and every enumurated url i want to visit i was uplod incompleted script source in here = http://elca.pastebin.com/m6f911584 if anyone

Re: Stagnant Frame Data?

2009-11-15 Thread Peter Otten
Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes, AutoChecker and Snapshot that evaluate variables in their caller's namespace

Re: (unknown)

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 16:05:26 -0300, Ronn Ross ronn.r...@gmail.com escribió: 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

Re: (unknown)

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 16:05:26 -0300, Ronn Ross ronn.r...@gmail.com escribió: 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

Re: Choosing GUI Module for Python

2009-11-15 Thread Dietmar Schwertberger
sturlamolden schrieb: On 14 Nov, 19:02, Dietmar Schwertberger n...@schwertberger.de wrote: I tried 3.01.63. I can see in the Python window already that the code is not correct. 3.01.63 Did you remember to install the wxAdditions? No. I think that they should not be required (a minimal

Re: Stagnant Frame Data?

2009-11-15 Thread exarkun
On 04:00 pm, __pete...@web.de wrote: Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes, AutoChecker and Snapshot that evaluate

Redirect stdout to a buffer

2009-11-15 Thread Ecir Hana
Hello, I'm trying to write a simple Win32 app, which may run some Python scripts. Since it is a Windows GUI app, I would like to redirect all output (Python print, C printf, fprinf stderr, ...) to a text area inside the app. In other words, I'm trying to log all the output from the app (C,

Re: __import__ returns module without it's attributes?

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 20:27:29 -0300, Zac Burns zac...@gmail.com escribió: 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

IDE for python

2009-11-15 Thread Peng Yu
There had been some discussion on IDE. But I'm not sure what pros and cons of each choice. Current, I'm using vim and ctags. Could somebody give some advices on choosing the best IDE for me?

Re: IDE for python

2009-11-15 Thread Diez B. Roggisch
Peng Yu schrieb: There had been some discussion on IDE. But I'm not sure what pros and cons of each choice. Current, I'm using vim and ctags. Could somebody give some advices on choosing the best IDE for me?

How can pip install a GitHub code drop?

2009-11-15 Thread Phlip
Not Hyp: Suppose I have a Python library, complete with a respectable setup.py. How can I point pip at the repo to install the library? if I use this... sudo pip -e git+git://github.com/Phlip/Kozmiq.git ...I get an editable drop in a ~/src/ folder. -- Phlip

Re: python simply not scaleable enough for google?

2009-11-15 Thread Paul Boddie
On 15 Nov, 09:30, Terry Reedy tjre...@udel.edu wrote: greg wrote: [Shed Skin] These restrictions mean that it isn't really quite Python, though. Python code that only uses a subset of features very much *is* Python code. The author of ShedSkin makes no claim that is compiles all Python

Re: python win32com problem

2009-11-15 Thread elca
Jon Clements-2 wrote: On Nov 15, 1:08 pm, elca high...@gmail.com wrote: hello , these day im very stress of one of some strange thing. i want to enumurate inside list of url, and every enumurated url i want to visit i was uplod incompleted script source in here =

Re: IDE for python

2009-11-15 Thread Peng Yu
On Nov 15, 11:15 am, Diez B. Roggisch de...@nospam.web.de wrote: Peng Yu schrieb: There had been some discussion on IDE. But I'm not sure what pros and cons of each choice. Current, I'm using vim and ctags. Could somebody give some advices on choosing the best IDE for me?

How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
Hi I need to link against Python, is there a way to get the path to the directory containing Python's C library (e.g., exec-prefix/libs on Windows)? Thanks, Arve -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-15 Thread DreiJane
Thanks a second time - the picture has gotten clearer indeed. But for third-party readers the complexities of this matter require the correction, that Py_Type(Foo_Type) = PyType_Type must be: Py_TYPE(Foo_Type) = PyType_Type - or am i completely wrong ? Joost --

overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
I ran the following program, and found its output surprising in one place: class OnlyAl: def __getitem__(self, key): return 'al' class OnlyBob(dict): def __getitem__(self, key): return 'bob' import sys; print sys.version al = OnlyAl() bob = OnlyBob()

Re: Stagnant Frame Data?

2009-11-15 Thread Terry Reedy
Peter Otten wrote: Mike wrote: I'll apologize first for this somewhat lengthy example. It does however recreate the problem I've run into. This is stripped-down code from a much more meaningful system. I have two example classes, AutoChecker and Snapshot that evaluate variables in their

Re: Python Go

2009-11-15 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 4:00 AM, Terry Reedy tjre...@udel.edu wrote: Yoav Goldberg wrote: On Sun, Nov 15, 2009 at 12:10 AM, Terry Reedy tjre...@udel.edu mailto: tjre...@udel.edu wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go:

Slicing history?

2009-11-15 Thread Aahz
Anyone remember or know why Python slices function like half-open intervals? I find it incredibly convenient myself, but an acquaintance familiar with other programming languages thinks it's bizarre and I'm wondering how it happened. -- Aahz (a...@pythoncraft.com) *

Re: How to know if a file is a text file

2009-11-15 Thread Nobody
On Sun, 15 Nov 2009 04:34:10 -0800, Chris Rebert wrote: I'm looking for a way to be able to load a generic file from the system and understand if he is plain text. The mimetype module has some nice methods, but for example it's not working for file without extension. Any suggestion? You

Re: How to know if a file is a text file

2009-11-15 Thread Nobody
On Sun, 15 Nov 2009 13:49:54 +0100, Luca wrote: I was quite sure that this is not a very simple task. Right now search only inside ASCII encode is not enough for me (my native language is outside this encode :-) Checking every single byte can be a good solution... I can start using the

Re: Slicing history?

2009-11-15 Thread Jon Clements
On Nov 15, 6:50 pm, a...@pythoncraft.com (Aahz) wrote: Anyone remember or know why Python slices function like half-open intervals?  I find it incredibly convenient myself, but an acquaintance familiar with other programming languages thinks it's bizarre and I'm wondering how it happened. --

Re: Python Go

2009-11-15 Thread Steve Howell
On Nov 14, 3:26 am, kj no.em...@please.post wrote: One more thing: I found Rob Pike's mutterings on generics (towards the end of his rollout video) rather offputting, because he gave the impression that some important aspects of the language were not even considered before major decisions for

Re: IDE for python

2009-11-15 Thread Diez B. Roggisch
Peng Yu schrieb: On Nov 15, 11:15 am, Diez B. Roggisch de...@nospam.web.de wrote: Peng Yu schrieb: There had been some discussion on IDE. But I'm not sure what pros and cons of each choice. Current, I'm using vim and ctags. Could somebody give some advices on choosing the best IDE for me?

Re: How to get directory of Python C library

2009-11-15 Thread Diez B. Roggisch
arve.knud...@gmail.com schrieb: Hi I need to link against Python, is there a way to get the path to the directory containing Python's C library (e.g., exec-prefix/libs on Windows)? Most probably from the registry somehow. In general, try locate a python-executable, and make it execute

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Gary Herron
Steve Howell wrote: I ran the following program, and found its output surprising in one place: class OnlyAl: def __getitem__(self, key): return 'al' class OnlyBob(dict): def __getitem__(self, key): return 'bob' import sys; print sys.version al = OnlyAl()

Re: Slicing history?

2009-11-15 Thread Nobody
On Sun, 15 Nov 2009 10:50:43 -0800, Aahz wrote: Anyone remember or know why Python slices function like half-open intervals? I find it incredibly convenient myself, but an acquaintance familiar with other programming languages thinks it's bizarre and I'm wondering how it happened. How else

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 10:25 am, Steve Howell showel...@yahoo.com wrote: [see original post...] I am most interested in the specific mechanism for changing the __getitem__ method for a subclass on a dictionary.  Thanks in advance! Sorry for replying to myself, but I just realized that the last statement

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 11:19 am, Gary Herron gher...@islandtraining.com wrote: Steve Howell wrote: I ran the following program, and found its output surprising in one place:     class OnlyAl:         def __getitem__(self, key): return 'al'     class OnlyBob(dict):         def __getitem__(self,

Re: python simply not scaleable enough for google?

2009-11-15 Thread Edward A. Falk
In article m2d43kemvs@roger-vivier.bibliotech.com, Robert Brown bbr...@speakeasy.net wrote: It's hard to refute your assertion. You're claiming that some future hypothetical Python implementation will have excellent performance via a JIT. On top of that you say that you're willing to change

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Jon Clements
On Nov 15, 7:23 pm, Steve Howell showel...@yahoo.com wrote: On Nov 15, 10:25 am, Steve Howell showel...@yahoo.com wrote: [see original post...] I am most interested in the specific mechanism for changing the __getitem__ method for a subclass on a dictionary.  Thanks in advance! Sorry

Re: python simply not scaleable enough for google?

2009-11-15 Thread Paul Rubin
f...@mauve.rahul.net (Edward A. Falk) writes: If you change the Python language to address the semantic problems Willem lists in his post and also add optional type declarations, then Python becomes closer to Common Lisp, which we know can be executed efficiently, within the same ballpark as C

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-15 Thread Martin v. Löwis
DreiJane wrote: Thanks a second time - the picture has gotten clearer indeed. But for third-party readers the complexities of this matter require the correction, that Py_Type(Foo_Type) = PyType_Type must be: Py_TYPE(Foo_Type) = PyType_Type - or am i completely wrong ? Joost No, you

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-15 Thread Martin v. Löwis
Still there remains the difference to what is told with the Noddy_Type in the tutorial. Please report that to bugs.python.org. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 12:01 pm, Jon Clements jon...@googlemail.com wrote: On Nov 15, 7:23 pm, Steve Howell showel...@yahoo.com wrote: I am more precisely looking for a way to change the behavior of foo ['bar'] (side effects and possibly return value) where foo is an instance of a class that

Re: Slicing history?

2009-11-15 Thread Mark Dickinson
On Nov 15, 6:50 pm, a...@pythoncraft.com (Aahz) wrote: Anyone remember or know why Python slices function like half-open intervals?  I find it incredibly convenient myself, but an acquaintance familiar with other programming languages thinks it's bizarre and I'm wondering how it happened.

Re: How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: Hi I need to link against Python, is there a way to get the path to the directory containing Python's C library (e.g., exec-prefix/libs on Windows)? Most probably from the registry somehow.

Re: How to get directory of Python C library

2009-11-15 Thread Diez B. Roggisch
arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: Hi I need to link against Python, is there a way to get the path to the directory containing Python's C library (e.g., exec-prefix/libs on Windows)? Most probably

Re: Slicing history?

2009-11-15 Thread Steve Howell
On Nov 15, 12:11 pm, Mark Dickinson dicki...@gmail.com wrote: On Nov 15, 6:50 pm, a...@pythoncraft.com (Aahz) wrote: Anyone remember or know why Python slices function like half-open intervals?  I find it incredibly convenient myself, but an acquaintance familiar with other programming

Re: How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
On 15 Nov, 21:24, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: Hi I need to link against Python, is there a way to get the path to the directory containing

Re: How to get directory of Python C library

2009-11-15 Thread Diez B. Roggisch
arve.knud...@gmail.com schrieb: On 15 Nov, 21:24, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: Hi I need to link against Python, is there a way to get the path to

Re: Slicing history?

2009-11-15 Thread Aahz
In article 667394cb-d505-4906-8c6b-ab2d361b3...@j24g2000yqa.googlegroups.com, Mark Dickinson dicki...@gmail.com wrote: On Nov 15, 6:50=A0pm, a...@pythoncraft.com (Aahz) wrote: Anyone remember or know why Python slices function like half-open intervals? =A0I find it incredibly convenient

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

2009-11-15 Thread Baptiste Lepilleur
I think you can use python itself for pre-processing. Here is an (shortened) example from PyPy RPython paper: # operators: the docstrings contain the # symbol associated with each operator class Op_Add(BinaryExpr): ’+’ class Op_Sub(BinaryExpr): ’-’ # INIT-TIME only: build the table of #

Re: How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
On 15 Nov, 22:11, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 21:24, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb:

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 12:01 pm, Jon Clements jon...@googlemail.com wrote: On Nov 15, 7:23 pm, Steve Howell showel...@yahoo.com wrote: On Nov 15, 10:25 am, Steve Howell showel...@yahoo.com wrote: [see original post...] I am most interested in the specific mechanism for changing the __getitem__

Re: How to get directory of Python C library

2009-11-15 Thread Diez B. Roggisch
arve.knud...@gmail.com schrieb: On 15 Nov, 22:11, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 21:24, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, Diez B. Roggisch de...@nospam.web.de wrote:

Re: How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
On 15 Nov, 23:59, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 22:11, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 21:24, Diez B. Roggisch de...@nospam.web.de wrote: arve.knud...@gmail.com schrieb:

Re: ANN: PyGUI 2.1

2009-11-15 Thread r
OK this is my third attempt, someone please email me if these messages are getting through. I mailed this only to c.l.py and not the announce group this time, that may have been my previous problems??? Here we go... Hello Greg, I have looked over this kit in the past and it looks quite promising

Re: A terminators' club for clp

2009-11-15 Thread David Bolen
Terry Reedy tjre...@udel.edu writes: r wrote: On Nov 14, 4:59 am, kj no.em...@please.post wrote: But, as I already showed, I'm out of my depth here, so I'd better shut up. Don't give up so easy! The idea is great, what Paul is saying is that most people who read this group use newsreaders

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Christian Heimes
Steve Howell wrote: Does anybody have any links that points to the rationale for ignoring instance definitions of __getitem__ when new-style classes are involved? I assume it has something to do with performance or protecting us from our own mistakes? Most magic methods are implemented as

Re: How can pip install a GitHub code drop?

2009-11-15 Thread Wolodja Wentland
On Sun, Nov 15, 2009 at 09:16 -0800, Phlip wrote: How can I point pip at the repo to install the library? sudo pip -e git+git://github.com/Phlip/Kozmiq.git Make that: pip -e git+git://github.com/Phlip/Kozmiq.git#egg=Kozmiq and (preferably) don't install into system paths ;-) kind regards

Re: basic class question..

2009-11-15 Thread Pyrot
On 11월15일, 오후10시15분, Tim Chase python.l...@tim.thechases.com wrote: Pyrot wrote: class rawDNA: import string trans = string.maketrans(GATC,CTAG) def __init__(self, template = GATTACA): self.template = template //shouldn't this make template accessible within the

Re: basic class question..

2009-11-15 Thread Pyrot
On 11월15일, 오후9시52분, Diez B. Roggisch de...@nospam.web.de wrote: Pyrot schrieb: class rawDNA:    import string Importing here is unusual. Unless you have good reasons to do so, I suggest you put the imports on top of the file.    trans = string.maketrans(GATC,CTAG)    def

Re: How can pip install a GitHub code drop?

2009-11-15 Thread Wolodja Wentland
On Mon, Nov 16, 2009 at 01:11 +0100, Wolodja Wentland wrote: On Sun, Nov 15, 2009 at 09:16 -0800, Phlip wrote: How can I point pip at the repo to install the library? sudo pip -e git+git://github.com/Phlip/Kozmiq.git pip -e git+git://github.com/Phlip/Kozmiq.git#egg=Kozmiq err... pip

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread MRAB
Christian Heimes wrote: Steve Howell wrote: Does anybody have any links that points to the rationale for ignoring instance definitions of __getitem__ when new-style classes are involved? I assume it has something to do with performance or protecting us from our own mistakes? Most magic

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 4:03 pm, Christian Heimes li...@cheimes.de wrote: Steve Howell wrote: Does anybody have any links that points to the rationale for ignoring instance definitions of __getitem__ when new-style classes are involved?  I assume it has something to do with performance or protecting

[ANNC] acromania-0.5

2009-11-15 Thread Lee Harr
Acromania is a word game of acronyms. This program is a computer moderator for networked games of acromania. It can connect to a channel on IRC, or start a standalone server which can be accessed much like a MUD. http://acromania.googlecode.com/ Acromania uses Twisted and SQLite. Optionally,

Re: Changing the current directory (full post)

2009-11-15 Thread Gabriel Genellina
En Sun, 15 Nov 2009 09:04:06 -0300, vsoler vicente.so...@gmail.com escribió: Ever since I installed my Python 2.6 interpreter (I use IDLE), I've been saving my *.py files in the C:\Program Files\Python26 directory, which is the default directory for such files in my system. However, I have

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 4:58 pm, Steve Howell showel...@yahoo.com wrote: On Nov 15, 4:03 pm, Christian Heimes li...@cheimes.de wrote: Try this untested code: class Spam(dict):     def __getitem__(self, key):         getitem = self.__dict__.get(__getitem__, dict.__getitem__)         return

Re: tkFileDialog question

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell mmitch...@transparent.com escribió: answer = tkFileDialog.askdirectory() if answer is not '': #do stuff Although it reads well, this is *wrong*. You want != here, not the `is not` operator. if answer != '': ... If you want to

Re: tkFileDialog question

2009-11-15 Thread r
On Nov 15, 8:56 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell   mmitch...@transparent.com escribió: answer = tkFileDialog.askdirectory() if answer is not '':    #do stuff Although it reads well, this is *wrong*. You want != here,

Re: Choosing GUI Module for Python

2009-11-15 Thread sturlamolden
On 15 Nov, 17:05, Dietmar Schwertberger n...@schwertberger.de wrote: Could you send me an .fbp file demonstrating the error? Sent by email. Did you receive it? No... could you please resend to stu...@molden.no? -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing GUI Module for Python

2009-11-15 Thread sturlamolden
On 15 Nov, 17:05, Dietmar Schwertberger n...@schwertberger.de wrote: Sent by email. Did you receive it? Yes I did, thank you :) (I thought I didn't, but it was just a problem with my e-mail filter.) -- http://mail.python.org/mailman/listinfo/python-list

Re: Choosing GUI Module for Python

2009-11-15 Thread sturlamolden
On 14 Nov, 15:35, Dietmar Schwertberger n...@schwertberger.de wrote:    self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY )    self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, uMyButton, wx.DefaultPosition, wx.DefaultSize, 0 )    m_toolBar1.AddControl( m_button1 ) I

Re: python simply not scaleable enough for google?

2009-11-15 Thread John Nagle
Paul Boddie wrote: On 15 Nov, 09:30, Terry Reedy tjre...@udel.edu wrote: greg wrote: [Shed Skin] These restrictions mean that it isn't really quite Python, though. Python code that only uses a subset of features very much *is* Python code. The author of ShedSkin makes no claim that is

Re: Python Go

2009-11-15 Thread sturlamolden
On 15 Nov, 05:21, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Psyco does JIT compilation to machine-code for CPython, at the cost of much extra memory. It's also limited to 32-bit Intel processors. The aim of the PyPy project is to (eventually) make JIT machine-code

Re: python simply not scaleable enough for google?

2009-11-15 Thread sturlamolden
On 16 Nov, 05:09, John Nagle na...@animats.com wrote:       Python is a very clean language held back from widespread use by slow implementations.  If Python ran faster, Go would be unnecessary. That boggles me. NASA can find money to build a space telescope and put it in orbit. They don't

Re: python simply not scaleable enough for google?

2009-11-15 Thread sturlamolden
On 16 Nov, 05:09, John Nagle na...@animats.com wrote:       Python is a very clean language held back from widespread use by slow implementations. Python is clean, minimalistic, and beautiful. Python don't have bloat like special syntax for XML or SQL databases (cf C#) or queues (Go). Most

Re: IDE for python

2009-11-15 Thread sturlamolden
On 15 Nov, 18:09, Peng Yu pengyu...@gmail.com wrote: There had been some discussion on IDE. But I'm not sure what pros and cons of each choice. Current, I'm using vim and ctags. Could somebody give some advices on choosing the best IDE for me? There is a plug-in to develop (amd debug) Python

Re: Python Go

2009-11-15 Thread Simon Forman
On Sat, Nov 14, 2009 at 5:10 PM, Terry Reedy tjre...@udel.edu wrote: Paul Rubin wrote: Mark Chu-Carroll has a new post about Go:  http://scienceblogs.com/goodmath/2009/11/the_go_i_forgot_concurrency_an.php In a couple of minutes, I wrote his toy prime filter example in Python, mostly from

Re: tkFileDialog question

2009-11-15 Thread r
Matt, There is also a nice thing you need to know about Python if you already do not know. That is the fact that all empty collections bool to False. This makes Truth testing easier. bool([]) False bool('') False bool({}) False bool([1]) True bool([[]]) True bool(' ') True any empty

Re: Python Go

2009-11-15 Thread sturlamolden
On 14 Nov, 23:10, Terry Reedy tjre...@udel.edu wrote: It would be much better, for instance, to tweak Python, which it has had great success with, to better run on multiple cores. Python run well on multiple cores, you just have to use processes instead of threads. --

Pokemon gamestyle in Python

2009-11-15 Thread Martijn Arts
First; sorry, the title might be somewhat unclear about what I mean. Then; I know PyGame and I've worked with it, but I want to make a Pokemon/Legend of Zelda style game with a moving guy on a map. So what I'm asking is; is there anything better than PyGame for this gamestyle? --

Re: basic class question..

2009-11-15 Thread r
On Nov 15, 6:26 pm, Pyrot sungs...@gmail.com wrote: what happens when I use the import statement within a class/function declaration? I'm thinking either 1) It imports during the class/function declaration 2) It imports the first time a class/function call(x = rawDNA() ) occurs But if

Re: Python 2.6.3 TarFile Module Add odd behavior

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 16:23:31 -0300, Tilson, Greg (IS) greg.til...@ngc.com escribió: In Windows Python 2.6.3 calling TarFile.add requires arcname= to be set to work with WinZIP or WinRAR [...]If arcname= is not set during extraction all filenames are None Suggest document change or filing

[issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname?

2009-11-15 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: Interesting issue. RFC 2617 supports the claim. In RFC 2617, section 3.2.2 The Authorization Request Header, we see that nonce-count is maintained for each particular nonce value and it can used by the server to verify the replays. The

[issue7309] crasher in str(Exception())

2009-11-15 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I'm not sure what the functions should do when start and end are out of range. I think the best approach would be to prevent these values to be out of range in the first place. All the args should be checked when the instance is created

  1   2   >