Re: Sending multi-part MIME package via HTTP-POST

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > ... but I'm getting a very vague server error message ... Which is? -- http://mail.python.org/mailman/listinfo/python-list

Re: problem using ctypes with MMX intrinsics

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, dcharno wrote: > I can load the library and access functions inside it, but > I getting a seg fault when I hit one of the intrinsics. I assume that SIGSEGV indicates some (mis)alignment issue. If the instructions were not valid, you'd get SIGILL instead. -- http://

Re: Anyone Have (XP) 2.4.4 Installed and Can Check This Simple matplotlib Program?

2008-10-14 Thread pjacobi . de
On Oct 15, 6:38 am, "W. eWatson" <[EMAIL PROTECTED]> wrote: > I'm going to try another stab at this problem again. I'd like someone with > 2.4.4 and matplotlib-0.98.3.win32-py2.4exe to try it (below). IMHO an important detail of your configuration is missing. What's your numerical library? Did yo

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-14 Thread sulyokpeti
On okt. 14, 10:09, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > > It is not convincing to look at an XML file alone. Let me give you an > > example. Glade is a GTK+ application for creating GTK+ GUI. It > > generates an XML file, that can be loaded in every programming > >

Re: strip module bug

2008-10-14 Thread Tim Roberts
"Poppy" <[EMAIL PROTECTED]> wrote: > >Thanks Steven and Tim, I understand the strip module a lot more today. It's NOT a module. It is a method of string objects. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Deviation from object-relational mapping (pySQLFace)

2008-10-14 Thread sulyokpeti
On okt. 14, 13:26, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 14 Okt, 00:43, [EMAIL PROTECTED] wrote: > > > > > It is not convincing to look at an XML file alone. Let me give you an > > example. Glade is a GTK+ application for creating GTK+ GUI. It > > generates an XML file, that can be loaded in

Re: Can Python fix vcard files?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Paul Boddie wrote: > The vCard specification (RFC 2426 [1]) refers to RFC 2425 [2], which > says this in section 5.8.1: > > A logical line MAY be continued on the next physical line anywhere > between two characters by inserting a CRLF immediately followed by a

Anyone Have (XP) 2.4.4 Installed and Can Check This Simple matplotlib Program?

2008-10-14 Thread W. eWatson
I'm going to try another stab at this problem again. I'd like someone with 2.4.4 and matplotlib-0.98.3.win32-py2.4exe to try it (below). It produces a runtime error, and python (IDLE) dies. If I use from the console "import matplotlib" or variations (pythonw), it fails. I think is the final s

Re: Pylab Fails with Runtime Error on Win XP Under Python 2.4

2008-10-14 Thread W. eWatson
Gabriel Genellina wrote: En Sun, 12 Oct 2008 23:45:15 -0300, W. eWatson <[EMAIL PROTECTED]> escribió: The meat of the matter is the Fatal error msg I copied below. To me it indicates a serious error. Maybe some developer can sort it out. From above post. ++ A

Re: docpicture

2008-10-14 Thread bearophileHUGS
André: > A more complete example is now available at > http://code.activestate.com/recipes/576538/ Nice. >The idea for this recipe was mentioned on the Python mailing list as something >desirable and apparently done by someone< That someone has a nickname you can use, I am known in the cookboo

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
Martin v. Löwis wrote: On Windows, you shouldn't reinstall, but instead run the "repair" installation, from "Add and remove programs". Do you mean on the Win Control Panel? Yes. This is, Remove and Add? This question I do not understand. *What* is "Remove and Add"? I'm talking about the

Re: default value in __init__

2008-10-14 Thread Daniel da Silva
I would just like to add to the discussion that 4as a second year computer science undergraduate and I noticed the same "issue" with default arguments, but I was able to figure out the system of how (and why) python does it the way it does, without having to consult any documentation offline or onl

Re: docpicture

2008-10-14 Thread Aaron "Castironpi" Brady
On Oct 14, 11:56 am, [EMAIL PROTECTED] wrote: > André: > > > Ok, the following is my first attempt at implementing this idea. > > I suggest you to change the program you use to encode your images, > because it's 1000 bytes, while with my program the same 256 colors > image needs just 278 bytes: > >

