Re: 32 bit bdist_wininst vs x64 platform

2010-09-10 Thread Mark Hammond
Hi Robin, On 9/09/2010 9:28 PM, Robin Becker wrote: A reportlab user is using 32 bit python on x64 win 2003. he has a problem installing our bdist_wininst exe because the installer cannot find python. That should work fine - lots of pywin32 users do exactly that. Apparently the installer is

Re: Printing the name of a variable

2010-09-10 Thread Paul Rudin
Stephen Boulet writes: > Does an arbitrary variable carry an attribute describing the text in > its name? I'm looking for something along the lines of: > > x = 10 > print x.name 'x' > > Perhaps the x.__getattribute__ method? Thanks. The first thing is... what is your use case for this? I'd

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Ulrich Eckhardt
Raymond Hettinger wrote: > collections.deque('abcde').__getitem__[-2] # extension class, magic > method Small nit: You don't mean [square] brackets here, right? Otherwise, good posting, thank you! Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 -- h

inspect the call stack

2010-09-10 Thread bussiere bussiere
i v'e got this : i've got toto.py : import titi def niwhom(): pass and titi.py : def nipang(): pass how can i know in titi.py that's it's toto.py that is calling titi.py and the path of toto ? how can i inspect the call stack or an other way ? Rega

Re: 32 bit bdist_wininst vs x64 platform

2010-09-10 Thread Robin Becker
.. As you mention, 32bit apps querying the registry get redirected in some cases - but so long as the 32bit bdist_wininst stub is used, that too will get redirected, so it should all work out fine. Is it possible they are attempting to install an x64 version of reportlab on a 32bit pytho

Re: SendKeys and Python 2.7

2010-09-10 Thread Lawrence D'Oliveiro
In message , Jakson A. Aquino wrote: > I would like to send code from Vim [1] to R [2] on Microsoft Windows. Why such a roundabout way? Why not just run R in a subprocess and feed it a script to run? > [1] http://www.vim.org/ > [2] http://www.r-project.org/ -- http://mail.python.org/mailman/

Re: [Tutor] Arguments from the command line

2010-09-10 Thread Lawrence D'Oliveiro
In message <8662yfklzu@aiuole.stru.polimi.it>, Giacomo Boffi wrote: > Dennis Lee Bieber writes: > >> FORTRAN just differentiates by having the main file start with >> PROGRAM random_name >> whereas subfiles are all either (or both) >> SUBROUTINE another_name(args) >> FUNCTION that_other_name

Re: [Tutor] Arguments from the command line

2010-09-10 Thread Lawrence D'Oliveiro
In message , Mel wrote: > But historical COBOL didn't pass parameters anyway. You read > your optional arguments from a file, or accepted a few from an input > device. I think it could also read from switches. As in front-panel on/off switches. -- http://mail.python.org/mailman/listinfo/python-

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Giacomo Boffi
Ben Finney writes: > Raymond Hettinger writes: > >> It doesn't seem to be common knowledge when and how a[x] gets >> translated to a[x+len(x)]. So, here's a short info post on how Python >> supports negative indices for sequences. > > Thanks for this. Could you post your messages using a channe

Re: Printing the name of a variable

2010-09-10 Thread Jonathan Hartley
On Sep 9, 9:11 pm, Albert Hopkins wrote: > On Thu, 2010-09-09 at 12:43 -0700, Stephen Boulet wrote: > > Does an arbitrary variable carry an attribute describing the text in > > its name? I'm looking for something along the lines of: > > > x = 10 > > print x.name > > >>> 'x' > > > Perhaps the x.__g

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Steven D'Aprano
On Thu, 09 Sep 2010 18:37:49 -0700, Raymond Hettinger wrote: > Hello Folks. > > It doesn't seem to be common knowledge when and how a[x] gets translated > to a[x+len(x)]. So, here's a short info post on how Python supports > negative indices for sequences. [...] > Hope you all found this to be i

Re: Printing the name of a variable

2010-09-10 Thread Simon Brunning
On 9 September 2010 20:43, Stephen Boulet wrote: > Does an arbitrary variable carry an attribute describing the text in > its name? I'm looking for something along the lines of: > > x = 10 > print x.name 'x' -- Ch

Re: [Tutor] Arguments from the command line

