Re: SWIG + expy

2010-04-27 Thread Stefan Behnel
Yingjie Lan, 28.04.2010 05:53: From: 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.

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

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 11:02 PM, GZ wrote: > On Apr 27, 9:20 pm, alex23 wrote: >> GZ 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

os x compile, install?

2010-04-27 Thread Rob
Hi, Python on my system is behaving badly, so I want to create a new install from source code. I have OS X 10.6.2, I downloaded the source code (Python-2.6.5.tar.bz2) and did the usual, ./configure, make, sudo make install. Build went fine. But on install, why is it putting things is my home di

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

2010-04-27 Thread GZ
On Apr 27, 9:20 pm, alex23 wrote: > GZ 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 dis

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

2010-04-27 Thread GZ
On Apr 27, 9:20 pm, alex23 wrote: > GZ 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 dis

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""" "goldtech" 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 p

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" 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 wrote: > > > Hi, >

Re: SWIG + expy

2010-04-27 Thread Yingjie Lan
> From: Stefan Behnel > 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 > to have

Re: assigning multi-line strings to variables

2010-04-27 Thread Ben Finney
goldtech 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 what triple-quoted stri

Re: assigning multi-line strings to variables

2010-04-27 Thread MRAB
goldtech wrote: On Apr 27, 7:33 pm, MRAB 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 "", line 1, in NameError: name

Re: assigning multi-line strings to variables

2010-04-27 Thread geremy condra
On Tue, Apr 27, 2010 at 10:51 PM, goldtech wrote: > On Apr 27, 7:33 pm, MRAB 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

Re: assigning multi-line strings to variables

2010-04-27 Thread Benjamin Kaplan
On Tue, Apr 27, 2010 at 10:51 PM, goldtech wrote: > On Apr 27, 7:33 pm, MRAB 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"

Re: assigning multi-line strings to variables

2010-04-27 Thread goldtech
On Apr 27, 7:33 pm, MRAB 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 "", line 1,

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 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: 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 s

Re: assigning multi-line strings to variables

2010-04-27 Thread Brendan Abel
On Apr 27, 7:20 pm, 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 "", line 1, in > NameError: name 'd'

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 "", line 1, in NameError: name 'd' is not defined Use a triple-quoted string

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

2010-04-27 Thread alex23
GZ 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. Experimentation in the

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 "", line 1, in NameError: name 'd' is not defined -- http://mail.python.org/mailman/listinf

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 "", line 1, in TypeError: unbound method() must be called wit

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 t

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). -- h

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 wrote: > On Tue, Apr 27, 2010 at 4: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 la

Re: Oddity with large dictionary (several million entries)

2010-04-27 Thread Benjamin Peterson
Lothar Werzinger 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. -- http://mail.python.org/mailman/listinfo/python-list

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 "", line 1, in TypeError: unbound method() must be called with A instance as firs

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 consid

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 wrote: > On 24 Abr, 14:50, DarkBlue wrote: > > On Apr 22, 4:55 pm, joamag wrote: > > > > > Does anybody know a cross platform way to retrieve the default DNS > > > s

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 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 "", line 1, in > TypeError: unbound method () must be

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 "", line 1, in TypeError: unbound method () must be called with A instance as first argument (got int instance inste

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 yo

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 wrote: > On Apr 22, 4:55 pm, joamag 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 external ip a

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 wrote: > On Tue, Apr 27, 2010 at 2:42 PM, Michal M wrote: >> On 27 Kwi, 23:21, Duncan Booth wrote: >>> Michal M wrote: >>> > I've just found out that one of objects is not destroyed when it >>> > should be. This means that something was holding refe

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 wrote: > On 27 Kwi, 23:21, Duncan Booth wrote: >> Michal M 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 th

Re: How to check what is holding reference to object

2010-04-27 Thread Michal M
On 27 Kwi, 23:21, Duncan Booth wrote: > Michal M 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 refere

Re: How to check what is holding reference to object

2010-04-27 Thread Duncan Booth
Michal M 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 just looking to the c

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 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 reference? I am unable to do th

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 beca

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

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 it

Re: pyjamas 0.7 released

2010-04-27 Thread lkcl
On Apr 26, 11:25 pm, Patrick Maupin wrote: > On Apr 26, 4:12 pm, lkcl 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 bothers. > > I suppose, but again, that p

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 swi

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.

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 w

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.

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 up

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: 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, Malcol

Re: Download Visual Studio Express 2008 now

2010-04-27 Thread Paul Rudin
"Martin v. Loewis" 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 all built w

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Keith
On Apr 27, 9:03 am, Mark Dickinson wrote: > On Apr 27, 2:16 am, Keith wrote: > > > On Apr 26, 8:47 pm, MRAB 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 :-

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: 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 b

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: 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: running .py files on Linux

2010-04-27 Thread Chris Rebert
> 2010/4/27 Chris Rebert >> > 2010/4/27 Chris Rebert >> >> On Tue, Apr 27, 2010 at 3:54 AM, Tingting HAN >> >> wrote: >> >> >> >> >> gentest_empty.py >> >> >> Traceback (most recent call last): >> >> >>   File "gentest_empty.py", line 8, in >> >> >>     from tables import * >> >> >>   File "/u

Re: Engineering numerical format PEP discussion

2010-04-27 Thread cassiope
On Apr 25, 10:19 pm, Chris Rebert wrote: > On Sun, Apr 25, 2010 at 9:42 PM, Keith wrote: > > On Apr 26, 12:02 am, Chris Rebert wrote: > >> On Sun, Apr 25, 2010 at 8:36 PM, Keith wrote: > >> > I am considering writing a PEP for the inclusion of an engineering > >> > format specifier, and would a

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: 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 > > 2010/4/27 Chris

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: 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 ch

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: Pointers in Python

2010-04-27 Thread Chris Rebert
On Tue, Apr 27, 2010 at 6:09 AM, Anton Shishkov 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 type(a) > > Output

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: -- http://mail.python.org/mailman/listinfo/python-list

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 the

Re: Engineering numerical format PEP discussion

2010-04-27 Thread Mark Dickinson
On Apr 27, 2:16 am, Keith wrote: > On Apr 26, 8:47 pm, MRAB 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, there's already a feature request open f

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. -- http://mail.pyth

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 is

Re: running .py files on Linux

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

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

2010-04-27 Thread Jon Clements
On 27 Apr, 10:43, King 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 > modules(_s

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 626

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 downlo

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: Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Jon Clements
On 27 Apr, 12:16, Laszlo Nagy 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 in 100million

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 and

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: 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 w

Re: running .py files on Linux

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

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 Py

Re: running .py files on Linux

2010-04-27 Thread Tingting HAN
2010/4/27 Tingting HAN > 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 > hdfview_install_linux32

Re: Open Source Pivot table (OLAP cube?)

2010-04-27 Thread Jon Clements
On 27 Apr, 10:10, Laszlo Nagy 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 find any open so

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: 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 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 like %

Re: when should I explicitly close a file?

2010-04-27 Thread Lawrence D'Oliveiro
In message , 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 until an object has dropped out of cache befo

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: 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 sa

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: 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

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

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 chara

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). The

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 annoy

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

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

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 w

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 maili

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: 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 Inter