Re: Recursion error in metaclass

2011-06-10 Thread Terry Reedy
On 6/10/2011 11:34 PM, Steven D'Aprano wrote: I have a metaclass in Python 3.1: class MC1(type): @staticmethod def get_mro(bases): print('get_mro called') return type('K', bases, {}).__mro__[1:] The call to type figures out the proper metaclass from bases and forwa

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread Dennis
2011/6/10 可乐 : > On 6月11日, 下午12时03分, Javier wrote: >> ?? wrote: >> > i want to learn pyqt ,but i have no c++ knowlage. is it ok >> >> It should be ok. I would recoomend this book: >> >> "Rapid GUI Programming with Python and Qt" (Prentice Hall Open Source >> Software >> Development) >>

(*args **kwargs) how do I use' em?

2011-06-10 Thread TheSaint
Hello, I'm seldomly writng python code, nothing but a beginner code. I wrote these lines >> = _log_in= mhandler.ConnectHandler(lmbox, _logger, accs) multhr= sttng['multithread'] if multhr: _log_in= mhandler.mThreadSession(lmbox, _log

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread 可乐
On 6月11日, 下午12时03分, Javier wrote: > ?? wrote: > > i want to learn pyqt ,but i have no c++ knowlage. is it ok > > It should be ok. I would recoomend this book: > > "Rapid GUI Programming with Python and Qt" (Prentice Hall Open Source Software > Development) > Mark Summerfield (Author) tha

Re: i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread Javier
?? wrote: > i want to learn pyqt ,but i have no c++ knowlage. is it ok It should be ok. I would recoomend this book: "Rapid GUI Programming with Python and Qt" (Prentice Hall Open Source Software Development) Mark Summerfield (Author) -- http://mail.python.org/mailman/listinfo/pyth

[no subject]

2011-06-10 Thread burl rollinlife
Íàì, ãîâîðèò, î÷åíü ïðèÿòíî, è íàì íóæíû îáðàçîâàííûå Îíè íå ïðîñ÷èòàþò Âû, ãîâîðèò, òîæå, êàæåòñÿ, ïî êîììåð÷åñêîé ÷àñòè?   http://rayjonz8231.de.tl/esp1006nimfia.htm  -- http://mail.python.org/mailman/listinfo/python-list

Recursion error in metaclass

2011-06-10 Thread Steven D'Aprano
I have a metaclass in Python 3.1: class MC1(type): @staticmethod def get_mro(bases): print('get_mro called') return type('K', bases, {}).__mro__[1:] def __new__(cls, name, bases, dict): mro = None docstring = dict.get('__doc__') if docstring == '

i want to learn pyqt ,but i have no c++ knowlage. is it ok????

2011-06-10 Thread 可乐
i want to learn pyqt ,but i have no c++ knowlage. is it ok -- http://mail.python.org/mailman/listinfo/python-list

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 14:46:06 -0700, Carl Banks wrote: > On Friday, June 10, 2011 2:51:20 AM UTC-7, Steven D'Aprano wrote: >> On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: >> > Put it this way: if Python doesn't automatically inherit docstrings, >> > the worst that can happen is missing inf

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Terry Reedy
On 6/10/2011 6:30 AM, Francesc Segura wrote: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG<= cost + T0): TypeError: unsupported operand t

Re: PyQt

2011-06-10 Thread Terry Reedy
On 6/10/2011 3:15 PM, KK wrote: Thanks for the reply!! i ve installed the binary but when i import anything of PyQt in my prog it says error?? i think there is some problem with folders If you install in python32/Lib/site-packages, it should work. But see Andrew's message. Show both

Re: best book about Webdesign with Django

2011-06-10 Thread Zachary Dziura
I found that Head First Python gives a really good introduction to Django. It's definitely a beginners book, as are all of the Head First books, but it still teaches the basics in a very good manner. If you're very knowledgeable with Python, you can skip the first few chapters (or read through

Re: __doc__ immutable for classes

2011-06-10 Thread Terry Reedy
On 6/10/2011 3:31 AM, Gregory Ewing wrote: Eric Snow wrote: But for "method" objects (really a wrapper for bound functions) would it change the __doc__ of the wrapper or of the bound function? You probably wouldn't want to change the __doc__ of a method wrapper; instead you'd make sure you got

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 07:30:28 -0300, Francesc Segura escribió: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG <= cost + T0): TypeError: un

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 07:30:28 -0300, Francesc Segura escribió: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG <= cost + T0): TypeError: un