2010-09-10 Thread Giacomo Boffi
Lawrence D'Oliveiro writes: > In message <8662yfklzu@aiuole.stru.polimi.it>, Giacomo Boffi wrote: > >> Dennis Lee Bieber writes: >> >>> FORTRAN just differentiates by having the main file start with >>> PROGRAM random_name >>> whereas subfiles are all either (or both) >>> SUBROUTINE another

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Daniel Fetchinson
> Raymond Hettinger writes: > >> It doesn't seem to be common knowledge when and how a[x] gets >> translated to a[x+len(x)]. So, here's a short info post on how Python >> supports negative indices for sequences. > > Thanks for this. Could you post your messages using a channel that > doesn't arbi

Re: 32 bit bdist_wininst vs x64 platform

2010-09-10 Thread Robin Becker
On 10/09/2010 09:52, Robin Becker wrote: .. As you mention, 32bit apps querying the registry get redirected in some cases - but so long as the 32bit bdist_wininst stub is used, that too will get redirected, so it should all work out fine. Is it possible they are attempting to install an

Re: include a file in a python program

2010-09-10 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Mon, 06 Sep 2010 00:57:30 +0200, bussiere bussiere wrote: i've got a python.txt that contain python and it must stay as it (python.txt) Why? Is it against the law to change it? *wink* how can i include it in my program ? import python.txt doesn't work You co

Re: inspect the call stack

2010-09-10 Thread Bruno Desthuilliers
bussiere bussiere a écrit : i v'e got this : i've got toto.py : import titi def niwhom(): pass and titi.py : def nipang(): pass how can i know in titi.py that's it's toto.py that is calling titi.py and the path of toto ? how can i inspect the call

Trap Authentication Errors in HTTP Request

2010-09-10 Thread naugiedoggie
Hello, I have a script that authenticates to a web service provider to retrieve data. This script provides an authentication header built in a very basic way like this: # Creates an authentication object with the credentials for a given URL def createPasswordManager(headers) : passwordManag

How to Convert IO Stream to XML Document

