May Introduction to Python class

2010-04-27 Thread Steve Holden
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

PyCon Australia CFP: One Day Left!

2010-04-27 Thread Richard Jones
The Call For Proposals for PyCon Australia 2010 FINISHES TOMORROW! Presentation subjects may range from reports on open source, academic and commercial projects to tutorials and case studies. As long as a presentation is interesting and potentially useful to the Python community, it will be

SWIG + expy

2010-04-27 Thread Yingjie Lan
Hi, Is it possible to use SWIG to parse C/C++, and provide an interface for me to generate some code? I thought it might be good to have SWIG help generate expy (see http://expy.sourceforge.net) files, then generate the python extension via expy. Yingjie --

Re: WIN32 - get the GUID of a Network Device

2010-04-27 Thread Tim Golden
On 26/04/2010 22:07, Tim Roberts wrote: Tim Golden wrote: On 26/04/2010 09:49, Richard Lamboj wrote: thanks for your response. No, i don't mean the MAC Address. I mean the GUID - Sample: {1E2428C1-9F2C-48D7-AB53-3229DFB7E217} I want to change TcpAckFrequency and TcpDelTicks of a Network

Re: Detect OS shutdown or user logout across different operating systems

2010-04-27 Thread Tim Golden
On 27/04/2010 03:09, pyt...@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

Re: SWIG + expy

2010-04-27 Thread Stefan Behnel
Yingjie Lan, 27.04.2010 08:30: Is it possible to use SWIG to parse C/C++, and provide an interface for me to generate some code? I thought it might be good to have SWIG help generate expy files, then generate the python extension via expy. There have been similar discussions on the Cython

Re: chr(i) ASCII under Python 3

2010-04-27 Thread Antoine Pitrou
Le Mon, 26 Apr 2010 22:26:28 +0200, Alf P. Steinbach a écrit : On 26.04.2010 22:12, * Dodo: 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

Re: Some objects missing from tkinter

2010-04-27 Thread Peter Otten
Lie Ryan wrote: In fact, never trust IDLE. IDLE is a nice IDE when the alternative is Notepad; but for serious work, you need a real IDE or a programmer's text editor (vim or emacs, whichever side you're in). Some people, when confronted with a problem, think I know, I'll use emacs. Now they

keyboard shortcuts glade+python

2010-04-27 Thread varnikat t
How to use keyboard shortcuts like ctrl+o for opening a file from menubar menuitm OPEN in python+GLADE? -- Varnika Tewari -- http://mail.python.org/mailman/listinfo/python-list

KeyboardInterrupt and DiskIO

2010-04-27 Thread Björn Lindqvist
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

Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Laszlo Nagy
Hi All, I'm planning to create a new visual component for wxPython, for designing, creating and printing pivot tables. Also known as: decision cube, OLAP cube. I was searching on the internet for something similar, but I could not find any open source version (or free to use, at least).

Re: chr(i) ASCII under Python 3

2010-04-27 Thread Dave Angel
Dodo wrote: 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

Re: Some objects missing from tkinter

2010-04-27 Thread Lie Ryan
On 04/27/10 18:01, Peter Otten wrote: Lie Ryan wrote: In fact, never trust IDLE. IDLE is a nice IDE when the alternative is Notepad; but for serious work, you need a real IDE or a programmer's text editor (vim or emacs, whichever side you're in). Some people, when confronted with a

Re: Download Proprietary Microsoft Products Now

2010-04-27 Thread Lie Ryan
On 04/27/10 08:41, Andrej Mitrovic wrote: Although I agree, moving away from VS would be nice. Since Unladen Swallow will eventually be merged with Python, will the dev team consider trying out Clang as an alternative to VS? What would Unladen Swallow brings that would allow the development of

Python compiled modules are too big in size (even after strip)

2010-04-27 Thread King
Hi, I have just compiled python 2.6.5 from sources on ubuntu hardy 8.04. I have used a simple script to do everything in one go: ./configure --enable-shared make make install Python is compiled and installed successfully. However the modules(_socket.so, _random.so etc) are two big in terms of

