Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-28 Thread Aaron Brady
On Mar 29, 12:23 am, Steven D'Aprano wrote: > On Fri, 27 Mar 2009 19:57:41 -0700, Aaron Brady wrote: > > I see how c-l-py doesn't represent the full interests of Python, > > Python is a *programming language*. It doesn't have interests. It just > sits there, a bunch of bits on a disk, waiting to b

Re: c.l.py dead, news at 11 (was Re: Mangle function name with decorator?)

2009-03-28 Thread Steven D'Aprano
On Fri, 27 Mar 2009 19:57:41 -0700, Aaron Brady wrote: > I see how c-l-py doesn't represent the full interests of Python, Python is a *programming language*. It doesn't have interests. It just sits there, a bunch of bits on a disk, waiting to be used. *People* have interests, and Python is a me

Re: PyFits for Windows?

2009-03-28 Thread John Yeung
On Mar 28, 4:03 pm, Michiel Overtoom wrote: > W. eWatson wrote: > > It looks like PyFits downloads are for Linux. > > Isn't there anything available for Win (xp)? > > To install it, unpack the tar file and > type: python setup.py install" > > It looks like PyFits is platform-independent. Perhaps

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
>> The fact that the following two outputs are not the same is a bug or a >> feature of numpy? >> >> # I would have thought the two array outputs would be the same ## >> >> import numpy >> >> a = [ [ 0, 0 ], [ 1, 0 ], [ 1, 1 ] ] >> >> pythonarray = a >> pythonarray.sort( ) >> print pythonar

Re: How do I learn about Python & XML?

2009-03-28 Thread Paul McGuire
On Mar 28, 3:11 pm, walterbyrd wrote: > It looks like the most recent book on the subject came out eight years > ago. Also, as I understand it, the PyXML library has been deprecated. Much as I like to see new people latch onto pyparsing, XML is a pretty well-trodden path, especially now that elem

Re: numpy array sorting weirdness

2009-03-28 Thread John O'Hagan
On Sun, 29 Mar 2009, Daniel Fetchinson wrote: [...] > The fact that the following two outputs are not the same is a bug or a > feature of numpy? > > # I would have thought the two array outputs would be the same ## > > import numpy > > a = [ [ 0, 0 ], [ 1, 0 ], [ 1, 1 ] ] > > pythonarray

Re: numpy array sorting weirdness

2009-03-28 Thread MRAB
Daniel Fetchinson wrote: So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everyt

Re: PID lockfile

2009-03-28 Thread Ben Finney
Cameron Simpson writes: > […] there's plenty of occasions when I want to start a daemon, as > me, for my own personal purposes. It doesn't do any uid/gid juggling > or privilege dropping, but it's a perfectly reasonable thing to want > to use your daemon module to do everything else (detach, pid

Re: numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
>> So far I was working under the assumption that the numpy array >> implementation can be used as a drop-in replacement for native python >> lists, i.e. wherever I see a list 'a' and I want to speed up my >> numerical calculations I just replace it with 'numpy.array( a )' and >> everything will wo

Re: PID lockfile

2009-03-28 Thread Cameron Simpson
On 29Mar2009 11:37, Ben Finney wrote: | a...@pythoncraft.com (Aahz) writes: | > In article <87iqlwvemo@benfinney.id.au>, | > Ben Finney wrote: | > >In the case of the ‘lockfile’ library, Skip is aiming for a | > >cross-platform solution, with atomic behaviour; he has implemented | > >loc

numpy array sorting weirdness

2009-03-28 Thread Daniel Fetchinson
So far I was working under the assumption that the numpy array implementation can be used as a drop-in replacement for native python lists, i.e. wherever I see a list 'a' and I want to speed up my numerical calculations I just replace it with 'numpy.array( a )' and everything will work just as befo

Re: complaints about no replies last week

2009-03-28 Thread ajaksu
Aaron Brady wrote: > Hi, > c) It's not particularly applicable to Python at that point > (particularly) BTW, here's some interesting read: http://mail.python.org/pipermail/python-3000/2006-September/003855.html http://mail.python.org/pipermail/python-3000/2007-May/007129.html http://mail.python.or