2010-09-10 Thread jakecjacobson
I am trying to build a Python script that reads a Sitemap file and push the URLs to a Google Search Appliance. I am able to fetch the XML document and parse it with regular expressions but I want to move to using native XML tools to do this. The problem I am getting is if I use urllib.urlopen(url

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Nitin Pawar
try using parse from string ... and try minidom.parse(StringIO.StingIO(string)).documentElement On Fri, Sep 10, 2010 at 9:50 PM, jakecjacobson wrote: > I am trying to build a Python script that reads a Sitemap file and > push the URLs to a Google Search Appliance. I am able to fetch the > XML d

Ugh! Python 3.1.x and MySQL

2010-09-10 Thread fuglyducky
Most of the python books coming out now are Py3K. I just started programming and have a need to access a MySQL database. I would like to use Python to do this. Unfortunately, I cannot find anyone that has created anything that allows my to do this. I've tried installing an ODBC driver and using sq

Re: SendKeys and Python 2.7

2010-09-10 Thread Jakson A. Aquino
On Fri, Sep 10, 2010 at 6:26 AM, Lawrence D'Oliveiro wrote: > In message , Jakson A. > Aquino wrote: > >> I would like to send code from Vim [1] to R [2] on Microsoft Windows. > > Why such a roundabout way? Why not just run R in a subprocess and feed it a > script to run? Emacs with ESS runs R in

Re: [Python-ideas] Why not f(*my_list, *my_other_list) ?

2010-09-10 Thread MRAB
On 10/09/2010 17:37, cool-RR wrote: I noticed that it's impossible to call a Python function with two starred argument lists, like this: `f(*my_list, *my_other_list)`. I mean, if someone wants to feed two lists of arguments into a function, why not? I understand why you can't have two stars in a

Re: [Python-ideas] Why not f(*my_list, *my_other_list) ?

2010-09-10 Thread Ian Kelly
On Fri, Sep 10, 2010 at 10:52 AM, MRAB wrote: > On 10/09/2010 17:37, cool-RR wrote: >> >> I noticed that it's impossible to call a Python function with two >> starred argument lists, like this: `f(*my_list, *my_other_list)`. I >> mean, if someone wants to feed two lists of arguments into a functio

Re: [Python-ideas] Why not f(*my_list, *my_other_list) ?

2010-09-10 Thread Stefan Behnel
Ian Kelly, 10.09.2010 19:03: On Fri, Sep 10, 2010 at 10:52 AM, MRAB wrote: On 10/09/2010 17:37, cool-RR wrote: I noticed that it's impossible to call a Python function with two starred argument lists, like this: `f(*my_list, *my_other_list)`. I mean, if someone wants to feed two lists of argu

Re: Function Point Analysis (FPA) - Equivalent lines of code of Python

2010-09-10 Thread John Roth
On Sep 9, 2:30 am, Nicholas wrote: > Hi, > >   In FPA, there are tables which shows equivalent lines of code for > each Function Point (FP) for a number of programming languages. > >   e.g.http://www.qsm.com/?q=resources/function-point-languages-table/index > >   However, I have yet to find th

Re: [Python-ideas] Why not f(*my_list, *my_other_list) ?

2010-09-10 Thread Paul Rubin
Ian Kelly writes: >> Would there be any advantage over `f(*(my_list + my_other_list))`? > > That fails if my_list and my_other_list are different types, whereas > the *args syntax happily accepts any iterable object. f(*itertools.chain(my_list, my_other_list)) -- http://mail.python.org/mailman/l

Re: how to kill a subprocess

2010-09-10 Thread cerr
On Sep 9, 4:18 pm, MRAB wrote: > On 09/09/2010 23:52, cerr wrote: > > > > > On Sep 9, 3:29 pm, Alain Ketterlin > > wrote: > >> cerr  writes: > >>> I'm calling a python script from a php script which again calls a perl > >>> script with subprocess.popen(). > >>> This seems to work fine so far only

Re: Ugh! Python 3.1.x and MySQL

2010-09-10 Thread Rami Chowdhury
On Fri, Sep 10, 2010 at 22:27, fuglyducky wrote: > Most of the python books coming out now are Py3K. I just started > programming and have a need to access a MySQL database. I would like > to use Python to do this. Unfortunately, I cannot find anyone that has > created anything that allows my to

bool constructor is inconsistent?

2010-09-10 Thread Neal Becker
IN [3]: bool('False') Out[3]: True In [4]: int('32') Out[4]: 32 -- http://mail.python.org/mailman/listinfo/python-list

Re: bool constructor is inconsistent?

2010-09-10 Thread Stefan Behnel
Neal Becker, 10.09.2010 20:23: IN [3]: bool('False') Out[3]: True Not inconsistent at all: >>> bool('false') True >>> bool('true') True >>> bool('') False >>> bool(32) True >>> bool(0) False It simply follows Python's boolean coercion rules. If you consider it inconsisten

Re: bool constructor is inconsistent?

2010-09-10 Thread Emile van Sebille
On 9/10/2010 11:23 AM Neal Becker said... IN [3]: bool('False') Out[3]: True In [4]: int('32') Out[4]: 32 >>> eval('False') False >>> eval('32') 32 >>> Otherwise, 'False' is just a string? Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: bool constructor is inconsistent?

2010-09-10 Thread Stefan Schwarzer
Hi Neal, On 2010-09-10 20:23, Neal Becker wrote: > IN [3]: bool('False') > Out[3]: True If you consider strings, only an empty string has a false value. So the string 'False' which is non-empty, results in a true boolean value. For example, you can use if my_string: ... to execute

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
Am 10.09.2010 19:51, schrieb cerr: > Thanks for your suggestion, changed my code now to: > > process=subprocess.Popen(commandlist) > ... > ... > process.kill() > os.waitpid(process.pid, 0) > but it's not killing the process running. it still runs in the > background and i don't see any e

Re: how to kill a subprocess

2010-09-10 Thread cerr
On Sep 10, 11:45 am, Christian Heimes wrote: > Am 10.09.2010 19:51, schrieb cerr: > > > Thanks for your suggestion, changed my code now to: > > >   process=subprocess.Popen(commandlist) > >   ... > >   ... > >   process.kill() > >   os.waitpid(process.pid, 0) > > but it's not killing the process r

3D cube navigation

2010-09-10 Thread sahilsk
hi, i need to make a 3d cube as a navigation menu.. each face having separate button .. or effect. any idea, how can i make one such 3D figures with functionality of mouse events? -- http://mail.python.org/mailman/listinfo/python-list

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
Am 10.09.2010 20:56, schrieb cerr: > But I wanna kill the child process I start from my python code. > It's like > PHP -> Python -> Perl > > and when the connection PHP -> Python seems to work well! You have said that the Python process becomes a zombie process. This clearly tells me that the iss

Re: bool constructor is inconsistent?

2010-09-10 Thread David Robinow
On Fri, Sep 10, 2010 at 2:35 PM, Stefan Schwarzer wrote: > Hi Neal, > > On 2010-09-10 20:23, Neal Becker wrote: >> IN [3]: bool('False') >> Out[3]: True > > If you consider strings, only an empty string has a false > value. So the string 'False' which is non-empty, results in > a true boolean valu

Re: Ugh! Python 3.1.x and MySQL

2010-09-10 Thread nn
On Sep 10, 12:27 pm, fuglyducky wrote: > Most of the python books coming out now are Py3K. I just started > programming and have a need to access a MySQL database. I would like > to use Python to do this. Unfortunately, I cannot find anyone that has > created anything that allows my to do this. >

Re: how to kill a subprocess

2010-09-10 Thread cerr
On Sep 10, 12:18 pm, Christian Heimes wrote: > Am 10.09.2010 20:56, schrieb cerr: > > > But I wanna kill the child process I start from my python code. > > It's like > > PHP -> Python -> Perl > > > and when the connection PHP -> Python seems to work well! > > You have said that the Python process

Re: how to kill a subprocess

2010-09-10 Thread Christian Heimes
Am 10.09.2010 22:14, schrieb cerr: > No, the Perl becomes the zombie. How are you killing the Python process? Are you sending SIGINT, SIGTERM or SIGKILL? SIGKILL can prevent Python from running its cleanup code. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Terry Reedy
On 9/9/2010 9:37 PM, Raymond Hettinger wrote: The docs guarantee that Python's builtin sequences implement support for negative indices ( http://docs.python.org/dev/reference/expressions.html#subscriptions The relevant paragraphs are " For built-in objects, there are two types of objects that

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Aahz
In article , Daniel Fetchinson wrote: >Attribution missing: >> >> I encourage anyone whose messages are munged like that to seek >> correction from their mail service provider, and switch to a different >> one until it's fixed. > >I encourage anyone who has problems with reading various emails, >

Re: The Samurai Principle

2010-09-10 Thread Lawrence D'Oliveiro
In message , Ian Kelly wrote: > And returning None on failure is dangerous, because if the programmer > does not take care to handle that case, the program may attempt to > regard it as actual data. But None *is* actual data. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] Arguments from the command line