Re: Some objects missing from tkinter

2010-04-27 Thread Paul Rudin
Peter Otten __pete...@web.de writes: Some people, when confronted with a problem, think I know, I'll use emacs. Now they have two problems. Probably you know this ... but the original form of this saying had regular expressions in place of emacs. Since Jamie Zawinski coined this saying and

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Lie Ryan
On 04/27/10 10:36, Keith wrote: I think it's worth making the print statement (or print function, as the case may be) let us do engineering notation, just like it lets us specify scientific notation. The print statement/function does no magic at all in specifying how numbers look like when.

Re: when should I explicitly close a file?

2010-04-27 Thread Lawrence D'Oliveiro
In message mailman.2162.1272018097.23598.python-l...@python.org, Adam Tauno Williams wrote: On Fri, 2010-04-23 at 16:29 +1200, Lawrence D'Oliveiro wrote: Any implementation that doesn’t do reference-counting is brain-damaged. Why? Because a) it uses extra memory needlessly, and b) waiting

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Lie Ryan
On 04/27/10 10:47, MRAB wrote: Mark Dickinson wrote: On Apr 26, 4:36 am, Keith keith.braff...@gmail.com wrote: I am considering writing a PEP for the inclusion of an engineering format specifier, and would appreciate input from others. [...] I am thinking that if we simply added something

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Gregory Ewing
Keith wrote: I kinda like m for the whole Greco- Roman angle, now that you point it out :-) I like m, too. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Jon Clements
On 27 Apr, 10:10, Laszlo Nagy gand...@shopzeus.com wrote:   Hi All, I'm planning to create a new visual component for wxPython, for designing, creating and printing pivot tables. Also known as: decision cube, OLAP cube. I was searching on the internet for something similar, but I could not

Re: running .py files on Linux

2010-04-27 Thread Tingting HAN
2010/4/27 Tingting HAN hihigh...@gmail.com I did as you say: hantingt...@tityro:~/Downloads$ ls hdfview_install_linux32.bin PythonPyTables triMC3D triMC3D_v1.0.0.tar.gz hantingt...@tityro:~/Downloads$ md5sum triMC3D_v1.0.0.tar.gz triMC3D.md5 hantingt...@tityro:~/Downloads$ ls

Python 2.X vs. 3.X - level of acceptance?

2010-04-27 Thread Stephan Schulz
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

Re: running .py files on Linux

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 3:54 AM, Tingting HAN hihigh...@gmail.com wrote: snip gentest_empty.py Traceback (most recent call last):   File gentest_empty.py, line 8, in module     from tables import *   File /usr/lib/python2.6/dist-packages/tables/__init__.py, line 76, in module     from

Re: Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Laszlo Nagy
Please note: this is not a direct answer to your question. I would personally go for a client-server model; not worrying what the server is written in or how it works. For some reason I have a scary thought of your widget pulling in 100million records and cross-tabbing two dimensions :) Don't

Python 2.5.x _winreg - rename a subkey

2010-04-27 Thread Richard Lamboj
Hello, is there a way to rename a subkey? Kind Regards, Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.X vs. 3.X - level of acceptance?

2010-04-27 Thread Stefan Behnel
Stephan Schulz, 27.04.2010 12:57: 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

Re: Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Jon Clements
On 27 Apr, 12:16, Laszlo Nagy gand...@shopzeus.com wrote: Please note: this is not a direct answer to your question. I would personally go for a client-server model; not worrying what the server is written in or how it works. For some reason I have a scary thought of your widget pulling

Re: Python 2.X vs. 3.X - level of acceptance?

2010-04-27 Thread Peter Otten
Stephan Schulz wrote: 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

Re: running .py files on Linux

2010-04-27 Thread Tingting HAN
I apologize that I am new to Linux. I find this in my computer: /usr/lib/python2.6/dist-packages/tables$ How should I know which version of PyTables has been installed? What is the command? Which version should I download to solve the problem? And could you please give me the website link to