Re: uhmm... your chance to spit on me

2011-06-10 Thread Jim Burton
Xah Lee writes: > Dear lisp comrades, it's Friday! > The answers to your question give poor coverage of the possible responses to your writing. I myself enjoy reading what you write, most of the time, but become bored and fed up with the way you sometimes seem unaccountably angry with the rest of

Re: best book about Webdesign with Django

2011-06-10 Thread News123
Hi Thomas, APologies for not being clear enough in my question. On 06/09/2011 04:40 PM, Thomas Guettler wrote: > On 08.06.2011 12:29, News123 wrote: >> Hi, >> >> >> Do you have any recommendations for a good book about Web design with >> Django? > > You can do web design with HTML, CSS and Jav

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Thu, Jun 9, 2011 at 12:22 AM, Eric Snow wrote: > Sometimes when using class inheritance, I want the overriding methods > of the subclass to get the docstring of the matching method in the > base class.  You can do this with decorators (after the class > definition), with class decorators, and w

Re: ContextDecorator via contextmanager: broken?

2011-06-10 Thread Ian Kelly
On Fri, Jun 10, 2011 at 4:57 PM, Ian Kelly wrote: > So as far as I can tell, generator-based context managers simply can't > be used as ContextDecorators.  Furthermore, the documentation's claim > that they can is actually harmful, since they *appear* to work at > first.  Or am I simply missing so

ContextDecorator via contextmanager: broken?

2011-06-10 Thread Ian Kelly
Python 3.2 has this lovely new contextlib.ContextDecorator mixin [1] for context manager classes that allows you to apply the context manager as a decorator. The docs for this feature include the note: ContextDecorator is used by contextmanager(), so you get this functionality automatically.

Re: Function declarations ?

2011-06-10 Thread Asen Bozhilov
Andre Majorel wrote: > Is there a way to keep the definitions of the high-level > functions at the top of the source ? I don't see a way to > declare a function in Python. I am not a Python developer, but Pythonic way of definition not declaration is definitely interesting. Languages with variabl

Re: help on QUICKFIX

2011-06-10 Thread Gabriel Genellina
En Fri, 10 Jun 2011 04:13:05 -0300, prakash jp escribió: I am using quickfix, would like to start with that ..\quickfix-1.13.3\quickfix\examples\executor\python\executor.py asks for a configuration file how should it look like. This one? http://www.quickfixengine.org/ I see a forum and

Re: Help with a piping error

2011-06-10 Thread virdo
On Jun 10, 5:56 pm, Hans Mulder wrote: > On 10/06/11 22:56:06, virdo wrote: > > > > > > > > > > > On Jun 10, 4:48 pm, John Gordon  wrote: > >> In<6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com>   > >> virdo  writes: > > >>> My python file is simple print "test". I run it, it wor

Help for chimera

2011-06-10 Thread Chinmaya Rajiv Joshi
Hello, I am trying to create a movie in chimera UCSF using the python scripts. I want to take an input of certain images, rotate, translate, etc and make a movie out of them all through the command line. So if I were give a series of images from a matlab code, my script would generate a video o

Re: the stupid encoding problem to stdout

2011-06-10 Thread Chris Angelico
2011/6/11 Sérgio Monteiro Basto : > ok after thinking about this, this problem exist because Python want be > smart with ttys The *anomaly* (not problem) exists because Python has a way of being told a target encoding. If two parties agree on an encoding, they can send characters to each other. I

Re: Question About Command line arguments

2011-06-10 Thread Hans Mulder
On 10/06/11 20:03:44, Kurt Smith wrote: On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? def main(): import sys print sys.stdin.read() if __name__ == '__main__':

Re: Help with a piping error

2011-06-10 Thread Hans Mulder
On 10/06/11 22:56:06, virdo wrote: On Jun 10, 4:48 pm, John Gordon wrote: In<6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com> virdo writes: My python file is simple print "test". I run it, it works no problem. I pipe the output to a file "run> logfile" and that's the err