2010-09-10 Thread Lawrence D'Oliveiro
In message <86wrqtsxo2@aiuole.stru.polimi.it>, Giacomo Boffi wrote: > Lawrence D'Oliveiro writes: > >> In message <8662yfklzu@aiuole.stru.polimi.it>, Giacomo Boffi wrote: >> >>> no BLOCKDATA? >> >> I think you mean COMMON. > > i meant BLOCKDATA BLOCKDATA is an initializer. The actual s

Re: SendKeys and Python 2.7

2010-09-10 Thread Lawrence D'Oliveiro
In message , Jakson A. Aquino wrote: > On Fri, Sep 10, 2010 at 6:26 AM, Lawrence D'Oliveiro > wrote: > >> In message , Jakson >> A. Aquino wrote: >> >>> I would like to send code from Vim [1] to R [2] on Microsoft Windows. >> >> Why such a roundabout way? Why not just run R in a subprocess and f

Re: [Python-ideas] with statement syntax forces ugly line breaks?

2010-09-10 Thread Lawrence D'Oliveiro
In message , MRAB wrote: > On 08/09/2010 19:07, Georg Brandl wrote: > >> Thus spake the Lord: Thou shalt indent with four spaces. No more, no >> less. Four shall be the number of spaces thou shalt indent, and the >> number of thy indenting shall be four. Eight shalt thou not indent, >> nor either

Re: SendKeys and Python 2.7

2010-09-10 Thread Jakson A. Aquino
On Fri, Sep 10, 2010 at 7:19 PM, Lawrence D'Oliveiro wrote: > In message , Jakson A. > Aquino wrote: >> On Fri, Sep 10, 2010 at 6:26 AM, Lawrence D'Oliveiro >> wrote: >>> In message , Jakson >>> A. Aquino wrote: I would like to send code from Vim [1] to R [2] on Microsoft Windows. >>> >>> Wh