May Introduction to Python class

2010-04-27 Thread Steve Holden
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

Re: Python compiled modules are too big in size (even after strip)

2010-04-27 Thread Jon Clements
On 27 Apr, 10:43, King animator...@gmail.com wrote: Hi, I have just compiled python 2.6.5 from sources on ubuntu hardy 8.04. I have used a simple script to do everything in one go: ./configure --enable-shared make make install Python is compiled and installed successfully. However the

Re: running .py files on Linux

2010-04-27 Thread Chris Rebert
2010/4/27 Chris Rebert c...@rebertia.com On Tue, Apr 27, 2010 at 3:54 AM, Tingting HAN hihigh...@gmail.com wrote: snip gentest_empty.py Traceback (most recent call last):   File gentest_empty.py, line 8, in module     from tables import *   File

Re: Python 2.5.x _winreg - rename a subkey

2010-04-27 Thread Tim Golden
On 27/04/2010 12:23, Richard Lamboj wrote: is there a way to rename a subkey? This is essentially a Windows question, since the _winreg module is a lightweight wrapper around (some of) the MS Reg functions: http://msdn.microsoft.com/en-us/library/ms724875%28v=VS.85%29.aspx And: no, there

Re: dictionary

2010-04-27 Thread Roald de Vries
On Apr 26, 2010, at 8:04 PM, gopi krishna wrote: When I give a dictionary with key and value in order how can get back iy in same order I use YAML a lot, which supports ordered dicts, and these are interpreted as lists of pairs by Python, so that might be a good choice. --

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Mark Dickinson
On Apr 27, 2:16 am, Keith keith.braff...@gmail.com wrote: On Apr 26, 8:47 pm, MRAB pyt...@mrabarnett.plus.com wrote: t for powers of a thousand, perhaps? (Or m?) Both of those letters are fine.  I kinda like m for the whole Greco- Roman angle, now that you point it out :-) By the way,

Problems with extra blank line when using csv.writer in Python 3.1

2010-04-27 Thread tkp...@hotmail.com
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

Pointers in Python

2010-04-27 Thread Anton Shishkov
Hi, I can't figure out how can I change the variable type in function. In C I could do that easily by changing pointer. Code: def add(b): b = {} print type(b) a = [] print type(a) add(a) print type(a) Output: type 'list' type 'dict' type 'list' --

Re: Pointers in Python

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 6:09 AM, Anton Shishkov anton.shish...@gmail.com wrote: Hi, I can't figure out how can I change the variable type in function. In C I could do that easily by changing pointer. Code: def add(b):    b = {}    print type(b) a = [] print type(a) add(a) print

Re: Pointers in Python

2010-04-27 Thread Laszlo Nagy
Hi, I can't figure out how can I change the variable type in function. In C I could do that easily by changing pointer. Please read about mutable and immutable objects in Python. If you understand the difference between them, you will get the idea. I'll explain program anyway, showing you

Re: Problems with extra blank line when using csv.writer in Python 3.1

2010-04-27 Thread Peter Otten
tkp...@hotmail.com wrote: 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

Re: Pointers in Python

2010-04-27 Thread Bruno Desthuilliers
Anton Shishkov a écrit : Hi, I can't figure out how can I change the variable type in function. In C I could do that easily by changing pointer. (snip) Others already answered on this. Now, the real question is : why to you want to do such a thing ? Of one the most common use case for this

Re: running .py files on Linux

2010-04-27 Thread Tingting HAN
Well, another person in our lab solved it by using the command: python2.5 configuration.py I do not know exactly why python2.6 in my computer does not work. The code packet I dowloaded was was made in 2007, so maybe old versions of python should work. 2010/4/27 Chris Rebert creb...@ucsd.edu

Re: Python compiled modules are too big in size (even after strip)