Re: Implementing my own Python interpreter

2008-10-14 Thread Scott David Daniels
Stefan Behnel wrote: You should take a look at Cython, which translates Python code to C. Also take a gander at RPython in the PyPy project. It is a restricted subset of Python on top of which they implement Python. --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/list

Earn 5000$ Without Investment.

2008-10-14 Thread chinu
hai, i am srinu from india. i am sending a blog url for yours use. Right side Of The Blog Awsurvey Banner will appear. click on the banner and get a free signup with 6$ bonus and you will get more surveys. once you have completed one survey you will get minimem 4$ and more left side of the blog

Re: docpicture

2008-10-14 Thread André
On Oct 14, 1:56 pm, [EMAIL PROTECTED] wrote: > André: > > > Ok, the following is my first attempt at implementing this idea. > > I suggest you to change the program you use to encode your images, > because it's 1000 bytes, while with my program the same 256 colors > image needs just 278 bytes: > >

Re: inspect feature

2008-10-14 Thread Aaron "Castironpi" Brady
On Oct 14, 4:16 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 5:00 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: (snip > > Here's some more info. > > > Ver 2.5: > > > >>> f( c= 0, c= 0 ) > > > Traceback (most recent call last): > >   File "", line 1, in > > TypeEr

problem using ctypes with MMX intrinsics

2008-10-14 Thread dcharno
Is it possible to use ctypes with a shared library which uses MMX/SSE intrinsics? I can load the library and access functions inside it, but I getting a seg fault when I hit one of the intrinsics. I'm wondering if there might be some sort of stack alignment problem. I am using gcc version 4.

Re: PyGUI as a standard GUI API for Python?

2008-10-14 Thread greg
Paul Boddie wrote: there are a few things with regard to layouts which are very difficult with Web technologies (and aren't getting any easier, either) but which are almost trivial with classic graphical user interface toolkits, and of course there are cases where the roles are reversed. I've w

Re: Question

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Aditi Meher wrote: > How to write code to store data into buffer using python? Write following code: buffer = data -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > If you're an Emacs user who has used both python-mode.el (the python mode > code distributed with Python and XEmacs) and python.el (the python mode > code distributed with GNU Emacs), I'd like to get your impressions on how > they compare

Re: documentation: what is "::="?

2008-10-14 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Anita Kean wrote: > I'm still curious about why isn't ["::="] documented ... It is . -- http://mail.python.org/mailman/listinfo/python-list

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread skip
Paul> Main thing I know is that C-c ! used to make a new Python Paul> subwindow and now it doesn't, which is bad. That's probably the newer FSF version, python.el. Someone else complained that it didn't do Python interpreters. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGUI as a standard GUI API for Python?

2008-10-14 Thread David Boddie
On Tuesday 14 October 2008 12:55, lkcl wrote: > hello_loader.py is the main err um i just double- > checked, so i'd be able to advise you and... err... the problem i > described (with the GridTest) seems to have... gone away!! There are lots of references to PyGTK classes in there.

Re: compile() and comments

2008-10-14 Thread Terry Reedy
Steve Holden wrote: Ed Leafe wrote: On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote: It is certainly an odd restriction, but the docs for compile [1] do explicitly state that the input must be newline terminated. Understood; what I found odd was that if the last non-newline-terminated statem

Re: Set Environment for java based tools thru python script

2008-10-14 Thread Derek Martin
On Mon, Oct 13, 2008 at 05:07:16PM -0700, [EMAIL PROTECTED] wrote: > I run a Java app with subprocess from Python script. This python > script is called from another Python Wrapper. > > > python = subprocess.Popen(["toolname.sh", "-args", arg1, arg2], > stdout=su

Re: documentation: what is "::="?

2008-10-14 Thread Anita Kean
On 2008-10-14, Peter Otten <[EMAIL PROTECTED]> wrote: > Anita Kean wrote: >>... >> But for example, if I import the sys module and perform the following >> three commands, >> print sys.path >> sys.path.__str__() >> str(sys.path) >> >> the first two give me the python path, and the last reports an

Re: Unittest - adding a doctest suite to unittest.main

2008-10-14 Thread Ben Finney
Duncan Booth <[EMAIL PROTECTED]> writes: > Create a function named test_suite which creates a test suite > containing all your tests including the doctests. Pass that to main > as the defaultTest argument. Better to name it ‘suite’, so that its name doesn't match the default search for individual

Re: csv to excel format problem

2008-10-14 Thread John Machin
On Oct 15, 3:49 am, MM <[EMAIL PROTECTED]> wrote: > On 14 Ott, 12:03, MM <[EMAIL PROTECTED]> wrote: > > I'm trying to import a tab separated values file onto Excel with the > > following script: > > > import csv > > from pyExcelerator import * Consider using xlwt instead ... see http://pypi.pytho

Re: python3 - the hardest hello world ever ?

2008-10-14 Thread Ben Finney
Helmut Jarausch <[EMAIL PROTECTED]> writes: > I have to set an internal property (with leading underscore) > for each output file I'm using - right? If you're referring to the source encoding declaration: No, underscores have no effect. The specification is at http://www.python.org/doc/2.5.2/ref/

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread Paul Rubin
[EMAIL PROTECTED] writes: > If you're an Emacs user who has used both python-mode.el (the python mode > code distributed with Python and XEmacs) and python.el (the python mode code > distributed with GNU Emacs), I'd like to get your impressions on how they > compare and where you feel the bugs lie.

Re: splitting a string into an array using a time value

2008-10-14 Thread Gabriel Genellina
En Tue, 14 Oct 2008 18:08:53 -0300, Joe Python <[EMAIL PROTECTED]> escribió: I want to find a way to split a string into an array using a time value. s = r""" 8/25/2008 11:10:08 AM Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed imperdiet luctus nisl. ipsum vel arcu

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread Martin v. Löwis
>> On Windows, you shouldn't reinstall, but instead run the "repair" >> installation, from "Add and remove programs". >> > Do you mean on the Win Control Panel? Yes. > This is, Remove and Add? This question I do not understand. *What* is "Remove and Add"? I'm talking about the "Add or [not an

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread Diez B. Roggisch
Bruno Desthuilliers schrieb: [EMAIL PROTECTED] a écrit : If you're an Emacs user who has used both python-mode.el (the python mode code distributed with Python and XEmacs) and python.el (the python mode code distributed with GNU Emacs), I'd like to get your impressions on how they compare and

Re: inspect feature

2008-10-14 Thread George Sakkis
On Oct 14, 5:00 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 14, 2:32 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Oct 14, 2:35 pm, "Aaron \"Castironpi\" Brady" > > > <[EMAIL PROTECTED]> wrote: > > > On Oct 14, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote: >

Re: default value in __init__

2008-10-14 Thread Aaron "Castironpi" Brady
On Oct 14, 1:50 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > David C. Ullrich a écrit : > > > > > In article <[EMAIL PROTECTED]>, > >  Bruno Desthuilliers <[EMAIL PROTECTED]> > >  wrote: snip > (snip) snip > > In particular default parameters should work the way the user > > expects! The fa

Re: C API with *args and **kw

2008-10-14 Thread Miki
> Miki <[EMAIL PROTECTED]> writes: > > However when running the test: > > from kw import kw > > kw(default="2") > > kw(1) > > kw() > > > I get "bus error" on the 2'nd call (OS X Python 2.5.2). > > When called without keywords, kwds is NULL.  You need to handle that > case explicitly. Great, thanks!

splitting a string into an array using a time value

2008-10-14 Thread Joe Python
I want to find a way to split a string into an array using a time value. s = r""" 8/25/2008 11:10:08 AM Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed imperdiet luctus nisl. ipsum vel arcu gravida mattis. In mattis dolor id sem. Praesent dictum tortor non lacus. 0/3/200

Re: C API with *args and **kw

2008-10-14 Thread Miki
> > I'm try to write the C equivalent of: > > Use PyArg_ParseTupleAndKeywords() to parse the args and kwargs objects. Couldn't figure out how to get *args with ParseTupleAndKeywords. Thanks, Miki -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
Martin v. Löwis wrote: W. eWatson wrote: I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it On Windows, you shouldn't reinstall, but instead run the "repair" installation, from "Add and remove programs". Regards, Martin Do you mean on the Win Control Pan

Re: Making class attributes non-case-sensitive?

2008-10-14 Thread Matimus
> So is iterating through dir() to force both the members of dir(), and > the requested attribute name, to lower case for a comparison, really > the easiest way? > > Thanks again for sticking with me. I hope I didn't add to the > confusion. What I learn I will of course pass on. > > - Rafe It stil

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread W. eWatson
Terry Reedy wrote: Steve Holden wrote: W. eWatson wrote: I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it, and still expect to have scipy and other pkgs I've installed? On Windows, certainly - you can even uninstall and reinstall and retain your install

Re: inspect feature

2008-10-14 Thread Aaron "Castironpi" Brady
On Oct 14, 2:32 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 2:35 pm, "Aaron \"Castironpi\" Brady" > > > > <[EMAIL PROTECTED]> wrote: > > On Oct 14, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > On Oct 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > > wrote: > > >

Re: replace mothod for only one object but not for a class

2008-10-14 Thread George Sakkis
On Oct 14, 12:28 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > George Sakkis a écrit : > > > > > On Oct 14, 1:50 pm, hofer <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> I have multiple objects all belonging to the same class > >> (which I didn't implement and whose code I don't want to modify)

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Bruno Desthuilliers
Christian Heimes a écrit : Bruno Desthuilliers wrote: If the class is a new-style one [1], it just requires invoking the descriptor protocol by yourself to get a bound method, ie: Another note about new style classes: You can NOT overwrite most magic methods (__*__) on the instance. Most magi

Re: default value in __init__

2008-10-14 Thread Bruno Desthuilliers
David C. Ullrich a écrit : In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: David C. Ullrich a écrit : (snip) Seems to me that people often site the "important warning" in the tutorial. Of course there's no reason anyone would bother going through the tutoria

Re: C API with *args and **kw

2008-10-14 Thread Hrvoje Niksic
[ Note that there's a mailing list dedicated to the C API, http://mail.python.org/mailman/listinfo/capi-sig ] Miki <[EMAIL PROTECTED]> writes: > However when running the test: > from kw import kw > kw(default="2") > kw(1) > kw() > > I get "bus error" on the 2'nd call (OS X Python 2.5.2). When

Re: C API with *args and **kw

2008-10-14 Thread Stefan Behnel
Miki wrote: > I'm try to write the C equivalent of: > > def kw(*args, **kw): > print "%d args" % len(args), > if "default" in kw: > print "default is %s" % kw["default"] > else: > print "no default" Consider using Cython instead, it will make your life a lot easier. Th

Re: Excel 2007 Charts with PyWin32

2008-10-14 Thread Ally
Solved. See http://bytes.com/forum/thread482449.html application = Dispatch("Excel.Application") should be application = win32com.client.gencache.EnsureDispatch('Excel.Application') -- http://mail.python.org/mailman/listinfo/python-list

Re: Implementing my own Python interpreter

2008-10-14 Thread Stefan Behnel
Ognjen Bezanov wrote: > Also, any pro's out there willing to chime on the feasibility of > implementing python to run directly on the hardware (without an > underlying OS)? I don't expect 100% compatibility, but would the basics > (branching, looping, arithmatic) be feasible? You should take a loo

Re: python3 - the hardest hello world ever ?

2008-10-14 Thread Brian Quinlan
Hey Helmut, Did you try just: print("Hallo, Süßes Python") Cheers, Brian Helmut Jarausch wrote: Hi, do I miss something (I do hope so) or is switching to Python3 really hard for Latin1-users? My simplest hello world script - which uses a few German umlaut characters - doesn't look very intu

Re: Upgrading from 2.5 to 2.6

2008-10-14 Thread Steve Holden
Martin v. Löwis wrote: >> I'd say the wording in the installer is unfortunate. The option is >> labeled "Register extensions" and for some time I thought it was related >> to .pyd/.dll files ("C extensions"), not "Associate .py files to this >> Python installation" > > Unfortunately, I think this

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Christian Heimes
Bruno Desthuilliers wrote: If the class is a new-style one [1], it just requires invoking the descriptor protocol by yourself to get a bound method, ie: Another note about new style classes: You can NOT overwrite most magic methods (__*__) on the instance. Most magic methods are only looked up

Re: C API with *args and **kw

2008-10-14 Thread Christian Heimes
Miki wrote: Hello All, I'm try to write the C equivalent of: Use PyArg_ParseTupleAndKeywords() to parse the args and kwargs objects. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: inspect feature

2008-10-14 Thread George Sakkis
On Oct 14, 2:35 pm, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]> wrote: > On Oct 14, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote: > > > > > On Oct 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > > > > En Fri, 10 Oct 2008 14:18:53 -0300, Aaron "Castironpi" Brady > > > <[EM

Re: python3 - the hardest hello world ever ?

2008-10-14 Thread Martin v. Löwis
> do I miss something (I do hope so) or is switching to Python3 > really hard for Latin1-users? Why do you want to switch? sys.stdout.encoding should already be iso-8859-1, if you are a Latin1-user. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

App Question.

2008-10-14 Thread bruce
Hi list!! Got a question, and I can't find a good answer for, so I figured i'd post here. I'm working on a project that involves a number of smaller apps to be developed, and run. In order to build this overall application, I'm trying to find a web based app that I can use to manage the entire pro

Re: Launching scripts in Ubuntu ?

2008-10-14 Thread Gabriel Genellina
En Tue, 14 Oct 2008 10:46:34 -0300, Stef Mientki <[EMAIL PROTECTED]> escribió: well the command prompt (if it is called that way in Linus) is not returned. When I run file_support, the command window looks like this >>>python file_support.py . all kinds of output >>> When I run test.py

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread Martin v. Löwis
W. eWatson wrote: > I suspect something has been corrupted in Python 2.4. Can I just > re-install on top of it On Windows, you shouldn't reinstall, but instead run the "repair" installation, from "Add and remove programs". Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Question

2008-10-14 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, "Aditi Meher" <[EMAIL PROTECTED]> wrote: > Hello > > How to write code to store data into buffer using python? buffer = data > Please reply. -- David C. Ullrich -- http://mail.python.org/mailman/listinfo/python-list

Excel 2007 Charts with PyWin32

2008-10-14 Thread Ally
Hi all, I’m looking to plot charts in Excel from python. After some Googling I’ve found the following code: def plot(x, y, xAxisLog=False, yAxisLog=False): # acquire application object, which may start application application = Dispatch("Excel.Application") # create new file ('Workbo

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread Terry Reedy
Steve Holden wrote: W. eWatson wrote: I suspect something has been corrupted in Python 2.4. Can I just re-install on top of it, and still expect to have scipy and other pkgs I've installed? On Windows, certainly - you can even uninstall and reinstall and retain your installed libraries. On Lin

Re: Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : If you're an Emacs user who has used both python-mode.el (the python mode code distributed with Python and XEmacs) and python.el (the python mode code distributed with GNU Emacs), I'd like to get your impressions on how they compare and where you feel the bugs lie. I'

Re: Question

2008-10-14 Thread Gabriel Genellina
En Tue, 14 Oct 2008 03:27:37 -0300, Aditi Meher <[EMAIL PROTECTED]> escribió: I am using ubuntu operating system,i am using python and self app for DB storage. I hv already mentioned in my question that i want to display 10 records out of 100,how to create buffer to store remaining records wh

Re: Upgrading from 2.5 to 2.6

2008-10-14 Thread Martin v. Löwis
> I'd say the wording in the installer is unfortunate. The option is > labeled "Register extensions" and for some time I thought it was related > to .pyd/.dll files ("C extensions"), not "Associate .py files to this > Python installation" Unfortunately, I think this is too long for the available s

Re: gmpy and counting None

2008-10-14 Thread Robert Kern
Mensanator wrote: On Oct 14, 12:14 pm, Robert Kern <[EMAIL PROTECTED]> wrote: Mensanator wrote: On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: Mensanator wrote: On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: Hi, I just stumbled upon the following issue (I am running Debian): $ py

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Bruno Desthuilliers
hofer a écrit : Hi, I have multiple objects all belonging to the same class (which I didn't implement and whose code I don't want to modify) Now I'd like to change one method for one object only (after it has been created) without adding any overhead to the call of the other object's methods.

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Jason Scheirer
On Oct 14, 11:20 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 1:50 pm, hofer <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I have multiple objects all belonging to the same class > >  (which I didn't implement and whose code I don't want to modify) > > > Now I'd like to change one met

Re: default value in __init__

2008-10-14 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > David C. Ullrich a écrit : > > In article > > <[EMAIL PROTECTED]>, > > kenneth <[EMAIL PROTECTED]> wrote: > > > >> On Oct 9, 10:14 am, Christian Heimes <[EMAIL PROTECTED]> wrote: > >>> kenneth wrote: > the

Tkinter question: howto redirect text output (stdout) to Text widget?

2008-10-14 Thread dmitrey
hi all, could anyone post an example how to redirect text output (stdout) to Text widget? Thank you in advance, Dmitrey. -- http://mail.python.org/mailman/listinfo/python-list

Re: inspect feature

2008-10-14 Thread Aaron "Castironpi" Brady
On Oct 14, 9:42 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > En Fri, 10 Oct 2008 14:18:53 -0300, Aaron "Castironpi" Brady > > <[EMAIL PROTECTED]> escribió: > > > > On Oct 10, 3:36 am, Bruno Desthuilliers > > [EMAIL PR

Re: Plotting libraries recommendations

2008-10-14 Thread Daniel da Silva
Seconded. If you are familiar with Matlab plotting at all, the interface is nearly identical, and the graphics are great. Daniel On Tue, Oct 14, 2008 at 9:19 AM, eliben <[EMAIL PROTECTED]> wrote: > On Oct 14, 1:18 pm, sert <[EMAIL PROTECTED]> wrote: > > I'm developing a circuit simulation applic

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Bruno Desthuilliers
George Sakkis a écrit : On Oct 14, 1:50 pm, hofer <[EMAIL PROTECTED]> wrote: Hi, I have multiple objects all belonging to the same class (which I didn't implement and whose code I don't want to modify) Now I'd like to change one method for one object only (after it has been created) without a

Re: replace mothod for only one object but not for a class

2008-10-14 Thread George Sakkis
On Oct 14, 1:50 pm, hofer <[EMAIL PROTECTED]> wrote: > Hi, > > I have multiple objects all belonging to the same class > (which I didn't implement and whose code I don't want to modify) > > Now I'd like to change one method for one object only (after it has > been created) without adding any overh

Re: replace mothod for only one object but not for a class

2008-10-14 Thread Miki
from functools import partial class Point: def __init__(self, x, y): self.x, self.y = x, y def show(self, n): for i in range(n): print "Point: (%s, %s)" % (self.x, self.y) def new_method(obj, func): def method(*args, **kw): return func(obj, *args,

C API with *args and **kw

2008-10-14 Thread Miki
Hello All, I'm try to write the C equivalent of: def kw(*args, **kw): print "%d args" % len(args), if "default" in kw: print "default is %s" % kw["default"] else: print "no default" I've written: static PyObject * kw(PyObject *self, PyObject *args, PyObject *kwds) {

Re: gmpy and counting None

2008-10-14 Thread Mensanator
On Oct 14, 12:14 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > Hi, > I just stumbled upon the following issue (I am running Debian)

replace mothod for only one object but not for a class

2008-10-14 Thread hofer
Hi, I have multiple objects all belonging to the same class (which I didn't implement and whose code I don't want to modify) Now I'd like to change one method for one object only (after it has been created) without adding any overhead to the call of the other object's methods. Is this possible

Emacs users: feedback on diffs between python-mode.el and python.el?

2008-10-14 Thread skip
If you're an Emacs user who has used both python-mode.el (the python mode code distributed with Python and XEmacs) and python.el (the python mode code distributed with GNU Emacs), I'd like to get your impressions on how they compare and where you feel the bugs lie. I'm nominally one of the python-

Re: gmpy and counting None

2008-10-14 Thread Robert Kern
Mensanator wrote: On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: Mensanator wrote: On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: Hi, I just stumbled upon the following issue (I am running Debian): $ python Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) [GCC 4.3.2] on linux2 Type

Re: compile() and comments

2008-10-14 Thread Steve Holden
Ed Leafe wrote: > On Oct 13, 2008, at 8:35 AM, Fuzzyman wrote: > >> It is certainly an odd restriction, but the docs for compile [1] do >> explicitly state that the input must be newline terminated. > > > Understood; what I found odd was that if the last > non-newline-terminated statement wa

How to create Pygments extension for Sphinx

2008-10-14 Thread Glenn Hutchings
Hi there Pythonistas... I'm writing documentation for a non-Python program using Sphinx (http://sphinx.pocoo.org), which is great. The program has an input file syntax suitable for highlighting using Pygments (http:// pygments.org), but, obviously, Pygments knows nothing about it. I've created a

Re: docpicture

2008-10-14 Thread bearophileHUGS
André: > Ok, the following is my first attempt at implementing this idea. I suggest you to change the program you use to encode your images, because it's 1000 bytes, while with my program the same 256 colors image needs just 278 bytes: iVBORw0KGgoNSUhEUgAAABYeCAMfOR5kBGdBTUEAAL GP

Re: gmpy and counting None

2008-10-14 Thread Mensanator
On Oct 13, 5:16 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Oct 13, 2:43 pm, <[EMAIL PROTECTED]> wrote: > >> Hi, > > >> I just stumbled upon the following issue (I am running Debian): > > >> $ python > >> Python 2.5.2 (r252:60911, Sep 29 2008, 21:15:13) > >> [GCC 4.3.2] on

Re: csv to excel format problem

2008-10-14 Thread MM
On 14 Ott, 12:03, MM <[EMAIL PROTECTED]> wrote: > Hi to all, > > I'm trying to import a tab separated values file onto Excel with the > following script: > > import csv > from pyExcelerator import * > > w = Workbook() > worksheet = w.add_sheet('sim1') > > def writeExcelRow(worksheet, lno, columns):

Re: docpicture

2008-10-14 Thread André
On Oct 14, 10:58 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Tue, 14 Oct 2008 06:12:59 -0700, Scott David Daniels wrote: > > Steven D'Aprano wrote: > >> And if not, it's no big deal. Your help string has a clearly labeled > >> few lines of hex: > > >> Help on function spa

Re: docpicture

2008-10-14 Thread bearophileHUGS
Steven D'Aprano: > Unless bearophile is willing to share his code, There's no code: all I do is written in my post, and so far I have done it "manually" :-) Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Unittest - adding a doctest suite to unittest.main

2008-10-14 Thread Paul Moore
On 14 Oct, 16:09, Duncan Booth <[EMAIL PROTECTED]> wrote: > Create a function named test_suite which creates a test suite containing > all your tests including the doctests. Pass that to main as the defaultTest > argument. Ah, thanks. I see now - a suite is itself a test. That makes sense. But ho

Re: Need help with Wxpython

2008-10-14 Thread Mike Driscoll
On Oct 14, 9:36 am, azrael <[EMAIL PROTECTED]> wrote: > Seen it already but looks to complicated. Someone knows a better way? What about the tree control's GetSelection method? That seems to return the TreeItemId. Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Unittest - adding a doctest suite to unittest.main

2008-10-14 Thread Duncan Booth
Paul Moore <[EMAIL PROTECTED]> wrote: > Just before I start diving into the gory details, have I missed a > simple way of adding an additional doctest.DocFileSuite to > unittest.main? Create a function named test_suite which creates a test suite containing all your tests including the doctests.

Re: Safe eval of insecure strings containing Python data structures?

2008-10-14 Thread lkcl
On Oct 13, 6:12 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Oct 13, 8:36 am,lkcl<[EMAIL PROTECTED]> wrote: > > > > > On Oct 9, 4:32 am, "James Mills" <[EMAIL PROTECTED]> wrote: > > > > On Thu, Oct 9, 2008 at 2:26 PM, Warren DeLano <[EMAIL PROTECTED]> wrote: > > > > JSON rocks! Thanks everyon

Re: Can Python fix vcard files?

2008-10-14 Thread Peter Pearson
On Tue, 14 Oct 2008 03:23:37 +0200, Dotan Cohen <[EMAIL PROTECTED]> wrote: > 2008/10/14 <[EMAIL PROTECTED]>: >> >>Dotan> Can Python go through a directory of files and replace each >>Dotan> instance of "newline-space" with nothing? >> >> Sure. Something like (*completely* untested, so cav

Re: Installing Python 2.4 over 2.4?

2008-10-14 Thread Steve Holden
W. eWatson wrote: > I suspect something has been corrupted in Python 2.4. Can I just > re-install on top of it, and still expect to have scipy and other pkgs > I've installed? On Windows, certainly - you can even uninstall and reinstall and retain your installed libraries. On Linux I am pretty sur

Re: Can Python fix vcard files?

2008-10-14 Thread Paul Boddie
On 14 Okt, 13:06, Paul Boddie <[EMAIL PROTECTED]> wrote: > On 14 Okt, 02:31, "Dotan Cohen" <[EMAIL PROTECTED]> wrote: > > > KDE's Kontact PIM breaks quoted-printable vcard files because it > > linebreaks in the middle of a word. Take this text for example: > > NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRI

Re: inspect feature

2008-10-14 Thread George Sakkis
On Oct 14, 3:06 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 10 Oct 2008 14:18:53 -0300, Aaron "Castironpi" Brady > <[EMAIL PROTECTED]> escribió: > > > > > On Oct 10, 3:36 am, Bruno Desthuilliers > [EMAIL PROTECTED]> wrote: > >> I don't get what you're after ??? The decorator has f

Re: Need help with Wxpython

2008-10-14 Thread azrael
Seen it already but looks to complicated. Someone knows a better way? -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with Wxpython

2008-10-14 Thread Mike Driscoll
On Oct 14, 9:00 am, azrael <[EMAIL PROTECTED]> wrote: > I need to implement a tree which will append a root. Any other node in > the tree will be triggered when a button is pressed. > I created the button, all the needed events, tree and a root. But when > I want to append a node pressing the butto

Re: Wx.Grid and popup over cells

2008-10-14 Thread Massi
On 14 Ott, 16:13, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Oct 14, 5:21 am, Massi <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > > I'm writing a python script which uses a grid (PyGridTableBase) whose > > cells can contain very large values (not only numbers, but also > > strings). I've als

Re: Can Python fix vcard files?

2008-10-14 Thread Dotan Cohen
2008/10/14 Paul Boddie <[EMAIL PROTECTED]>: >> Can Python go through a directory of files and replace each instance >> of "newline-space" with nothing? The system is Ubuntu 8.04 with KDE if >> it matters. Thanks. > > You should file a bug against Kontact: the KDE developers love fixing > bugs, espe

Re: Python IDLE and Access Denied

2008-10-14 Thread W. eWatson
W. eWatson wrote: Dennis Lee Bieber wrote: On Mon, 13 Oct 2008 19:07:06 -0700, "W. eWatson" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: I had just finished working with IDLE, and tried to double-click on a py file. It produced an OK dialog with the path to the file and the

  1   2   >