First  |  Prev |  Next  |  Last
Pages: 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
How to use a class property to store function variables?
I want to store a reference to a function into a class property. So I am expecting that: class A: fn = lambda x: x fn = A.fn fn(1) Traceback (most recent call last): File "<string>", line 1, in <string> TypeError: unbound method <lambda>() must be called with A instance as first argument (got in... 28 Apr 2010 05:02
How to check what is holding reference to object
Hi I've just found out that one of objects is not destroyed when it should be. This means that something was holding reference to this object or part of it (i.e. method). Is there any way to check what holds that reference? I am unable to do that just looking to the code or debugging it because it is pretty comp... 5 May 2010 16:01
Problems with extra blank line when using csv.writer in Python 3.1
I’m experiencing a problem with the csv module in Python 3.1.2, and would greatly appreciate any help anyone can offer me. When writing csv files in Python 2.6, I open the output file as 'wb' to prevent a blank line being inserted after every line. Works like a charm. But I get an error if I do the same in 3.1; i.e... 27 Apr 2010 13:18
May "Introduction to Python" class
Holden Web is pleased to announce the next run of its popular three-day "Introduction to Python" class in Washington DC on May 11-13, 2010. Further details of all current event listings are available from http://holdenweb.eventbrite.com/ regards Steve -- Steve Holden +1 571 484 6266 +1 800 ... 27 Apr 2010 08:43
Python 2.5.x _winreg - rename a subkey
Hello, is there a way to rename a subkey? Kind Regards, Richi ... 27 Apr 2010 08:43
Python 2.X vs. 3.X - level of acceptance?
Hi! I've been using Python for a long while (certainly since it was 1.X), and I've taught some aspects of it in my lectures. I'm now thinking of preparing a new lecture where some of the theoretical concepts will be illustrated by implementations of e.g. automata and DPLL provers, preferably in Python. I'm so... 28 Apr 2010 09:27
KeyboardInterrupt and DiskIO
DiskIO appears to not be interruptable. For example: open('bighugefile.sql').read() Pressing Ctrl-C (on Linux with python 2.6.4) will not interrupt the command. I believe that it used to in previous versions of python but I may be mistaken. Is it supposed to be that way? The behavior is annoying and in oth... 27 Apr 2010 05:24
Detect OS shutdown or user logout across different operatingsystems
On 27/04/2010 03:09, python(a)bdurham.com wrote: Is there a OS portable way to have a Python script detect when its operating system is shutting down or a user is logging out? If not, any Windows specific tips on how to detect these events? Thank you, Malcolm Doubt v. much if there's anything ... 27 Apr 2010 04:18
chr(i) ASCII under Python 3
Hi all, Under python 2.6, chr() "Return a string of one character whose ASCII code is the integer i." (quoted from docs.python.org) Under python 3.1, chr() "Return the string of one character whose Unicode codepoint is the integer i." I want to convert a ASCII code back to a character under python 3, not Uni... 27 Apr 2010 06:30
py2exe sets error message
getting following error message when trying to run my setup file ....\py2exe\build_exe.py:16: DeprecationWarning: the sets module is deprecated import sets Removing files in directory :./dist,keeping protedted files... python 2.65 new install. Any work arounds(Hacks)?? ... 26 Apr 2010 17:11
First  |  Prev |  Next  |  Last
Pages: 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143