Re: [Q] Function Point Analysis (FPA) - Equivalent lines of code of Python

2010-09-10 Thread Lawrence D'Oliveiro
In message <7x4odz5mr3@ruckus.brouhaha.com>, Paul Rubin wrote: > Nicholas writes: >> >> http://www.qsm.com/?q=resources/function-point-languages- table/index.html > > That table looks pretty bogus ... Dead giveaways are the disparity between the Ada, C++ and PL/I figures, and the fact th

Re: The Samurai Principle

2010-09-10 Thread Robert Kern
On 9/10/10 5:17 PM, Lawrence D'Oliveiro wrote: In message, Ian Kelly wrote: And returning None on failure is dangerous, because if the programmer does not take care to handle that case, the program may attempt to regard it as actual data. But None *is* actual data. And that is exactly the r

Re: 3D cube navigation

2010-09-10 Thread Krister Svanlund
On Fri, Sep 10, 2010 at 9:10 PM, sahilsk wrote: > hi, i need to make a 3d cube as a navigation menu.. each face having > separate  button .. or effect. > any idea,  how can i make one such 3D figures with functionality of > mouse events? In what environment, what toolkit, for what purpose? -- ht

Re: Ugh! Python 3.1.x and MySQL

2010-09-10 Thread John Nagle
On 9/10/2010 12:57 PM, nn wrote: On Sep 10, 12:27 pm, fuglyducky wrote: Most of the python books coming out now are Py3K. I just started programming and have a need to access a MySQL database. I would like to use Python to do this. Unfortunately, I cannot find anyone that has created anything t

Re: 3D cube navigation

2010-09-10 Thread Phlip
On Sep 10, 12:10 pm, sahilsk wrote: > hi, i need to make a 3d cube as a navigation menu.. each face having > separate  button .. or effect. > any idea,  how can i make one such 3D figures with functionality of > mouse events? omg If you have to ask, you probably are not ready for the answer! Is

Re: Ugh! Python 3.1.x and MySQL

2010-09-10 Thread Martin Gregorie
On Fri, 10 Sep 2010 09:27:28 -0700, fuglyducky wrote: > Most of the python books coming out now are Py3K. I just started > programming and have a need to access a MySQL database. I would like to > use Python to do this. Unfortunately, I cannot find anyone that has > created anything that allows my

Re: The Samurai Principle

2010-09-10 Thread Steven D'Aprano
On Sat, 11 Sep 2010 10:17:21 +1200, Lawrence D'Oliveiro wrote: > In message , Ian > Kelly wrote: > >> And returning None on failure is dangerous, because if the programmer >> does not take care to handle that case, the program may attempt to >> regard it as actual data. > > But None *is* actual

Re: 3D cube navigation

2010-09-10 Thread Steven D'Aprano
On Sat, 11 Sep 2010 01:09:00 +0200, Krister Svanlund wrote: > On Fri, Sep 10, 2010 at 9:10 PM, sahilsk wrote: >> hi, i need to make a 3d cube as a navigation menu.. each face having >> separate  button .. or effect. >> any idea,  how can i make one such 3D figures with functionality of >> mouse e

Re: bool constructor is inconsistent?