2010-04-27 Thread King
Hi Jon, I do have a limited skill sets in c/c++ and also new on linux. I think I am missing some flags or anything when I am compiling python from sources. Still hoping that some one point me out the missing link. Cheers Prashant -- http://mail.python.org/mailman/listinfo/python-list

Re: Engineering numerical format PEP discussion

2010-04-27 Thread cassiope
On Apr 25, 10:19 pm, Chris Rebert c...@rebertia.com wrote: On Sun, Apr 25, 2010 at 9:42 PM, Keith keith.braff...@gmail.com wrote: On Apr 26, 12:02 am, Chris Rebert c...@rebertia.com wrote: On Sun, Apr 25, 2010 at 8:36 PM, Keith keith.braff...@gmail.com wrote: I am considering writing a PEP

Re: running .py files on Linux

2010-04-27 Thread Chris Rebert
2010/4/27 Chris Rebert creb...@ucsd.edu 2010/4/27 Chris Rebert c...@rebertia.com On Tue, Apr 27, 2010 at 3:54 AM, Tingting HAN hihigh...@gmail.com wrote: snip gentest_empty.py Traceback (most recent call last):   File gentest_empty.py, line 8, in module     from tables import

Re: Problems with extra blank line when using csv.writer in Python 3.1

2010-04-27 Thread tkp...@hotmail.com
Worked like a charm! Thank you very much. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with extra blank line when using csv.writer in Python 3.1

2010-04-27 Thread Terry Reedy
On 4/27/2010 9:05 AM, tkp...@hotmail.com wrote: 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.

Re: Python 2.X vs. 3.X - level of acceptance?

2010-04-27 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/27/2010 03:57 AM, Stephan Schulz wrote: Is Python 3 sucessful enough to make a switch worthwhile now? The language/interpreter is just fine. The biggest problem is 3rd party modules. My own module (APSW) has been available since the early

Re: Download Visual Studio Express 2008 now

2010-04-27 Thread TerryP
I've generally found it wise to grab the ISO images for the express editions collection, and save it somewhere in cold storage. Never have needed to compile Python on Windows, but some modules only support older versions (e.g. 2.4 or 2.5), which is irksome. So it's a good idea to have stuff setup

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Keith
On Apr 27, 9:03 am, Mark Dickinson dicki...@gmail.com wrote: On Apr 27, 2:16 am, Keith keith.braff...@gmail.com wrote: On Apr 26, 8:47 pm, MRAB pyt...@mrabarnett.plus.com wrote: t for powers of a thousand, perhaps? (Or m?) Both of those letters are fine.  I kinda like m for the whole

Re: Download Visual Studio Express 2008 now

2010-04-27 Thread Paul Rudin
Martin v. Loewis mar...@v.loewis.de writes: Microsoft has just released Visual Studio 2010, along with its free (of charge) Express edition. Following a tradition, they are likely to withdraw support and availability for VS 2008 Express some time in the future. Python 2.6, 2.7, and 3.1 are

Re: Detect OS shutdown or user logout across different operating systems

2010-04-27 Thread python
Hi Tim, Doubt v. much if there's anything x-platform. I recently wrote-up the work done my Klaas Tjebbes (sp?) which I think will do what you want: http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html Looks good - I'll study this code. Thanks for the help! Cheers, Malcolm

Oddity with large dictionary (several million entries)

2010-04-27 Thread Lothar Werzinger
Hi, I am trying to load files into a dictionary for analysis. the size of the dictionary will grow quite large (several million entries) and as inserting into a dictionary is roughly O(n) I figured if I loaded each file into it's own dictionary it would speed things up. However it did not. So

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread MRAB
Lothar Werzinger wrote: Hi, I am trying to load files into a dictionary for analysis. the size of the dictionary will grow quite large (several million entries) and as inserting into a dictionary is roughly O(n) I figured if I loaded each file into it's own dictionary it would speed things

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Peter Otten
Lothar Werzinger wrote: I am trying to load files into a dictionary for analysis. the size of the dictionary will grow quite large (several million entries) and as inserting into a dictionary is roughly O(n) I figured if I loaded each file into it's own dictionary it would speed things up.