Re: how to inherit docstrings?

2011-06-10 Thread Carl Banks
On Friday, June 10, 2011 2:51:20 AM UTC-7, Steven D'Aprano wrote: > On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: > > Put it this way: if Python doesn't automatically inherit docstrings, the > > worst that can happen is missing information. If Python does inherit > > docstrings, it can lea

Re: how to inherit docstrings?

2011-06-10 Thread Carl Banks
On Thursday, June 9, 2011 10:18:34 PM UTC-7, Ben Finney wrote: [snip example where programmer is expected to consult class docstring to infer what a method does] > There's nothing wrong with the docstring for a method referring to the > context within which the method is defined. > > > Whenever

Re: Question About Command line arguments

2011-06-10 Thread Tim Chase
On 06/10/2011 04:00 PM, Benjamin Kaplan wrote: On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase if os.isatty(sys.stdin): #<-- this check Any reason for that over sys.stdin.isatty()? my knowledge of os.isatty() existing and my previous lack of knowledge about sys.stdin.isatty() :) -tkc -

Re: PyQt

2011-06-10 Thread Benjamin Kaplan
On Fri, Jun 10, 2011 at 12:15 PM, KK wrote: > Thanks for the reply!! > i ve installed the binary > but when i import anything of PyQt in my prog it says error?? > i think there is some problem with folders What is the exact text of the error message? We can't help you unless we know

Re: Question About Command line arguments

2011-06-10 Thread Benjamin Kaplan
On Fri, Jun 10, 2011 at 11:31 AM, Tim Chase wrote: > On 06/10/2011 12:58 PM, Mark Phillips wrote: >> >> How do I write my script so it picks up argument from the >> output of commands that pipe input into my script? > > You can check > >  if os.isatty(sys.stdin):  # <-- this check Any reason for

Re: Help with a piping error

2011-06-10 Thread virdo
On Jun 10, 4:48 pm, John Gordon wrote: > In <6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com> virdo > writes: > > > My python file is simple print "test". I run it, it works no problem. > > I pipe the output to a file "run > logfile" and that's the error I > > get. This is with

Re: Help with a piping error

2011-06-10 Thread John Gordon
In <6e035898-8938-4a61-91de-7a0ea7ead...@y30g2000yqb.googlegroups.com> virdo writes: > My python file is simple print "test". I run it, it works no problem. > I pipe the output to a file "run > logfile" and that's the error I > get. This is with Windows Server 2008 (64 bit) using ActivePython >

Help with a piping error

2011-06-10 Thread virdo
Hi, I'm getting the following error and I can't Google my way out of it: close failed in file object destructor: sys.excepthook is missing lost sys.stderr My python file is simple print "test". I run it, it works no problem. I pipe the output to a file "run > logfile" and that's the error I get.

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 1:33 PM, Dennis wrote: > On Fri, Jun 10, 2011 at 11:58 AM, Mark Phillips > fred > > ['alice'] > fred Just realized the if/else will have to be changed slightly if we want to output both argv and stdin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 11:58 AM, Mark Phillips wrote: \ > > Kurt, > > How does one write a main method to handle both command line args and stdin > args? Here is what I came up with: The one weird thing, the line from above didn't seem to work so I changed it if os.isatty(sys.stdin): to this:

parallel computations: subprocess.Popen(...).communicate()[0] does not work with multiprocessing.Pool

2011-06-10 Thread Hseu-Ming Chen
Hi, I am having an issue when making a shell call from within a multiprocessing.Process(). Here is the story: i tried to parallelize the computations in 800-ish Matlab scripts and then save the results to MySQL. The non-parallel/serial version has been running fine for about 2 years. However, i

Re: Question About Command line arguments

2011-06-10 Thread Benjamin Kaplan
On Jun 10, 2011 10:26 AM, "Mark Phillips" wrote: > > I have a script that processes command line arguments > > def main(argv=None): > syslog.syslog("Sparkler stared processing") > if argv is None: > argv = sys.argv > if len(argv) != 2: > syslog.syslog(usage()) > els

Re: Question About Command line arguments