2010-09-10 Thread Steven D'Aprano
On Fri, 10 Sep 2010 14:23:34 -0400, Neal Becker wrote: > IN [3]: bool('False') > Out[3]: True > > In [4]: int('32') > Out[4]: 32 Where is the inconsistency? bool('False') returns the same result as for any other non-empty string: >>> bool("not true") True >>> bool("no") True >>> bool("incorrec

Re: SendKeys and Python 2.7

2010-09-10 Thread Jakson A. Aquino
On Thu, Sep 9, 2010 at 8:24 PM, Jakson A. Aquino wrote: > On Thu, Sep 9, 2010 at 5:40 PM, Michel Claveau - MVP > wrote: >> Hi! >> >> Example for send ^V  (with PyWin32): >> >>  import time,win32api,win32con >>  win32api.keybd_event(win32con.VK_CONTROL, 0, 0, 0) >>  win32api.keybd_event(ord('V'),

Re: 3D cube navigation

2010-09-10 Thread Tim Chase
On 09/10/10 19:20, Steven D'Aprano wrote: On Sat, 11 Sep 2010 01:09:00 +0200, Krister Svanlund wrote: On Fri, Sep 10, 2010 at 9:10 PM, sahilsk wrote: hi, i need to make a 3d cube as a navigation menu.. each face having separate button .. or effect. In what environment, what toolkit, for wha

Re: How Python works: What do you know about support for negative indices?

2010-09-10 Thread Ben Finney
Ben Finney writes: > Raymond Hettinger writes: > > > It doesn't seem to be common knowledge when and how a[x] gets > > translated to a[x+len(x)]. So, here's a short info post on how > > Python supports negative indices for sequences. > > Thanks for this. Could you post your messages using a chan

Re: SendKeys and Python 2.7

2010-09-10 Thread MRAB
On 11/09/2010 01:45, Jakson A. Aquino wrote: On Thu, Sep 9, 2010 at 8:24 PM, Jakson A. Aquino wrote: On Thu, Sep 9, 2010 at 5:40 PM, Michel Claveau - MVP wrote: Hi! Example for send ^V (with PyWin32): import time,win32api,win32con win32api.keybd_event(win32con.VK_CONTROL, 0, 0, 0) w

Refactoring similar subclasses

2010-09-10 Thread Steven D'Aprano
I have some code that currently takes four different classes, A, B, C and D, and subclasses each of them in the same way: class MyA(A): def method(self, x): result = super(MyA, self).method(x) if result == "spam": return "spam spam spam" return result #

Hide DOS console for .pyc file

2010-09-10 Thread Muddy Coder
Hi Folks, For a quick testing purpose, I deliver .pyc files to my customer. I don't want the black DOS console appearing behind my GUI, but I have no idea how to do it. Somebody can help? Thanks! Cosmo -- http://mail.python.org/mailman/listinfo/python-list

default value for __init__ doesn't work

2010-09-10 Thread 人言落日是天涯,望极天涯不见家
Please look at below code snippet: class test(): def __init__(self, a, dic={}): self.a = a self.dic = dic print('__init__ params:',a, dic) def get(self): self.dic[1] = 2 self.dic[4] = 5 def foo(): print('in foo function') bar = test(1) b

Re: How to Convert IO Stream to XML Document

2010-09-10 Thread Stefan Behnel
jakecjacobson, 10.09.2010 18:20: response = urllib2.urlopen(request) pageguts = response.read() xmldoc = minidom.parse(pageguts) Check the minidom docs, there's a parseString() function that does what it says. Also, don't forget to take a look at xml.etree.ElementTree

Re: default value for __init__ doesn't work

2010-09-10 Thread Benjamin Kaplan
On Sat, Sep 11, 2010 at 12:38 AM, 人言落日是天涯,望极天涯不见家 wrote: > Please look at below code snippet: > class test(): >    def __init__(self, a, dic={}): >        self.a = a >        self.dic = dic >        print('__init__ params:',a, dic) > This is a pretty popular mistake to make. Default arguments ar

Re: default value for __init__ doesn't work

2010-09-10 Thread 人言落日是天涯,望极天涯不见家
On Sep 11, 1:14 pm, Benjamin Kaplan wrote: > On Sat, Sep 11, 2010 at 12:38 AM, 人言落日是天涯,望极天涯不见家 > wrote: > > Please look at below code snippet: > > class test(): > >    def __init__(self, a, dic={}): > >        self.a = a > >        self.dic = dic > >        print('__init__ params:',a, dic) > > T

Re: default value for __init__ doesn't work

2010-09-10 Thread 人言落日是天涯,望极天涯不见家
On Sep 11, 1:55 pm, 人言落日是天涯,望极天涯不见家 wrote: > On Sep 11, 1:14 pm, Benjamin Kaplan wrote: > > > > > On Sat, Sep 11, 2010 at 12:38 AM, 人言落日是天涯,望极天涯不见家 > > wrote: > > > Please look at below code snippet: > > > class test(): > > >    def __init__(self, a, dic={}): > > >        self.a = a > > >      

Re: Hide DOS console for .pyc file

2010-09-10 Thread Jason Earl
On Fri, Sep 10 2010, Muddy Coder wrote: > Hi Folks, > > For a quick testing purpose, I deliver .pyc files to my customer. I > don't want the black DOS console appearing behind my GUI, but I have > no idea how to do it. Somebody can help? Thanks! > > > Cosmo I don't really use Windows any more, so