ANN: Intro+Intermediate Python course, SF, May 10-12

2010-04-27 Thread wesley chun
*** FINAL REMINDER *** Need to get up-to-speed with Python as quickly as possible? Come join me, Wesley Chun, author of Prentice-Hall's bestseller Core Python Programming, for a comprehensive Python course coming up this May in beautiful Northern California! I welcome new Python programmers as

Re: Python compiled modules are too big in size (even after strip)

2010-04-27 Thread Antoine Pitrou
Le Tue, 27 Apr 2010 02:43:19 -0700, King a écrit : Python is compiled and installed successfully. However the modules(_socket.so, _random.so etc) are two big in terms of file size. They are around 4.5-5.0 mb each. I have used strip strip-all *.so, but still size is around 1.5 mb each. This

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Lothar Werzinger
Peter Otten wrote: Lothar Werzinger wrote: Can anyone explain this oddity? Any insight is highly appreciated. When you are creating objects like there is no tomorrow Python's cyclic garbage collections often takes a significant amount of time. The first thing I'd try is therefore switching

Re: pyjamas 0.7 released

2010-04-27 Thread lkcl
On Apr 26, 11:25 pm, Patrick Maupin pmau...@gmail.com wrote: On Apr 26, 4:12 pm, lkcl luke.leigh...@googlemail.com wrote:  and, given that you can use AJAX (e.g. JSONRPC) to communicate with a server-side component, installed on 127.0.0.1 and effectively do the exact same thing, nobody

How to check what is holding reference to object

2010-04-27 Thread Michal M
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

Re: How to check what is holding reference to object

2010-04-27 Thread Xavier Ho
Michal, May I ask why do you care about the object's management? Let Python worry about that. What's your use case? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to check what is holding reference to object

2010-04-27 Thread Almar Klein
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

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 1:45 PM, Michal M mich.mier...@googlemail.com wrote: 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

Re: How to check what is holding reference to object

2010-04-27 Thread Duncan Booth
Michal M mich.mier...@googlemail.com wrote: 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

Re: How to check what is holding reference to object

2010-04-27 Thread Michal M
On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: 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

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 2:42 PM, Michal M mich.mier...@googlemail.com wrote: On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: I've just found out that one of objects is not destroyed when it should be. This means that something

Re: How to check what is holding reference to object

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 2:58 PM, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 2:42 PM, Michal M mich.mier...@googlemail.com wrote: On 27 Kwi, 23:21, Duncan Booth duncan.bo...@invalid.invalid wrote: Michal M mich.mier...@googlemail.com wrote: I've just found out that one of

Re: Cross-platform way to retrieve the current (Operative system) DNS server IP address in python

2010-04-27 Thread joamag
On 24 Abr, 14:50, DarkBlue pict...@gmail.com wrote: On Apr 22, 4:55 pm, joamag joa...@gmail.com wrote: Does anybody know a cross platform way to retrieve the default DNS server IP address in python ? Thanks ! João import os,urllib2,re def getIpAddr():         Function for parsing

Re: Download Visual Studio Express 2008 now

2010-04-27 Thread Martin v. Loewis
I'm curious to know exactly the differences between the c/c++ compilers you get with various versions of VS and those you get with the (command line only) Windows SDK (formerly called the platform SDK). The windows sdk is a free download. Is the compiler you get the same as the one you get

How to use a class property to store function variables?

2010-04-27 Thread GZ
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

Re: How to use a class property to store function variables?

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 4:36 PM, GZ zyzhu2...@gmail.com wrote: 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

Re: Cross-platform way to retrieve the current (Operative system) DNS server IP address in python

2010-04-27 Thread Tiago Katcipis
maybe this helps you: http://pypi.python.org/pypi/netifaces/0.3 best regards, Katcipis On Tue, Apr 27, 2010 at 7:49 PM, joamag joa...@gmail.com wrote: On 24 Abr, 14:50, DarkBlue pict...@gmail.com wrote: On Apr 22, 4:55 pm, joamag joa...@gmail.com wrote: Does anybody know a cross

