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) 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 a bug report Pos

Re: basic class question..

2009-11-15 Thread r
On Nov 15, 6:26 pm, Pyrot 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 it's 2) then i

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

Re: Python & Go

2009-11-15 Thread sturlamolden
On 14 Nov, 23:10, Terry Reedy 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. -- http://mail.python.org/mailman/lis

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

Re: Python & Go

2009-11-15 Thread Simon Forman
On Sat, Nov 14, 2009 at 5:10 PM, Terry Reedy 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 the

Re: IDE for python

2009-11-15 Thread sturlamolden
On 15 Nov, 18:09, Peng Yu 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 using MS Visual

Re: python simply not scaleable enough for google?

2009-11-15 Thread sturlamolden
On 16 Nov, 05:09, John Nagle 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 of all, it is eas

Re: python simply not scaleable enough for google?

2009-11-15 Thread sturlamolden
On 16 Nov, 05:09, John Nagle 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 find money to crea

Re: Python & Go

2009-11-15 Thread sturlamolden
On 15 Nov, 05:21, Steven D'Aprano 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 compilation > available to any Python, on any

Re: python simply not scaleable enough for google?

2009-11-15 Thread John Nagle
Paul Boddie wrote: On 15 Nov, 09:30, Terry Reedy 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: Choosing GUI Module for Python

2009-11-15 Thread sturlamolden
On 14 Nov, 15:35, Dietmar Schwertberger wrote: >    self.m_toolBar1 = self.CreateToolBar( wx.TB_HORIZONTAL, wx.ID_ANY ) >    self.m_button1 = wx.Button( self.m_toolBar1, wx.ID_ANY, u"MyButton", > wx.DefaultPosition, wx.DefaultSize, 0 ) >    m_toolBar1.AddControl( m_button1 ) I can confirm this.

Re: Choosing GUI Module for Python

2009-11-15 Thread sturlamolden
On 15 Nov, 17:05, Dietmar Schwertberger 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 15 Nov, 17:05, Dietmar Schwertberger 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: tkFileDialog question

2009-11-15 Thread r
On Nov 15, 8:56 pm, "Gabriel Genellina" wrote: > En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell   > 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. >

Re: tkFileDialog question

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 11:32:37 -0300, Matt Mitchell 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 compare the *values* of t

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 4:58 pm, Steve Howell wrote: > On Nov 15, 4:03 pm, Christian Heimes wrote: > > > Try this untested code: > > > class Spam(dict): > >     def __getitem__(self, key): > >         getitem = self.__dict__.get("__getitem__", dict.__getitem__) > >         return getitem(self, key) > > [...]

Re: Changing the current directory (full post)

2009-11-15 Thread Gabriel Genellina
En Sun, 15 Nov 2009 09:04:06 -0300, vsoler 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 realised that the above is

[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, i

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 4:03 pm, 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 o

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: basic class question..

2009-11-15 Thread Pyrot
On 11월15일, 오후9시52분, "Diez B. Roggisch" 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 __init__(s

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 method

Re: basic class question..

2009-11-15 Thread Pyrot
On 11월15일, 오후10시15분, Tim Chase 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 scope of

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: 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: A "terminators' club" for clp

2009-11-15 Thread David Bolen
Terry Reedy writes: > r wrote: >> On Nov 14, 4:59 am, kj 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 and that has nothing >

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: How to get directory of Python C library

2009-11-15 Thread arve.knud...@gmail.com
On 15 Nov, 23:59, "Diez B. Roggisch" wrote: > arve.knud...@gmail.com schrieb: > > > > > > > On 15 Nov, 22:11, "Diez B. Roggisch" wrote: > >> arve.knud...@gmail.com schrieb: > > >>> On 15 Nov, 21:24, "Diez B. Roggisch" wrote: > arve.knud...@gmail.com schrieb: > > On 15 Nov, 20:05, "Diez

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" wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 21:24, "Diez B. Roggisch" wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, "Diez B. Roggisch" wrote: arve.knud...@gmail.com schrieb: Hi I need to link again

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 12:01 pm, Jon Clements wrote: > On Nov 15, 7:23 pm, Steve Howell wrote: > > > On Nov 15, 10:25 am, Steve Howell wrote: > > > > [see original post...] > > > I am most > > > interested in the specific mechanism for changing the __getitem__ > > > method for a subclass on a dictionary.  T

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" wrote: > arve.knud...@gmail.com schrieb: > > > > > > > On 15 Nov, 21:24, "Diez B. Roggisch" wrote: > >> arve.knud...@gmail.com schrieb: > > >>> On 15 Nov, 20:05, "Diez B. Roggisch" wrote: > arve.knud...@gmail.com schrieb: > > Hi > > I need to lin

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: Slicing history?

2009-11-15 Thread Aahz
In article <667394cb-d505-4906-8c6b-ab2d361b3...@j24g2000yqa.googlegroups.com>, Mark Dickinson 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 myself, but an a

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" wrote: arve.knud...@gmail.com schrieb: On 15 Nov, 20:05, "Diez B. Roggisch" 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

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" wrote: > arve.knud...@gmail.com schrieb: > > > > > > > On 15 Nov, 20:05, "Diez B. Roggisch" 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

Re: Slicing history?

2009-11-15 Thread Steve Howell
On Nov 15, 12:11 pm, Mark Dickinson 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 languages thin

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" 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., /libs on Windows)? Most probably from the registry somehow. In ge

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" 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., /libs on > > Windows)? > > Most probably from the registry somehow. In general, try &

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: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 12:01 pm, Jon Clements wrote: > On Nov 15, 7:23 pm, Steve Howell 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 subclasses "dict," and where "foo" is no

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 ballpa

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Jon Clements
On Nov 15, 7:23 pm, Steve Howell wrote: > On Nov 15, 10:25 am, Steve Howell 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

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 wron

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: python simply not scaleable enough for google?

2009-11-15 Thread Edward A. Falk
In article , Robert Brown 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 the definition of the >Python language, say by adding type

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 11:19 am, Gary Herron 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, key): return

Re: overriding __getitem__ for a subclass of dict

2009-11-15 Thread Steve Howell
On Nov 15, 10:25 am, Steve Howell 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 in my original p

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 el

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

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., /libs on Windows)? Most probably from the registry somehow. In general, try & locate a python-executable, and make it execute python -c "im