Re: blocked on futex

2009-03-28 Thread msoulier
On Mar 25, 10:27 am, a...@pythoncraft.com (Aahz) wrote: > That's a bit bizarre.  You're correct that if this is a Python bug, there > will be no fixes available.  However, you said earlier that this is a > patched Python, so I'm wondering whether the applied patch is broken. > Assuming I'm reading

Re: PID lockfile

2009-03-28 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: > In article <87iqlwvemo@benfinney.id.au>, > Ben Finney wrote: > >In the case of the ‘lockfile’ library, Skip is aiming for a > >cross-platform solution, with atomic behaviour; he has implemented > >lock acquisition with a ‘link’ operation on Unix,

Re: complaints about no replies last week

2009-03-28 Thread ajaksu
Hi! Aaron Brady wrote: > A week ago, I posted a question and an idea about Python's garbage > collector.  I got a few replies. Some very nice, too :) > Some days later, I posted a mock-up > implementation of it, and got *NO* replies.  Does this mean: It's not particularly clear to me what your

Re: tkinter questions: behavior of StringVar, etc

2009-03-28 Thread Alan G Isaac
On Mar 28, 2:15 pm, Alan G Isaac wrote: I'm a complete newbie to GUI. I have a couple questions about tkinter. 1. Where is the list of changes in Python 3's tkinter? 2. What exactly is the role of the root object, traditionally created as ``root=tk.Tk()``? What is an example

Re: PyGTK and skins?

2009-03-28 Thread Cousin Stanley
> Is GTK/PyGTK able to support application-based (rather than os-based) > skins? I.e. round corners, redesigned scrollbars, arbitrarily shaped > buttons and so on? > Manu You might try the pygtk mailing list available via the news.gmane.org server gmane.comp.gno

Re: Creating Linked Lists in Python

2009-03-28 Thread Aahz
In article , andrew cooke wrote: >Aahz wrote: >> In article , >> andrew cooke wrote: >> >>>(I've just noticed that the comments in Sequence are incorrect, >>>unfortunately - please ignore any mention of "index"). >> >> s/comments/lies/ per my .sig ;-) >[...] >> "At Resolver we've found it useful

Re: PID lockfile

2009-03-28 Thread Aahz
In article <87iqlwvemo@benfinney.id.au>, Ben Finney wrote: > >In the case of the ‘lockfile’ library, Skip is aiming for a >cross-platform solution, with atomic behaviour; he has implemented >lock acquisition with a ‘link’ operation on Unix, and a ‘mkdir’ >operation on Windows. > >

Re: Accessing wx.TextCtrl after refactoring

2009-03-28 Thread Rhodri James
On Sat, 28 Mar 2009 13:55:39 -, alex wrote: Rhodri thank you very much for your answer. I had read about setattr but the useage was not completely clear to me. Now I will study it again. I inserted it in "def createInput1" def createInput1(self, label, pth_btn_label, txtctrl_path):

Re: Confused with csv.reader copies

2009-03-28 Thread Scott David Daniels
Jeethu Rao wrote: Robert Dailey wrote: First, take a look at my example code: - import csv def pass1( reader ): print reader.next() print reader.next() def pass2( reader ): print reader.next() print reader.next() reader = csv

Re: tkinter questions: behavior of StringVar, etc

2009-03-28 Thread Mike Driscoll
On Mar 28, 2:15 pm, Alan G Isaac wrote: > I'm a complete newbie to GUI. > I have a couple questions about tkinter. > > 1. Where is the list of changes >     in Python 3's tkinter? > > 2. What exactly is the role of the root object, >     traditionally created as ``root=tk.Tk()``? >     What is an

Re: How do I learn about Python & XML?

2009-03-28 Thread Mike Driscoll
On Mar 28, 3:11 pm, walterbyrd wrote: > It looks like the most recent book on the subject came out eight years > ago. Also, as I understand it, the PyXML library has been deprecated. The books are still relavant, but you're welcome to try Google. There's lxml and pyparsing, the latter of which ha

Re: How complex is complex?

2009-03-28 Thread james
thanks, paul. again, since i don't know the context of the original question, i may be speaking to something different than the original post; however, questions about "about how intricate [an] algorithm [is] (this affects its difficulty of implementation and understanding)" are indeed di

Re: not pack methon in tkinter

2009-03-28 Thread dwblas
Pack() is a separate class for all widgets and not specific to the Label widget i.e all widgets are "packed" into the parent. Here is some documentation on the pack class http://effbot.org/tkinterbook/pack.htm http://epydoc.sourceforge.net/stdlib/Tkinter.Pack-class.html -- http://mail.python.org/m

Re: Introducing Python to others

2009-03-28 Thread Beni Cherniavsky
Small additions: On Mar 26, 7:35 pm, "J. Cliff Dyer" wrote: > > 2) Aliasing imports is also cool.  Show people how easy it is to switch > from > > >>> import MySQLdb as db > to > >>> import psycopg2 as db > > and have all your dbapi2 code still work.  Or from > > >>> from StringIO import StringIO