2011-06-10 Thread Robert Kern
On 6/10/11 12:58 PM, Mark Phillips wrote: On Fri, Jun 10, 2011 at 10:41 AM, MRAB mailto:pyt...@mrabarnett.plus.com>> wrote: On 10/06/2011 18:21, Mark Phillips wrote: I have a script that processes command line arguments def main(argv=None): syslog.syslog("Spark

Re: PyQt

2011-06-10 Thread KK
Thanks for the reply!! i ve installed the binary but when i import anything of PyQt in my prog it says error?? i think there is some problem with folders -- http://mail.python.org/mailman/listinfo/python-list

Re: The Forthcoder Diaries -- 2011 June 9

2011-06-10 Thread Mentifex
On Jun 10, 5:15 am, Brian Martin wrote: > Then again you could use a high level language like Perl, Python, APL ... > > On 10/06/2011 8:17 AM, Paul Rubin wrote: > > > Mentifex  writes: > >> At one point, I had to create 8jun11T.F as a "Test" version of > >> MindForth, so that I could fix the JavaS

Re: Question About Command line arguments

2011-06-10 Thread Mark Phillips
On Fri, Jun 10, 2011 at 11:03 AM, Kurt Smith wrote: > On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips > wrote: > > How do I write my script so it picks up argument from the output of > commands > > that pipe input into my script? > > def main(): >import sys >print sys.stdin.read() > > if

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 11:26 AM, Ian Kelly wrote: > Everybody always focuses so much on properties and forgets that you > can also just write your own descriptors. > I'm so glad that you pointed this out. I totally forgot that properties simply returned themselves if not called on the instance.

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
FYI, I started this topic up on python-ideas, as it seemed valid enough from the responses I've gotten here [1]. -eric [1] http://mail.python.org/pipermail/python-ideas/2011-June/010473.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Question About Command line arguments

2011-06-10 Thread Tim Chase
On 06/10/2011 12:58 PM, Mark Phillips wrote: How do I write my script so it picks up argument from the output of commands that pipe input into my script? You can check if os.isatty(sys.stdin): # <-- this check do_stuff_with_the_terminal() else: read_options_from_stdin() -tkc -

Re: Question About Command line arguments

2011-06-10 Thread Dennis
On Fri, Jun 10, 2011 at 11:03 AM, Dennis wrote: > On Fri, Jun 10, 2011 at 10:58 AM, Mark Phillips > wrote: >> On Fri, Jun 10, 2011 at 10:41 AM, MRAB wrote: >> >> On 10/06/2011 18:21, Mark Phillips wrote: > >> > How do I write my script so it picks up argument from the output of commands > that p

Re: Question About Command line arguments

2011-06-10 Thread Kurt Smith
On Fri, Jun 10, 2011 at 12:58 PM, Mark Phillips wrote: > How do I write my script so it picks up argument from the output of commands > that pipe input into my script? def main(): import sys print sys.stdin.read() if __name__ == '__main__': main() $ echo "fred" | python script.py fr

uhmm... your chance to spit on me

2011-06-10 Thread Xah Lee
Dear lisp comrades, it's Friday! Dear Xah, your writing is: • Full of bad grammar. River of Hiccups. • Stilted. Chocked under useless structure and logic. • WRONG — Filled with uncouth advices. • Needlessly insulting. You have problems. • Simply stinks. Worthless. • M

Re: Question About Command line arguments

2011-06-10 Thread Mark Phillips
On Fri, Jun 10, 2011 at 10:41 AM, MRAB wrote: > On 10/06/2011 18:21, Mark Phillips wrote: > >> I have a script that processes command line arguments >> >> def main(argv=None): >> syslog.syslog("Sparkler stared processing") >> if argv is None: >> argv = sys.argv >> if len(argv)

Re: Question About Command line arguments

2011-06-10 Thread MRAB
On 10/06/2011 18:21, Mark Phillips wrote: I have a script that processes command line arguments def main(argv=None): syslog.syslog("Sparkler stared processing") if argv is None: argv = sys.argv if len(argv) != 2: syslog.syslog(usage()) else: r = par

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 11:01:41 -0600, Eric Snow wrote: > On Fri, Jun 10, 2011 at 10:47 AM, Steven D'Aprano > wrote: >> Here's some Python 3 code that uses a factory function as a metaclass >> to inherit docstrings. Give the class a docstring of an empty string, >> and it will be inherited from the

Re: how to inherit docstrings?

2011-06-10 Thread Ian Kelly
On Fri, Jun 10, 2011 at 10:55 AM, Eric Snow wrote: > The only problem, as seen in the last line, is that the __doc__ on > instances is not inherited on instances of the class.  Object > attribute lookup only looks to the type's __dict__ for inheritance, > and not the types's type.  However, that s

Question About Command line arguments

2011-06-10 Thread Mark Phillips
I have a script that processes command line arguments def main(argv=None): syslog.syslog("Sparkler stared processing") if argv is None: argv = sys.argv if len(argv) != 2: syslog.syslog(usage()) else: r = parseMsg(sys.argv[1]) syslog.syslog(r) ret

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 16:47:03 +, Steven D'Aprano wrote: > On Thu, 09 Jun 2011 00:22:54 -0600, Eric Snow wrote: > >> Sometimes when using class inheritance, I want the overriding methods >> of the subclass to get the docstring of the matching method in the base >> class. You can do this with d

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 10:47 AM, Steven D'Aprano wrote: > Here's some Python 3 code that uses a factory function as a metaclass to > inherit docstrings. Give the class a docstring of an empty string, and it > will be inherited from the first superclass found with a non-empty > docstring. > > Yea

Re: the stupid encoding problem to stdout

2011-06-10 Thread Ian Kelly
2011/6/10 Sérgio Monteiro Basto : > ok after thinking about this, this problem exist because Python want be > smart with ttys, which is in my point of view is wrong, should not encode to > utf-8, because tty is in utf-8. Python should always encode to the same > thing. If the default is ascii, shou

Re: how to inherit docstrings?

2011-06-10 Thread Eric Snow
On Fri, Jun 10, 2011 at 5:05 AM, Tim Chase wrote: > On 06/09/2011 01:22 AM, Eric Snow wrote: >> >> Sometimes when using class inheritance, I want the overriding methods >> of the subclass to get the docstring of the matching method in the >> base class.  You can do this with decorators (after the

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 00:22:54 -0600, Eric Snow wrote: > Sometimes when using class inheritance, I want the overriding methods of > the subclass to get the docstring of the matching method in the base > class. You can do this with decorators (after the class definition), > with class decorators, an

Re: the stupid encoding problem to stdout

2011-06-10 Thread Sérgio Monteiro Basto
Ben Finney wrote: >> > What should it decode to, then? >> >> UTF-8, as in tty > > But when you explicitly redirect to a file, it's not going to a TTY. > It's going to a file whose encoding isn't known unless you specify it. ok after thinking about this, this problem exist because Python want be

Re: PyQt

2011-06-10 Thread Andrew Berg
On 2011.06.10 08:09 AM, KK wrote: > I have python 3.2 installed m not able to install PyQt. > i have downloaded and configured sip but how to build it??? The pages are misleading. You only need the SIP source if you want to build everything from source. Since you don't seem to be familiar with

PyQt

2011-06-10 Thread KK
I have python 3.2 installed m not able to install PyQt. i have downloaded and configured sip but how to build it??? whats the make and make install given on the installation Plzzz help m a newbie to python -- http://mail.python.org/mailman/listinfo/python-list

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
On 10 jun, 13:38, Tim Chase wrote: > On 06/10/2011 05:30 AM, Francesc Segura wrote: > > > Hello all, I'm new to this and I'm having problems on summing two > > values at python. > > > I get the following error: > > > Traceback (most recent call last): > >    File "C:\edge-bc (2).py", line 168, in

Kathryn Sokolich Spawned A Crook

2011-06-10 Thread Gary Sokolisch
Sure did http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich , Newpor

Re: Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Tim Chase
On 06/10/2011 05:30 AM, Francesc Segura wrote: Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG<= cost + T0): TypeError: unsupported operand

Re: how to inherit docstrings?

2011-06-10 Thread Tim Chase
On 06/09/2011 01:22 AM, Eric Snow wrote: Sometimes when using class inheritance, I want the overriding methods of the subclass to get the docstring of the matching method in the base class. You can do this with decorators (after the class definition), with class decorators, and with metaclasses

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG <= cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm working

Unsupported operand type(s) for +: 'float' and 'tuple'

2011-06-10 Thread Francesc Segura
Hello all, I'm new to this and I'm having problems on summing two values at python. I get the following error: Traceback (most recent call last): File "C:\edge-bc (2).py", line 168, in if (costGG <= cost + T0): TypeError: unsupported operand type(s) for +: 'float' and 'tuple' I'm working

Py2exe

2011-06-10 Thread poip
Hi Im new to this and I am having a problem converting my .py to a .exe I get the following: Traceback (most recent call last): File "casemng.py", line 163, in File "casemng.py", line 38, in __init__ File "wx\_core.pyc", line 3369, in ConvertToBitmap wx._core.PyAssertionError: C++ assert

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 20:36:53 -0700, Carl Banks wrote: > x = random.choice([Triange(),Square()]) print x.draw.__doc__ # prints > "Draws a shape" > > > Quick, what shape is x.draw() going to draw? That's easy... it will draw a type(x).__name__. I think this not a terribly convincing argument. I

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Thu, 09 Jun 2011 23:59:08 -0400, Terry Reedy wrote: > On 6/9/2011 9:12 PM, Carl Banks wrote: > >> Presumably, the reason you are overriding a method in a subclass is to >> change its behavior; I'd expect an inherited docstring to be inaccurate >> more often than not. So I'd be -1 on automatic

Re: Python 2.6 OR 3.2

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 01:00:35 -0500, harrismh777 wrote: > So, be careful. I have had to separate *all* of my python installs on > *every* one of my systems for this similar reason. The bottom line is if > the distro ships with 2.6 (minus the idle) chances are that the > interpreter is there *not*

Re: how to inherit docstrings?

2011-06-10 Thread Steven D'Aprano
On Fri, 10 Jun 2011 07:33:34 +1000, Ben Finney wrote: > Steven D'Aprano writes: >> It's an unnecessary restriction, as far as I'm concerned, but an old >> one. > > Well, it's incompatible with the Python compiler I keep in my head. Have > these developers no consideration for backward-thinking-

Re: Any Better logic for this problem..

2011-06-10 Thread geremy condra
On Thu, Jun 9, 2011 at 6:10 PM, Dan Stromberg wrote: > > On Thu, Jun 9, 2011 at 10:55 AM, geremy condra wrote: >> >> On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote: >> > On 01/-10/-28163 02:59 PM, Chris Rebert wrote: >> >> >> >> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium >> >>  wro

Re: __doc__ immutable for classes (was: Re: how to inherit docstrings?)

2011-06-10 Thread Gregory Ewing
Eric Snow wrote: But for "method" objects (really a wrapper for bound functions) would it change the __doc__ of the wrapper or of the bound function? You probably wouldn't want to change the __doc__ of a method wrapper; instead you'd make sure you got hold of the underlying function first. So

Re: how to inherit docstrings?

2011-06-10 Thread Gregory Ewing
Carl Banks wrote: x = random.choice([Triange(),Square()]) print x.draw.__doc__ # prints "Draws a shape" Quick, what shape is x.draw() going to draw? Your debugging code is insufficient. It should include print type(x) and then it will be obvious what shape is going to get drawn. -- Gre

Re: how to inherit docstrings?

2011-06-10 Thread Gregory Ewing
Carl Banks wrote: Presumably, the reason you are overriding a method in a subclass is to change its behavior; Not always true by any means, and maybe not even usually true. Consider overriding for the purpose of implementing an abstract method, or because something about the internal operation

Re: Python 2.6 OR 3.2

2011-06-10 Thread Benjamin Kaplan
On Thu, Jun 9, 2011 at 11:00 PM, harrismh777 wrote: > Andrew Berg wrote: >> >> AFAICT, there are three reasons to learn Python 2: > >   ... there is a fourth reason. > > The linux distro you are using currently was customized with python 2.x > > I ran into this problem this week in fact... on my H

help on QUICKFIX

2011-06-10 Thread prakash jp
Hi, I am using quickfix, would like to start with that ..\quickfix-1.13.3\quickfix\examples\executor\python\executor.py asks for a configuration file how should it look like. Thanks -- http://mail.python.org/mailman/listinfo/python-list