Re: IDE for python

2009-11-15 Thread Diez B. Roggisch
Peng Yu schrieb: On Nov 15, 11:15 am, "Diez B. Roggisch" 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? http://groups.google.

Re: Python & Go

2009-11-15 Thread Steve Howell
On Nov 14, 3:26 am, kj 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 it were set in s

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

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 su

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) <*> http://www

Re: Python & Go

2009-11-15 Thread Yoav Goldberg
On Sun, Nov 15, 2009 at 4:00 AM, Terry Reedy wrote: > Yoav Goldberg wrote: > > >> On Sun, Nov 15, 2009 at 12:10 AM, 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_

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 ca

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

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

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., /libs on Windows)? Thanks, Arve -- http://mail.python.org/mailman/listinfo/python-list

Re: IDE for python

2009-11-15 Thread Peng Yu
On Nov 15, 11:15 am, "Diez B. Roggisch" 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? > > >http://groups.google

Re: python win32com problem

2009-11-15 Thread elca
Jon Clements-2 wrote: > > On Nov 15, 1:08 pm, elca 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.past

Re: Code for finding the 1000th prime

2009-11-15 Thread Robert P. J. Day
On Sun, 15 Nov 2009, mrholtsr wrote: > 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 Programm

Re: python simply not scaleable enough for google?

2009-11-15 Thread Paul Boddie
On 15 Nov, 09:30, Terry Reedy 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 > code.

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 http://c2.com/cgi/wiki?ZeekLand

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? http://groups.google.com/group/comp.lang.python/browse_thread/thread/4b3300d10285ae2b/e

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? http://groups.google.com/group/comp.lang.python/browse_thread/thread/4b3300d10285ae2b/e934bd5b9f2d0f8c?lnk

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 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 importantly, where can I ho

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, Python)

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 vari

Re: Choosing GUI Module for Python

2009-11-15 Thread Dietmar Schwertberger
sturlamolden schrieb: On 14 Nov, 19:02, Dietmar Schwertberger 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 version seems to be include

Re: (unknown)

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 16:05:26 -0300, Ronn Ross 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 library or some existing

Re: (unknown)

2009-11-15 Thread Gabriel Genellina
En Fri, 13 Nov 2009 16:05:26 -0300, Ronn Ross 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 library or some existing

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 nam

Re: python win32com problem

2009-11-15 Thread Jon Clements
On Nov 15, 1:08 pm, elca 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 can help

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 st

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

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

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"): s

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 resolutio

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

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 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 have to guess th

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

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 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 not >> work

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? Y

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 realised

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

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 Files\Python

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

Re: Vote on PyPI comments

2009-11-15 Thread Jonathan Hartley
On Nov 15, 9:21 am, Daniel Fetchinson 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, misinformed, d

Re: #define (from C) in Python

2009-11-15 Thread garabik-news-2005-05
Santiago Romero 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, Z80, x128 a

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 s

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 program

Re: Vote on PyPI comments

2009-11-15 Thread Michele Simionato
On Nov 15, 5:17 am, Steven D'Aprano 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 people writing comments, peopl