PyCon Australia CFP: One Day Left!

2010-04-27 Thread Richard Jones
The Call For Proposals for PyCon Australia 2010 FINISHES TOMORROW! Presentation subjects may range from reports on open source, academic and commercial projects to tutorials and case studies. As long as a presentation is interesting and potentially useful to the Python community, it will be

Re: How to use a class property to store function variables?

2010-04-27 Thread Terry Reedy
On 4/27/2010 7:36 PM, GZ wrote: 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, instring TypeError: unbound methodlambda() must be called with A

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Benjamin Peterson
Lothar Werzinger lothar at tradescape.biz writes: Wow, that really MAKES a difference! Thanks a lot! You should also try Python 2.7 or 3.1. We've recently optimized the garabage collector for situations where many objects are being created. --

Re: How to use a class property to store function variables?

2010-04-27 Thread GZ
Hi Chris, On Apr 27, 6:43 pm, Chris Rebert c...@rebertia.com wrote: On Tue, Apr 27, 2010 at 4:36 PM, GZ zyzhu2...@gmail.com wrote: 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

Ignoring XML Namespaces with cElementTree

2010-04-27 Thread dmtr
Is there any way to configure cElementTree to ignore the XML root namespace? Default cElementTree (Python 2.6.4) appears to add the XML root namespace URI to _every_ single tag. I know that I can strip URIs manually, from every tag, but it is a rather idiotic thing to do (performance wise). --

Simple game like graphics

2010-04-27 Thread Vincent Davis
I am working on a simulation of a bicycle race. I would like a very simple real time graphic of the position of the bicycles during the simulation and a few of the key values. I will not be iterating with the simulation while it is running. I am not really sure where to start. Currently to watch

Re: How to use a class property to store function variables?

2010-04-27 Thread MRAB
Terry Reedy wrote: On 4/27/2010 7:36 PM, GZ wrote: 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, instring TypeError: unbound methodlambda()

assigning multi-line strings to variables

2010-04-27 Thread goldtech
Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d Traceback (most recent call last): File interactive input, line 1, in module NameError: name 'd' is not defined --

Re: How to use a class property to store function variables?

2010-04-27 Thread alex23
GZ zyzhu2...@gmail.com wrote: I do not think it will help me. I am not trying to define a function fn() in the class, but rather I want to make it a function reference so that I can initialize it any way I like later. It always helps to try an idea out before dismissing it out of hand.

Re: assigning multi-line strings to variables

2010-04-27 Thread MRAB
goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d Traceback (most recent call last): File interactive input, line 1, in module NameError: name 'd' is not defined Use a

Re: assigning multi-line strings to variables

2010-04-27 Thread Brendan Abel
On Apr 27, 7:20 pm, goldtech goldt...@worldpost.com wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d Traceback (most recent call last):   File interactive input, line 1, in

Re: Python 2.X vs. 3.X - level of acceptance?

2010-04-27 Thread John Nagle
Roger Binns wrote: On 04/27/2010 03:57 AM, Stephan Schulz wrote: Is Python 3 sucessful enough to make a switch worthwhile now? The language/interpreter is just fine. The biggest problem is 3rd party modules. Indeed. Python 3 is a good language, and the CPython interpreter is in good

Re: assigning multi-line strings to variables

2010-04-27 Thread goldtech
On Apr 27, 7:31 pm, Brendan Abel 007bren...@gmail.com wrote: On Apr 27, 7:20 pm, goldtech goldt...@worldpost.com wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d

Re: assigning multi-line strings to variables

2010-04-27 Thread goldtech
On Apr 27, 7:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d Traceback (most recent call last):   File interactive

Re: assigning multi-line strings to variables

2010-04-27 Thread Benjamin Kaplan
On Tue, Apr 27, 2010 at 10:51 PM, goldtech goldt...@worldpost.com wrote: On Apr 27, 7:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks.