Re: to get name of file opened

2009-03-28 Thread Dave Angel
I doubt if there'd be any efficiency difference between the two approaches. You'll see a much bigger difference by switching from 't' to 'b'. Both the functions are native code in Python 2.6. I withdraw my two previous suggestions. As you said, the 'name' attribute is read-only (and documen

Re: How complex is complex?

2009-03-28 Thread Paul Rubin
ja...@biosci.utexas.edu writes: > again, if i understand correctly, this issue gets its share of > attention in computer sciences, and cs teachers discuss it in class, > passing along their own appreciation of it to their students. I think that question has nothing to do with CS (basically a theor

Re: how do you prevent distutils from downloading and building packages without consent?

2009-03-28 Thread lkcl
http://mail.python.org/pipermail/distutils-sig/2008-March/008925.html dang. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Linked Lists in Python

2009-03-28 Thread andrew cooke
Aahz wrote: > In article , > andrew cooke wrote: >>(I've just noticed that the comments in Sequence are incorrect, >>unfortunately - please ignore any mention of "index"). > > s/comments/lies/ per my .sig ;-) [...] > "At Resolver we've found it useful to short-circuit any doubt and just > refer t

Re: how do you prevent distutils from downloading and building packages without consent?

2009-03-28 Thread lkcl
ok - john, gabriel, i've now removed setuptools, which is the area that's problematic for many people. however there's a feature of setuptools which _is_ useful: -entry_points = {'console_scripts':[ - 'pyjsbuild=pyjs.build:main', - 'pyjscomp

Re: Python print and types selection

2009-03-28 Thread Scott David Daniels
mark.sea...@gmail.com wrote: ... It appears that if I make the class a subclass of long... class bignumber(long): def __init__(self, initval): self.val = initval Then if I make a new class of subclass of bignumber... class myclass(bignumber): def __init__(self, another_custom_cla

How do I learn about Python & XML?

2009-03-28 Thread walterbyrd
It looks like the most recent book on the subject came out eight years ago. Also, as I understand it, the PyXML library has been deprecated. -- http://mail.python.org/mailman/listinfo/python-list

Re: How complex is complex?

2009-03-28 Thread james
thanks, paul. if i understand correctly, questions about "about how intricate [an] algorithm [is] (this affects its difficulty of implementation and understanding)" are also fair and deserve fair answers. again, if i understand correctly, this issue gets its share of attention in computer

Re: Geometry package

2009-03-28 Thread Emile van Sebille
Justin Pearson wrote: Hi all, I'm looking for a geometry package in Python; something that will let me define line segments, and can tell me if two line segments intersect. I used PythonCad for this part -- It didn't take too long to identify and adapt those parts I needed and extract them f

Re: how do you prevent distutils from downloading and building packages without consent?

2009-03-28 Thread lkcl
> read the setuptools documentation? Didn't you *test* your setup.py > before making it available to the world? yes - and it worked on my debian linux box. so, off it went. turns out that it worked because i had python-setuptools preinstalled. > > alarmed to find that setup.py, thanks to distu

Re: PyFits for Windows?

2009-03-28 Thread Michiel Overtoom
W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? According to http://www.stsci.edu/resources/software_hardware/pyfits: "PyFITS’s source code is pure Python. It requires Python version 2.3 or newer. PyFITS also requires the numarray

Re: New Python Runtime / Unladen Swallow

2009-03-28 Thread Nick Craig-Wood
Adonis wrote: > Came across this article on Ars on a new LLVM (Low Level Virtual > Machine) JIT compiler for Python being built by Google: > > > http://arstechnica.com/open-source/news/2009/03/google-launches-project-to-boost-python-performance-by-5x.ars Interesting article and site. The pr

Re: How complex is complex?

2009-03-28 Thread Paul Rubin
ja...@biosci.utexas.edu writes: > donald knuth's anaylses of the computational complexity of algorithms I think the question was about how intricate the algorithm was (this affects its difficulty of implementation and understanding), not its computational complexity. -- http://mail.python.org/mail

tkinter questions: behavior of StringVar, etc

2009-03-28 Thread Alan G Isaac
I'm a complete newbie to GUI. I have a couple questions about tkinter. 1. Where is the list of changes in Python 3's tkinter? 2. What exactly is the role of the root object, traditionally created as ``root=tk.Tk()``? What is an example where one should create this before creating a F

Re: Any way to use a range as a key in a dictionary?

2009-03-28 Thread Paul Rubin
Dennis Lee Bieber writes: > And what real difference is that going to gain versus the existing > .get() method where the default is a sentinel? It's just less ugly. I don't know a way to get a unique sentinel other than "sentinel = object()" or something like that, creating more clutter.

Re: How complex is complex?

2009-03-28 Thread james
this is hardly a fair reply to a fair question. the question of time, space, or algorithmic complexity comes up all the time in the choice of which algorithm or data structure is best suited to attack a problem. donald knuth's anaylses of the computational complexity of algorithms has provi

Re: to get name of file opened

2009-03-28 Thread Visco Shaun
First of all Thanks Dave for the reply On Sat, 2009-03-28 at 09:51 -0500, Dave Angel wrote: > First question is why you need os.open(), and not the open() function. > I'll guess that you need some of the access modes (e.g. for file > sharing) that you get from the low level functions. So assumi

Re: How complex is complex?

2009-03-28 Thread r
On Mar 18, 12:30 pm, Kottiyath wrote: > When we say readability counts over complexity, how do we define what > level of complexity is ok? [snip= mommie can i go out an play?] > How do we decide whether a level of complexity is Ok or not? Hmm? How did you know what shoes to put on this morning

Re: How complex is complex?

2009-03-28 Thread Aahz
In article , Hendrik van Rooyen wrote: >Aahz" a...@pyft.com wrote: > >8< > >> .. Because the name "Python" is derived from the >> comedy TV show "Monty Python", stupid jokes are common in the Python >> community.) > >Sacrilege! > >

Re: Geometry package

2009-03-28 Thread W. eWatson
Justin Pearson wrote: Hi all, I'm looking for a geometry package in Python; something that will let me define line segments, and can tell me if two line segments intersect. It would be nice if the lines could be defined in n-space (rather than be confined to 2 or 3 dimensions), but this is not a

Re: complaints about no replies last week

2009-03-28 Thread Aaron Brady
On Mar 28, 11:41 am, a...@pythoncraft.com (Aahz) wrote: > In article <2d80ec1b-5eb5-4e82-9a4a-36934dd53...@z9g2000yqi.googlegroups.com>, > Aaron Brady   wrote: > > > > >A week ago, I posted a question and an idea about Python's garbage > >collector.  I got a few replies.  Some days later, I posted

Re: Geometry package

2009-03-28 Thread km
Hi, I hope this is what u need : http://cgal-python.gforge.inria.fr/ HTH KM On Sun, Mar 29, 2009 at 1:55 AM, Justin Pearson wrote: > Hi all, > > I'm looking for a geometry package in Python; something that will let > me define line segments, and can tell me if two line segments > intersect. It

Re: Help in reading the pdf file

2009-03-28 Thread Cameron Laird
In article , Gabriel Genellina wrote: >En Thu, 26 Mar 2009 18:31:31 -0300, M Kumar >escribió: > >> I need to read pdf files and extract data from it, is there any way to >> do it >> through python. > >If you are interested in the text, I'd use ghostscript pdf2text (you may >invoke it from insid

Geometry package

2009-03-28 Thread Justin Pearson
Hi all, I'm looking for a geometry package in Python; something that will let me define line segments, and can tell me if two line segments intersect. It would be nice if the lines could be defined in n-space (rather than be confined to 2 or 3 dimensions), but this is not a hard constraint. Other

Re: complaints about no replies last week

2009-03-28 Thread Aahz
In article <2d80ec1b-5eb5-4e82-9a4a-36934dd53...@z9g2000yqi.googlegroups.com>, Aaron Brady wrote: > >A week ago, I posted a question and an idea about Python's garbage >collector. I got a few replies. Some days later, I posted a mock-up >implementation of it, and got *NO* replies. Does this me

Re: Creating Linked Lists in Python

2009-03-28 Thread Aahz
In article , andrew cooke wrote: > >(I've just noticed that the comments in Sequence are incorrect, >unfortunately - please ignore any mention of "index"). s/comments/lies/ per my .sig ;-) -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "At Resolver we've found

Re: How to port Python to an ARM running NucleusPlus OS

2009-03-28 Thread Thomas Ng
Hi Thanks, probably I will start with cross-compiling the python and see what happen. And to compile a minimal python, what are the list of source files that need to be compile? Any makefile (or other files) that's included in the download package that I should refer to? Thanks again! Thomas --

PyFits for Windows?

2009-03-28 Thread W. eWatson
It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet Web Page:

Re: Getting the type of an AST Node

2009-03-28 Thread Benjamin Peterson
Nick Edds uchicago.edu> writes: > > > Ahh sorry. This was in Python 2.5. There's still a builtin AST module in 2.5: _ast -- http://mail.python.org/mailman/listinfo/python-list

Re: ~/.local not in sys.path?

2009-03-28 Thread skip
>> I don't see ~/.local in sys.path. -- http://mail.python.org/mailman/listinfo/python-list

Re: complaints about no replies last week

2009-03-28 Thread r
On Mar 28, 10:07 am, Aaron Brady wrote: > Hi, > > A week ago, I posted a question and an idea about Python's garbage > collector.  I got a few replies.  Some days later, I posted a mock-up > implementation of it, and got *NO* replies.  Does this mean: > > a) It works > b) It doesn't work > c) It's

Re: Unladen-Swallow: A faster python

2009-03-28 Thread skip
Andrew> given the comments on python-dev i wonder if this is the first Andrew> indication that python is going to split into separate Andrew> implementations for windows and unix (via .net and llvm, Andrew> respectively)? The Windows limitations for Unladen Swallow are due primari

Re: complaints about no replies last week

2009-03-28 Thread Benjamin Kaplan
On Sat, Mar 28, 2009 at 11:07 AM, Aaron Brady wrote: > Hi, > > A week ago, I posted a question and an idea about Python's garbage > collector. I got a few replies. Some days later, I posted a mock-up > implementation of it, and got *NO* replies. Does this mean: > > a) It works > b) It doesn't

complaints about no replies last week

2009-03-28 Thread Aaron Brady
Hi, A week ago, I posted a question and an idea about Python's garbage collector. I got a few replies. Some days later, I posted a mock-up implementation of it, and got *NO* replies. Does this mean: a) It works b) It doesn't work c) It's not particularly applicable to Python at that point (par

Re: Unladen-Swallow: A faster python

2009-03-28 Thread skip
Dotan> There is a decent discussion going on at slashdot: Dotan> http://tech.slashdot.org/article.pl?sid=09/03/27/1934256 >From that thread: person1> I'm not quite sure what benefits this gives that Psyco doesn't person1> already. person2> It doesn't get as stabby. :-) --

Re: difference between os.fdopen and builtin open

2009-03-28 Thread Dave Angel
You've already hit the most important difference: os.open() lets you share files between processes, while the built-in doesn't have any control of that type. Another distinction is that fdopen() can be used to get a file object from a fd handle, which may be obtained some other way. For exam

Re: to get name of file opened

2009-03-28 Thread Dave Angel
First question is why you need os.open(), and not the open() function. I'll guess that you need some of the access modes (e.g. for file sharing) that you get from the low level functions. So assuming that: I don't believe there's any way to use a fd ("file descriptor") to retrieve the file n

Re: Do deep inheritance trees degrade efficiency?

2009-03-28 Thread Mike Howard
On Mar 19, 7:24 am, Anthra Norell wrote: > Bruno Desthuilliers wrote: > > Chris Rebert a écrit : > >> On Wed, Mar 18, 2009 at 6:09 AM, Anthra Norell > >> wrote: > >>> Would anyone who knows the inner workings volunteer to clarify > >>> whether or > >>> not every additional derivation of a class h

Re: Unladen-Swallow: A faster python

2009-03-28 Thread Mark Hammond
On 28/03/2009 9:50 PM, andrew cooke wrote: Tim Roberts wrote: [...] IronPython has certainly shown that Python can be successfully implemented in a JIT compiled VM in a performant way, but it has issues running C extension modules. I'll be curious to see where this project goes. given the co

Re: Accessing wx.TextCtrl after refactoring

2009-03-28 Thread alex
Rhodri thank you very much for your answer. I had read about setattr but the useage was not completely clear to me. Now I will study it again. I inserted it in "def createInput1" def createInput1(self, label, pth_btn_label, txtctrl_path): self.stattxt = wx.StaticText(self, -1, label)

Re: Python print and types selection

2009-03-28 Thread mark . seagoe
On Mar 27, 4:00 pm, Miles wrote: > On Fri, Mar 27, 2009 at 6:56 PM, Gabriel Genellina wrote: > > En Fri, 27 Mar 2009 18:43:16 -0300, escribió: > >> Python print recognizes the local constant "dog", but it goes and > >> fetches the __int__ type from my object-based class, even though it's > >> val

Re: Creating Linked Lists in Python

2009-03-28 Thread andrew cooke
J-Burns wrote: [...] > and to node 2 with the value of "b". Trying to make something like an > NFA. Where id be changing regular expressions to NFAs. > > How can I do this? And if I could do this by some other way than using > linked lists than do tell me about that as well. Just been reminded of

Re: ~/.local not in sys.path?

2009-03-28 Thread Дамјан Георгиевски
> I don't see ~/.local in sys.path. Is this some feature which needs to > be enabled? I was kind of unclear after reading the section on it in > the 2.6 What's New document. Here it is, /home/damjan/.local/lib/python2.6/site-packages by default no special settings (on ArchLinux if it matters).

PyGTK and skins?

2009-03-28 Thread Emanuele D'Arrigo
Hi everybody, Is GTK/PyGTK able to support application-based (rather than os-based) skins? I.e. round corners, redesigned scrollbars, arbitrarily shaped buttons and so on? Manu -- http://mail.python.org/mailman/listinfo/python-list

Python-URL! - weekly Python news and links (Mar 28)

2009-03-28 Thread Gabriel Genellina
QOTW: "Knowing C++ does tend to be a bit of a handicap, but I think any competent programmer could learn Python." - Grant Edwards Introducing Python to others - which amazing features to show? http://groups.google.com/group/comp.lang.python/t/6e366356eca17c98/ Do dee

Re: Ban Xah Lee

2009-03-28 Thread Arved Sandstrom
Xah Lee wrote: over the past 15 years, every few months i got emails from authors for permission request of materials on my website. today, while searching for my name on google, i found a result in books.google.com . Out of curiosity, i searched my name in books.google.com, and here's a hilario

difference between os.fdopen and builtin open

2009-03-28 Thread Visco Shaun
Hi I was wondering the difference between os.fdopen()(or os.open() not considering the difference in args) and builtin open(). Can anyone help me? -- Thanks & Regards visco -- http://mail.python.org/mailman/listinfo/python-list

Grayson, Tkinter, Chapter 5

2009-03-28 Thread W. eWatson
Fragments of Grayson's Python Tkinter are on the web at . The site contains all the examples in the book. Chapter 5 is there as a pdf. In it he describes an image editor, p86f. I suspect only users of Grayson's book can answer these questions, but maybe reference

Re: Interfacing python and C

2009-03-28 Thread Nick Craig-Wood
MRAB wrote: > steve William wrote: > > Hi All, > > > > I'm using SWIG for the first time and I am facing some problems with > > user defined header files. I'm trying to use my own header file in a C > > program which would be interfaced with python. > > > > The header file is test.h: > > /#in

Re: Getting the type of an AST Node

2009-03-28 Thread Nick Edds
Ahh sorry. This was in Python 2.5. On Sat, Mar 28, 2009 at 1:20 AM, Terry Reedy wrote: > Nick Edds wrote: > >> Is there an easy way to figure out what the type of an AST Node is? >> > > Specify version. > > ? If I > >> have a node n, doing type(n) doesn't help because it gives me > 'instance'>,

to get name of file opened

2009-03-28 Thread Visco Shaun
Hi Is there any way to get the name of the file opened from the file object 'f' which i get through the code f = os.fdopen(os.open("trial', os.O_WRONLY|os.O_CREAT), "w") The situation will be like i can access only the above variable 'f'. f.name is having '' instead of filename 'trial' Or if n

Re: converting a string to a function parameter

2009-03-28 Thread andrew cooke
I'm a bit late to the party, but LEPL 2.2, just released, can now handle this too. I suspect email may mangle this, so you can also read it at http://www.acooke.org/lepl/examples.html#parsing-a-python-argument-list from lepl import * comma = Drop(',') none = Literal('None')

Re: How to port Python to an ARM running NucleusPlus OS

2009-03-28 Thread Nick Craig-Wood
Thomas Ng wrote: > I'm planning to port the Python to run on an embedded device running > Nucleus+ OS on ARM7 processor. > > Can anyone help to advise how to get started? > > Where I am now: I've downloaded the Python 2.6 from SVN and able to > compile it using VC++. But no idea how to proc

Re: Problems with background processes on Windows

2009-03-28 Thread Gabriel Genellina
En Sat, 28 Mar 2009 06:03:33 -0300, geoffbache escribió: Hi Tim, If you trace through this:     python -m trace --trace communicate.py you'll see that it hangs in subprocess in the stdout_thread waiting for stdout to close. Thanks for this tip, haven't used this before. I'm not sure

Re: Unladen-Swallow: A faster python

2009-03-28 Thread andrew cooke
Tim Roberts wrote: > [...] IronPython has certainly shown that Python can be successfully > implemented in a JIT compiled VM in a performant way, but it has issues > running C extension modules. > > I'll be curious to see where this project goes. given the comments on python-dev i wonder if this

Re: Unladen-Swallow: A faster python

2009-03-28 Thread Irmen de Jong
Tim Roberts wrote: Luis M. González wrote: This is a new project started by two Google engineers to speed up python: http://code.google.com/p/unladen-swallow/ I read this with a skeptical eye, but they have some very interesting ideas here. IronPython has certainly shown that Python can be s

Re: C extension using GSL

2009-03-28 Thread Nick Craig-Wood
Gabriel Genellina wrote: > En Fri, 27 Mar 2009 03:10:06 -0300, jesse escribió: > > > I give up. I cannot find my memory leak! I'm hoping that someone out > > there has come across something similar. Let me lay out the basic > > setup: > > [...] > > 4) C: A PyList object, L, is created (new ref

Re: Code anntotations (copyright, autor, etc) in your code

2009-03-28 Thread Nick Craig-Wood
mattia wrote: > Hi all, which are the usual comments that you put at the beginning of > your code to explain e.g. the author, the usage, the license etc? > > I've found useful someting like: > > #- > # Name:

Re: UnicodeEncodeError - opening encoded URLs

2009-03-28 Thread Peter Otten
D4rko wrote: >> (Unless "name" is a unicode object as well.) > > Unfortunately it is, it's the argument that is automagically handed to > the handler function by the Django URL dispatcher. I guess I may need > to encode it back to the pure ascii with the "%xx" things, but I can't > find the funct

Re: Problems with background processes on Windows

2009-03-28 Thread geoffbache
Hi Tim, > If you trace through this: >     python -m trace --trace communicate.py > > you'll see that it hangs in subprocess in the stdout_thread waiting for > stdout to close. > Thanks for this tip, haven't used this before. > I'm not sure I expect this to work as you expect.  When you open a

How to port Python to an ARM running NucleusPlus OS

2009-03-28 Thread Thomas Ng
Hi there, I'm considered a beginner for Python. I'm planning to port the Python to run on an embedded device running Nucleus+ OS on ARM7 processor. Can anyone help to advise how to get started? Where I am now: I've downloaded the Python 2.6 from SVN and able to compile it using VC++. But no ide

Re: Calendar module: HTMLCalendar overrides style sheet settings

2009-03-28 Thread Gabriel Genellina
En Sat, 28 Mar 2009 04:04:18 -0300, Chris Rebert escribió: On Fri, Mar 27, 2009 at 6:24 PM, Gabriel Genellina wrote: En Fri, 27 Mar 2009 17:48:33 -0300, Sibylle Koczian escribió: Terry Reedy schrieb: Calendar is an ancient and not-well-maintained module which may even predate html.  (Th

Re: Unladen-Swallow: A faster python

2009-03-28 Thread Dotan Cohen
> This is a new project started by two Google engineers to speed up > python: > http://code.google.com/p/unladen-swallow/ > There is a decent discussion going on at slashdot: http://tech.slashdot.org/article.pl?sid=09/03/27/1934256 -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -

Re: if there is a return type of a method definition like java does

2009-03-28 Thread Diez B. Roggisch
Coonay schrieb: if there is a return type of a method definition,that would lead to faster decision to do with the method called,do you think so? No, because python has no overloaded methods - there is just one method called. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Profiler throws NameError on any function

2009-03-28 Thread Gabriel Genellina
En Thu, 26 Mar 2009 11:42:57 -0300, Philipp Lies escribió: I'm trying to run the python profiler on some code but I always get NameErrors, even for the simplest case taken from the docs: import profile def foo(): a = 5 def prof(): profile.run('foo()') When I run prof() I get the foll

Re: Ordered Sets

2009-03-28 Thread Gabriel Genellina
En Thu, 26 Mar 2009 12:20:17 -0300, Scott David Daniels escribió: (2) Why, oh why, do people feel so comforted adding double_underscores to data structures? If I want to inherit from your mapping in order to log the attempts to discard a key not actually in the set, I have to

Re: Python AppStore / Marketplace

2009-03-28 Thread Kushal Kumaran
On Fri, 27 Mar 2009 08:16:01 -0700 Daniel Fetchinson wrote: > > > > > > Just a GUI for package management that lets you seperate what is > > available for the python platform that you are running on. Install, > > deinstall, and get package information. > > > > https://sourceforge.net/projects/pyt

Re: Calendar module: HTMLCalendar overrides style sheet settings

2009-03-28 Thread Chris Rebert
On Fri, Mar 27, 2009 at 6:24 PM, Gabriel Genellina wrote: > En Fri, 27 Mar 2009 17:48:33 -0300, Sibylle Koczian > escribió: > >> Terry Reedy schrieb: >>> >>> Calendar is an ancient and not-well-maintained module which may even >>> predate html.  (There have even been suggestions that it be droppe