Re: assigning multi-line strings to variables

2010-04-27 Thread geremy condra
On Tue, Apr 27, 2010 at 10:51 PM, goldtech goldt...@worldpost.com wrote: On Apr 27, 7:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks.

Re: assigning multi-line strings to variables

2010-04-27 Thread MRAB
goldtech wrote: On Apr 27, 7:33 pm, MRAB pyt...@mrabarnett.plus.com wrote: goldtech wrote: Hi, This is undoubtedly a newbie question. How doI assign variables multiline strings? If I try this i get what's cited below. Thanks. d=d d d Traceback (most recent call last): File

Re: assigning multi-line strings to variables

2010-04-27 Thread Ben Finney
goldtech goldt...@worldpost.com writes: Only seems to work when there's a '... ' on the 2nd line. You seem to be confused by the presentation of the interactive interpreter. That text is a prompt. I need a way to assign large blocks of text to a variable w/out special formatting. That's

Re: SWIG + expy

2010-04-27 Thread Yingjie Lan
From: Stefan Behnel stefan...@behnel.de Subject: Re: SWIG + expy To: python-list@python.org Date: Tuesday, April 27, 2010, 11:57 AM Yingjie Lan, 27.04.2010 08:30: Is it possible to use SWIG to parse C/C++, and provide an interface for me to generate some code? I thought it might be good

Re: assigning multi-line strings to variables

2010-04-27 Thread Sagar K
Use triple quote: d = this is a sample text which does not mean anything goldtech goldt...@worldpost.com wrote in message news:4e25733e-eafa-477b-a84d-a64d139f7...@u34g2000yqu.googlegroups.com... On Apr 27, 7:31 pm, Brendan Abel 007bren...@gmail.com wrote: On Apr 27, 7:20 pm, goldtech

Re: assigning multi-line strings to variables

2010-04-27 Thread Alf P. Steinbach
On 28.04.2010 07:11, * Sagar K: Use triple quote: d = this is a sample text which does not mean anything goldtechgoldt...@worldpost.com wrote in message news:4e25733e-eafa-477b-a84d-a64d139f7...@u34g2000yqu.googlegroups.com... On Apr 27, 7:31 pm, Brendan Abel007bren...@gmail.com wrote: On

[issue8545] i didn't get rqrd output for programme in python?(plz... help)

2010-04-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Please use python-h...@python.org or comp.lang.python for usage questions, not the tracker. -- nosy: +georg.brandl resolution: - invalid status: open - closed ___ Python tracker

[issue1462525] URI parsing library

2010-04-27 Thread Paul Jimenez
Paul Jimenez p...@place.org added the comment: Since no one else has commented on this in over a year, and the new (2.6+) code works fine, I'll just close this to help clean things up. -- status: open - closed ___ Python tracker

[issue8128] String interpolation with unicode subclass fails to call __str__

2010-04-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: In Python 2.x, __unicode__ is called instead of __str__. Whether that's correct behavior, I'm not sure, but at least it is consistent with {}.format(K()). In Python 3.x, __unicode__ doesn't exist and __str__ isn't called; but for

[issue4037] doctest.py should include method descriptors when looking inside a class __dict__

2010-04-27 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: So for staticmethods and classmethods, valname doesn't need to be reassigned? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4037

[issue8546] The parameter buffering in _pyio.open doesn't work the same as in the builtin open

2010-04-27 Thread Patrick Sabin
New submission from Patrick Sabin patricksa...@gmx.at: As far as I understand the _pyio.open function should resemble the builtin open, but in case of the buffering parameter, it doesn't. The builtin version doesn't allow None as argument, but this is the default in the _pyio.open signature.

[issue7384] curses crash on FreeBSD

2010-04-27 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Roumen Petrov rep...@bugs.python.org wrote: Yes , I understand . For the protocol did gcc on FreeBSD warn if library order is -lncursesw -lreadline ? No. P.S. Issue with readline library linked to termcap compatible library on

  1   2   3   >