Re: Why custom objects take so much memory?

2007-12-19 Thread Hrvoje Niksic
Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Tue, 18 Dec 2007 21:13:14 +0100, Hrvoje Niksic wrote: > >> Each object takes 36 bytes itself: 4 bytes refcount + 4 bytes type ptr + >> 4 bytes dict ptr + 4 bytes weakptr + 12 bytes gc overhead. That's not >> counting malloc overhead, which should b

Re: why only an msi-installer for windows ?

2007-12-19 Thread Stef Mientki
Gabriel Genellina wrote: > On 18 dic, 15:54, Stef Mientki <[EMAIL PROTECTED]> wrote: > >> having a lot of trouble installing 2.5 (without affecting my stable 2.4), >> I wonder why there's only a msi installer for windows users ? > > What's your problem? I have five versions installed (2.1, 2.3, 2

How does setup.py work?

2007-12-19 Thread dxm
I am a new comer to python. I am wondering how setup.py works. For example, I have a directory like this: / setup.py mymodule.c where setup.py is: from distutils.core import setup, Extension mod = Extension('mymodule', sources = ['mymodule.c']) setup (name = 'Package', version = '1

Need help with "with-statement-compatible" object

2007-12-19 Thread Dmitry Teslenko
Hello! I've made some class that can be used with "with statement". It looks this way: class chdir_to_file( object ): ... def __enter__(self): ... def __exit__(self, type, val, tb): ... def get_chdir_to_file(file_path): return chdir_to_file(file_path) ... Snippet with obj

Re: How to generate pdf file from an html page??

2007-12-19 Thread Stefan Behnel
abhishek wrote: > sh: a2ps: not found This should make you think. Sounds like a good reason to install a2ps... Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing intobject to use int rather than long

2007-12-19 Thread Christian Heimes
Terry Reedy wrote: > Good idea. I think people who moved to 64 bits to get 64 bits would be > upset if they did not ;-). Windows X64 users still get 32bit ints. The long datatype is 32bit even on the 64bit version of Windows. Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: import X between submodules in a package

2007-12-19 Thread Bruno Desthuilliers
Donn Ingle a écrit : > Hi, I'm sure this is a FAQ, but I have just not found clarity on the > web/docs. > > (using monospaced type to show the tree) > trunk:$ tree > . > fp > |-- fontypython > | |-- __init__.py > | |-- cli.py > | |-- config.py > > (I start it all with ./fp) > > fp says: >

Re: clearing text on canvas

2007-12-19 Thread Peter Otten
[EMAIL PROTECTED] wrote: > i am doing validation of contents of a folder and need to show the > ok/error messages on a canvas > > resultdisplay =Canvas(...) > errmessage="error!" > okmessage="dir validation ok!" > > if dirvalidate is False: if ... is False: ... is bad style. Just if dirvali

Re: operator module isSequenceType with builtin set produces False

2007-12-19 Thread MarkE
On 19 Dec, 05:24, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 18 Dec 2007 09:15:12 -0300, English, Mark <[EMAIL PROTECTED]> > escribió: > > > > try: set > except NameError: from sets import Set as set > class myset_fails(set): pass > class myset_works(set): >

Re: How does setup.py work?

2007-12-19 Thread Matias Surdi
dxm escribió: > I am a new comer to python. > I am wondering how setup.py works. > For example, I have a directory like this: > / >setup.py >mymodule.c > > where setup.py is: > > from distutils.core import setup, Extension > > mod = Extension('mymodule', sources = ['mymodule.c']) > > se

Re: How does setup.py work?

2007-12-19 Thread Robert Kern
dxm wrote: > I am a new comer to python. > I am wondering how setup.py works. > For example, I have a directory like this: > / >setup.py >mymodule.c > > where setup.py is: > > from distutils.core import setup, Extension > > mod = Extension('mymodule', sources = ['mymodule.c']) > > setup

Re: Need help with "with-statement-compatible" object

2007-12-19 Thread Peter Otten
Dmitry Teslenko wrote: > Hello! > I've made some class that can be used with "with statement". It looks this > way: > > class chdir_to_file( object ): > ... > def __enter__(self): > ... > > def __exit__(self, type, val, tb): > ... > def get_chdir_to_file(file_path): > return c

Re: How does setup.py work?

2007-12-19 Thread Robert Kern
Matias Surdi wrote: > Here you can read the documentation of "setuptools" , the package from > where setup.py comes. > > http://peak.telecommunity.com/DevCenter/setuptools No, setup.py files are standard distutils. setuptools is a 3rd-party package that extends distutils. http://docs.python.

how to get string printed by PyErr_Print( )?

2007-12-19 Thread grbgooglefan
PythonC API function PyErr_Print( ) prints an error string onto stderr if PyErr_Occurred() is true. I don't want to print this to stderr because my Python+C code is running daemon mode & won't have terminal / stderr. So, I want to retrieve the string which PyErr_Print( ) will print. E.g., PyErr_Pri

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Robert Kern
grbgooglefan wrote: > PythonC API function PyErr_Print( ) prints an error string onto stderr > if PyErr_Occurred() is true. > I don't want to print this to stderr because my Python+C code is > running daemon mode & won't have terminal / stderr. > So, I want to retrieve the string which PyErr_Print(

Re: Windows XP unicode and escape sequences

2007-12-19 Thread Martin v. Löwis
> This brings up another question. If I run some Python code that > starts off with 'os.system('cp869')' so it will change to the correct > code page, then when it starts printing the Greek characters it > breaks. But run the same Python code again and it works fine. Is > there another way to do

Re: operator module isSequenceType with builtin set produces False

2007-12-19 Thread MarkE
On 19 Dec, 10:03, MarkE <[EMAIL PROTECTED]> wrote: > > No, sets aren't sequences, as they have no order. Same as dicts, which > > aren't sequences either. > > Oops. I was under the misapprehension that they were sequences I realise now that this is even explicitly documented: http://docs.python.org

Re: Static linking of python and pyqt

2007-12-19 Thread Martin v. Löwis
> I'm trying to link python statically with qt and pyqt. I've tried this in > several ways but never succeeded. At the moment the final make runs without > errors but I get import errors when accessing pyqt. > How can I solve this problem? You'll need to include QtCore into Modules/config.c, pre

Re: how to get string printed by PyErr_Print( )?

2007-12-19 Thread Christian Heimes
grbgooglefan wrote: > PythonC API function PyErr_Print( ) prints an error string onto stderr > if PyErr_Occurred() is true. > I don't want to print this to stderr because my Python+C code is > running daemon mode & won't have terminal / stderr. > So, I want to retrieve the string which PyErr_Print(

Re: Python decompiler

2007-12-19 Thread Martin v. Löwis
> I'm searching a maneuverable python bytecode decompiler. There is one > named 'decompyle', but it doesn't support Python2.5 and too hard to > use. And the 'depython'(http://www.depython.net/) is good enough > except it cannot process file more than 5kb. > > Is there some else available? I don't

Re: import X between submodules in a package

2007-12-19 Thread Chris
On Dec 19, 9:24 am, Donn Ingle <[EMAIL PROTECTED]> wrote: > So, I guess I am confused about the 'scope' of what gets imported where. I > am thinking that if one module (py file) does *import os* something and > *then* imports another module - the second module should have access to os > too? > I i

Re: why only an msi-installer for windows ?

2007-12-19 Thread Martin v. Löwis
>>> having a lot of trouble installing 2.5 (without affecting my stable >>> 2.4), >>> I wonder why there's only a msi installer for windows users ? >> >> What's your problem? I have five versions installed (2.1, 2.3, 2.4, >> 2.5 and svn) and they coexist peacefully. Just make sure when >> installin

Re: Best way to protect my new commercial software.

2007-12-19 Thread Piet van Oostrum
> Steven D'Aprano <[EMAIL PROTECTED]> (SD) wrote: >SD> It means that there is a serious problem of "orphan works", where rare >SD> and valuable films from the 1920s and earlier are rapidly decaying >SD> into an unusable powder because nobody dares copy them lest the >SD> unknown copyright owne

pass 3D Matrix from matlab to C mex- file

2007-12-19 Thread baavour
help please how can i pass 3d matrix from matlab to c using mex file thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc - how to generate documentation for an entire package?

2007-12-19 Thread kirillrd
On Nov 20, 4:28 pm, Jens <[EMAIL PROTECTED]> wrote: > On 20 Nov., 08:19, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > > > On Mon, 19 Nov 2007 10:50:28 -0800, Jens wrote: > > > Generating documentation form code is a nice thing, but this pydoc.py > > > is driving me insane - isn't there are

Re: Static linking of python and pyqt

2007-12-19 Thread Markus Dahlbokum
> > I'm trying to link python statically with qt and pyqt. I've tried this in > > several ways but never succeeded. At the moment the final make runs > > without errors but I get import errors when accessing pyqt. > > How can I solve this problem? > > You'll need to include QtCore into Modules/conf

Re: pass 3D Matrix from matlab to C mex- file

2007-12-19 Thread Robert Kern
[EMAIL PROTECTED] wrote: > help please > > how can i pass 3d matrix from matlab to c > > using mex file This is a mailing list for the Python programming language. Please ask your question on the appropriate Matlab mailing list. -- Robert Kern "I have come to believe that the whole world is a

Re: Newbie observations

2007-12-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > Warning! Complaints coming. > > The good news is that 10-days of part-time Python coding has convinced > me that I picked the right language. Now, observations. > > First, it is absolutely horrible being a newbie. I'd forgot how bad it > was. In addition to making a

Re: Need help with "with-statement-compatible" object

2007-12-19 Thread Dmitry Teslenko
On Dec 19, 2007 12:14 PM, Peter Otten <[EMAIL PROTECTED]> wrote: > def __enter__(self): > # ... > return self > > should help. That helps. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: why only an msi-installer for windows ?

2007-12-19 Thread Stef Mientki
Martin v. Löwis wrote: having a lot of trouble installing 2.5 (without affecting my stable 2.4), I wonder why there's only a msi installer for windows users ? >>> What's your problem? I have five versions installed (2.1, 2.3, 2.4, >>> 2.5 and svn) and they coexist peacefully. Just ma

Re: Static linking of python and pyqt

2007-12-19 Thread Martin v. Löwis
> I just want the qt libs linked to the interpreter without accessing them by a > module. I tried the configure option '--with-libs='lib ...''. The make did > fine but the executable is too small and the qt symbols are not known by it. > How can I just link qt statically? Why do you want to do t

Re: Newbie observations

2007-12-19 Thread MartinRinehart
> My 2 cents. Eurozone? That would be 3 cents US. I meant colon, not semi-colon. I did the tutorial. I did objects 3 times. In Java, the agreed convention is to use lowerAndUpper naming for member variables. (See http://www.MartinRinehart.com/articles/code-conventions.html#5_1 .) 10 days is n

Re: Why custom objects take so much memory?

2007-12-19 Thread jsanshef
Thank you all for your useful comments and suggestions!! They're a great starting point to redesign my script completely ;) Cheers! -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie observations

2007-12-19 Thread Marco Mariani
[EMAIL PROTECTED] wrote: > 10 days is not enough. But I don't have any more clarity in my Python > classes than I did in Java. You do when you start using classes the python way, and do things that are not even thinkable in java or any static language. -- http://mail.python.org/mailman/listinfo

Re: Newbie observations

2007-12-19 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: >> My 2 cents. > > Eurozone? That would be 3 cents US. > > I meant colon, not semi-colon. I did the tutorial. I did objects 3 > times. > > In Java, the agreed convention is to use lowerAndUpper naming for > member variables. (See > http://www.MartinRinehart.com/article

Re: Newbie observations

2007-12-19 Thread Peter Otten
MartinRinehart wrote: > 10 days is not enough. But I don't have any more clarity in my Python > classes than I did in Java. Just more "self"s. Watch your classes evolve over the next weeks. They will get smaller, with less state and fewer methods with less code. Occasionally you will use a functi

Need help with a regular expression

2007-12-19 Thread Sharun
Python newbie here. I am not clear about how the matching is taking place when I do the following >str5 = 'aaa bbb\r\n ccc ddd\r\n eee fff' >re5=re.compile('aaa.*(ddd|fff)',re.S); >re5.search(str5).group(0) 'aaa bbb\r\n ccc ddd\r\n eee fff' >re5.search(str5).group(1) 'fff' I am trying to find th

Re: Need help with a regular expression

2007-12-19 Thread marek . rocki
On 19 Gru, 13:08, Sharun <[EMAIL PROTECTED]> wrote: > I am trying to find the substring starting with 'aaa', and ending with > ddd OR fff. If ddd is found shouldnt the search stop? Shouldn't > re5.search(str5).group(0) return 'aaa bbb\r\n ccc ddd' ? The documentation for the re module (http://docs

error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

2007-12-19 Thread Emmanuel
I recently upgraded wxpython (and python) on XP using wxPython2.8- win32-unicode-2.8.7.1-py25.exe Now when I run from wxPython.wx import * It crashes : -> import _wx ... from _misc import * ... --> 456 wxDateTime_GetNumberOfDaysinYear = wx._misc.DateTime_GetNumberOfDaysinYear ... Atribute

Re: Static linking of python and pyqt

2007-12-19 Thread Markus Dahlbokum
> > I just want the qt libs linked to the interpreter without accessing them > > by a module. I tried the configure option '--with-libs='lib ...''. The > > make did fine but the executable is too small and the qt symbols are not > > known by it. How can I just link qt statically? > > Why do you wan

Re: lotus nsf to mbox

2007-12-19 Thread Michael Ströder
Adam Lanier wrote: >> Brian Munroe schrieb am 12/15/2007 07:10 PM: >>> >>> If you really need to do it from Linux and are lucky enough to be >>> running the IIOP task on your Domino server, then you could possibly >>> use CORBA. > > You could always enable the IMAP interface on the Domino machine

Re: import X between submodules in a package

2007-12-19 Thread Donn Ingle
Chris wrote: > print cli.os.environ['HOME'] I was really confused by your reply until I saw the cli.os part. Okay, I see what you mean. \d -- http://mail.python.org/mailman/listinfo/python-list

Re: import X between submodules in a package

2007-12-19 Thread Donn Ingle
> would be a VeryBadThing(tm). :) > Having explicits imports in each module is good wrt/ readability. Okay, I can accept that. I worry that it's opening the module file over and over again - or does it open it once and kind of re-point to it when it hits a second import of the same thing? > pac

Re: Need help with a regular expression

2007-12-19 Thread Paddy
On Dec 19, 12:08 pm, Sharun <[EMAIL PROTECTED]> wrote: > Python newbie here. I am not clear about how the matching is taking > place when I do the following > > >str5 = 'aaa bbb\r\n ccc ddd\r\n eee fff' > >re5=re.compile('aaa.*(ddd|fff)',re.S); > >re5.search(str5).group(0) > > 'aaa bbb\r\n ccc ddd\

Re: Newbie observations

2007-12-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : >> My 2 cents. > > Eurozone? That would be 3 cents US. > > I meant colon, not semi-colon. I did the tutorial. I did objects 3 > times. That's not where you'll learn the inners of Python's object model. You may want to browse this thread for some hints: http://groups.

Re: Need help with a regular expression

2007-12-19 Thread Sharun
Thanks Marek! -- http://mail.python.org/mailman/listinfo/python-list

Re: import X between submodules in a package

2007-12-19 Thread Bruno Desthuilliers
Donn Ingle a écrit : >> would be a VeryBadThing(tm). > :) > >> Having explicits imports in each module is good wrt/ readability. > Okay, I can accept that. I worry that it's opening the module file over and > over again Hopefully not ! "import" is not "include". > - or does it open it once an

Re: Distinguishing attributes and methods

2007-12-19 Thread Boris Borcic
MonkeeSage wrote: > what am I missing? To my eyes, when you write: >I think it muddies the water to say that a.a() and a.a are the same >thing--obviously they are not. In the common case, the first is a >method, and the second is a variable. What you are most obviously missing is what's shown

Re: pass 3D Matrix from matlab to C mex- file

2007-12-19 Thread Brian Blais
On Dec 19, 2007, at Dec 19:5:07 AM, [EMAIL PROTECTED] wrote: help please how can i pass 3d matrix from matlab to c using mex file thanks -- http://mail.python.org/mailman/listinfo/python-list wrong mailing list, you might want to try the matlab news group. but, to answer your question

HTML unit .

2007-12-19 Thread Amal
Is there something like HTML unit for python. I don't want to use jython and use the existing Java based HTML unit. Amal. -- http://mail.python.org/mailman/listinfo/python-list

Re: Static linking of python and pyqt

2007-12-19 Thread Diez B. Roggisch
Markus Dahlbokum wrote: >> > I just want the qt libs linked to the interpreter without accessing >> > them by a module. I tried the configure option '--with-libs='lib ...''. >> > The make did fine but the executable is too small and the qt symbols >> > are not known by it. How can I just link qt s

Re: error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

2007-12-19 Thread Enrico
"Emmanuel" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > I recently upgraded wxpython (and python) on XP using wxPython2.8- > win32-unicode-2.8.7.1-py25.exe > > Now when I run > > from wxPython.wx import * > > It crashes : On my win2k with 2.8.4.0 I got: >>> from wxPython.

3D plotting with python 2.5 on win32

2007-12-19 Thread anton
Hi, I would like to know if some of you knows a - working - actual - out of the box (for me: binaries available) Package/Lib to do 3D plotting out of the box. I know matplotlib. There is MayaVi from enthon but you need to use their python (2.4.3), all other stuff need picking sources etc

Re: error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

2007-12-19 Thread Emmanuel
I switched back to wxPython2.6 and with wxPython2.6-win32- unicode-2.6.4.0-py25.exe this problem mentionned eariler does not occur. -- http://mail.python.org/mailman/listinfo/python-list

sending a rip1 request via python

2007-12-19 Thread scripteaze
ok, im new to this sort of coding so excuse me if im not exactly sure as to what i need to pull this off. I need to be able to send a rip1 request to my rip1 enabled device., so i need python to send : 01 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 which is an RIP1 reque

Re: How to generate pdf file from an html page??

2007-12-19 Thread Terry Jones
> "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes: Grant> On 2007-12-19, abhishek <[EMAIL PROTECTED]> wrote: >>> > Hi everyone, I am trying to generate a PDF printable format file from >>> > an html page. Is there a way to do this using python. If yes then >>> > which library and functions

Re: How to generate pdf file from an html page??

2007-12-19 Thread Ismail Dönmez
Wednesday 19 December 2007 17:40:17 tarihinde Terry Jones şunları yazmıştı: > > "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes: > > Grant> On 2007-12-19, abhishek <[EMAIL PROTECTED]> wrote: > >>> > Hi everyone, I am trying to generate a PDF printable format file from > >>> > an html page.

Re: New+old-style multiple inheritance

2007-12-19 Thread George Sakkis
On Dec 18, 3:16 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 18, 10:08 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > We are trying to monkey-patch a third-party library that mixes new and > > old-style classes with multiple inheritance. > > New library? Geez, if people are dumb

Re: How to generate pdf file from an html page??

2007-12-19 Thread Grant Edwards
On 2007-12-19, abhishek <[EMAIL PROTECTED]> wrote: >> > Hi everyone, I am trying to generate a PDF printable format file from >> > an html page. Is there a way to do this using python. If yes then >> > which library and functions are required and if no then reasons why it >> > cant be done. >> >>

Preprocessing of input for the interactive interpreter?

2007-12-19 Thread Stefan Salewski
Hello, I just start learning Python (ordered "Dive into Python" a week ago). In the past I have used the Python interactive interpreter for some calculations instead of Linux command line tools like "bc" or "calc". I wonder if it is possible to do a pre-processing of command strings in the inter

Re: container.___le___ can use only <=?

2007-12-19 Thread Neil Cerutti
On 2007-12-15, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 15, 9:05 am, [EMAIL PROTECTED] wrote: >> My reasoning is (I hope) that the container ought to support >> every comparison operation supported by the contained objects. >> This can be ensured by being careful in the implementation. > > I

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread gDog
Hi, Sam- I'm not wanting to start a flame war, either, but may I ask why does your friend want to do that? I'm always intrigued by the folks who object to the indentation rules in Python, even though I've always tried to keep consistent indentation in all the languages I've used (and I've been at

Re: How to generate pdf file from an html page??

2007-12-19 Thread Grant Edwards
On 2007-12-19, Terry Jones <[EMAIL PROTECTED]> wrote: >> "Grant" == Grant Edwards <[EMAIL PROTECTED]> writes: >Grant> On 2007-12-19, abhishek <[EMAIL PROTECTED]> wrote: > Hi everyone, I am trying to generate a PDF printable format file from > an html page. Is there a way to do this us

Re: sending a rip1 request via python

2007-12-19 Thread Dirk Loss
scripteaze wrote: > I need to be able to send a rip1 request to my rip1 enabled device., > so i need python to send : > 01 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 10 Use Scapy: from scapy import * myrip = RIP()/RIPEntry(metric=16) ans, unans = sr(IP(dst="192.168.1.1")/

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Sam
On Dec 19, 11:09 am, gDog <[EMAIL PROTECTED]> wrote: > Hi, Sam- > > I'm not wanting to start a flame war, either, but may I ask why does > your friend want to do that? I'm always intrigued by the folks who > object to the indentation rules in Python, even though I've always > tried to keep consist

Re: Another newbie design question

2007-12-19 Thread MartinRinehart
This morning block comments disappeared from the Decaf design. Maybe later today they'll be instantiated in the tokenizer. -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing Arbitrary Indentation in Python

2007-12-19 Thread Chris Mellon
On Dec 19, 2007 10:46 AM, Sam <[EMAIL PROTECTED]> wrote: > On Dec 19, 11:09 am, gDog <[EMAIL PROTECTED]> wrote: > > Hi, Sam- > > > > I'm not wanting to start a flame war, either, but may I ask why does > > your friend want to do that? I'm always intrigued by the folks who > > object to the indenta

Re: New+old-style multiple inheritance

2007-12-19 Thread Carl Banks
On Dec 19, 10:55 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On Dec 18, 3:16 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > On Dec 18, 10:08 am, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > We are trying to monkey-patch a third-party library that mixes new and > > > old-style clas

How to in Python

2007-12-19 Thread MartinRinehart
I've got a pointer to a position in a line of code that contains either a digit or a period (decimal point). I've got this comment: Numbers are one of these: integers: digit+ 0xhex_digit+ decimals:

Where best to put local modules?

2007-12-19 Thread tinnews
I'm just beginning to create some python modules for my own use and I'm wondering where to put them. Initially I have put them in $HOME/bin and I have set PYTHONPATH to point to them there. It all seems to be OK but I was wondering if I might be storing up problems for the future by putting pytho

Re: Preprocessing of input for the interactive interpreter?

2007-12-19 Thread Larry Bates
Stefan Salewski wrote: > Hello, > > I just start learning Python (ordered "Dive into Python" a week ago). > > In the past I have used the Python interactive interpreter for some > calculations instead of Linux command line tools like "bc" or "calc". > > I wonder if it is possible to do a pre-pro

Re: 3D plotting with python 2.5 on win32

2007-12-19 Thread markacy
On 19 Gru, 15:15, anton <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know if some of you knows a > > - working > > - actual > > - out of the box (for me: binaries available) > > Package/Lib to do 3D plotting out of the box. > > I know matplotlib. > > There is MayaVi from enthon but you

Re: No tab completion if sys.stdout is redirected

2007-12-19 Thread Dirk Loss
Bjoern Schliessmann wrote: > readline module applies its autocompletion functions to (and only > to) sys.stdout. I see. Then I guess I'll have to avoid redirecting sys.stdout and come up with some kind of workaround instead. Nevertheless, thanks for the info. Regards Dirk -- http://mail.python.o

Re: 3D plotting with python 2.5 on win32

2007-12-19 Thread Jason
On Dec 19, 7:15 am, anton <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know if some of you knows a > > - working > > - actual > > - out of the box (for me: binaries available) > > Package/Lib to do 3D plotting out of the box. > > I know matplotlib. > > There is MayaVi from enthon but yo

Re: New+old-style multiple inheritance

2007-12-19 Thread George Sakkis
On Dec 19, 12:01 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > They should have converted the > old-style to new when they decided to derive from both types (it's not > like that's terribly difficult). Unless perhaps the old-style class is part of an stdlib or 3rd party (or rather 4th party since

Re: Another newbie design question

2007-12-19 Thread Paul McGuire
On Dec 19, 10:48 am, [EMAIL PROTECTED] wrote: > This morning block comments disappeared from the Decaf design. Maybe > later today they'll be instantiated in the tokenizer. Out of the idlest of curiousity, does this language have a BNF, or some other form of grammar definition? -- Paul -- http:/

Re: Another newbie design question

2007-12-19 Thread Neil Cerutti
On 2007-12-19, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Dec 19, 10:48 am, [EMAIL PROTECTED] wrote: >> This morning block comments disappeared from the Decaf design. >> Maybe later today they'll be instantiated in the tokenizer. > > Out of the idlest of curiousity, does this language have a BNF,

Re: import X between submodules in a package

2007-12-19 Thread Donn Ingle
> You guess. When fisrt imported, the module's source is executed, a > module object is created and stored in sys.modules, and the needed names > are inserted into the importing module's namespace. Next times the > module is "served" directly from sys.modules. Peachy, thanks. \d -- http://mail.

Re: error with wxPython2.8-win32-unicode-2.8.7.1-py25.exe

2007-12-19 Thread kyosohma
On Dec 19, 5:26 am, Emmanuel <[EMAIL PROTECTED]> wrote: > I recently upgraded wxpython (and python) on XP using wxPython2.8- > win32-unicode-2.8.7.1-py25.exe > > Now when I run > > from wxPython.wx import * > > It crashes : > > -> import _wx > ... > > from _misc import * > > ... > > --> 456 wxDate

Re: Where best to put local modules?

2007-12-19 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I'm just beginning to create some python modules for my own use and > I'm wondering where to put them. Initially I have put them in > $HOME/bin and I have set PYTHONPATH to point to them there. It all > seems to be OK but I was wondering if I might be storing up prob

Re: import X between submodules in a package

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 07:02:00 -0300, Chris <[EMAIL PROTECTED]> escribió: > #fp.py > import cli > > #cli.py > import os > > #config.py > import cli > print cli.os.environ['HOME'] > > if you wish to use the os module loaded by the cli module En Wed, 19 Dec 2007 09:42:31 -0300, Donn Ingle <[EMAIL PRO

Re: operator module isSequenceType with builtin set produces False

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 06:28:03 -0300, MarkE <[EMAIL PROTECTED]> escribi�: >> Is there a short Pythonic way to determine whether an object is >> iterable (iteratable ??) that I haven't thought of (getattr(obj, >> '__iter__') ?). Would operator.isIterable() be at all a useful >> addition ? Yes, I t

Re: Static linking of python and pyqt

2007-12-19 Thread Martin v. Löwis
> I need an environment that can be delivered to our customers without > installing python, qt and pyqt. We want to provide the complete package. > In order to do so I need to link at least python and qt. How can this be done? You should link all extension modules into the Python executable, thro

Re: Where best to put local modules?

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 14:02:20 -0300, <[EMAIL PROTECTED]> escribi�: > I'm just beginning to create some python modules for my own use and > I'm wondering where to put them. Initially I have put them in > $HOME/bin and I have set PYTHONPATH to point to them there. It all > seems to be OK but I was

Re: How to in Python

2007-12-19 Thread Gabriel Genellina
En Wed, 19 Dec 2007 14:02:00 -0300, <[EMAIL PROTECTED]> escribi�: > I've got a pointer to a position in a line of code that contains > either a digit or a period (decimal point). I've got this comment: > > Numbers are one of these: > integers: > digi

help displaying pdf thru client/server

2007-12-19 Thread PaulS
Connecting to a Linux server from XP pc using a telnet program, I run a report and convert it to a pdf document(using Reportlab) which I need to display. The pdf is on the Linux server. Ideas how to display to the pc would be appreciated. thanks, paul -- http://mail.python.org/mailman/listi

Re: help displaying pdf thru client/server

2007-12-19 Thread Larry Bates
PaulS wrote: > Connecting to a Linux server from XP pc using a telnet program, I run a > report and convert it to a pdf document(using Reportlab) which I need to > display. The pdf is on the Linux server. Ideas how to display to the pc > would be appreciated. thanks, paul > > You will need w

Re: help displaying pdf thru client/server

2007-12-19 Thread kyosohma
On Dec 19, 1:41 pm, "PaulS" <[EMAIL PROTECTED]> wrote: > Connecting to a Linux server from XP pc using a telnet program, I run a > report and convert it to a pdf document(using Reportlab) which I need to > display. The pdf is on the Linux server. Ideas how to display to the pc > would be appreciat

Re: help displaying pdf thru client/server

2007-12-19 Thread Jean-Paul Calderone
On Wed, 19 Dec 2007 13:50:10 -0600, Larry Bates <[EMAIL PROTECTED]> wrote: >PaulS wrote: >> Connecting to a Linux server from XP pc using a telnet program, I run a >> report and convert it to a pdf document(using Reportlab) which I need to >> display. The pdf is on the Linux server. Ideas how to d

Re: Does fileinput.input() read STDIN all at once?

2007-12-19 Thread Adam Funk
On 2007-12-18, Jonathan Gardner wrote: >> As a test, I tried this: >> >>for line in fileinput.input(): >> print '**', line >> >> and found that it would print nothing until I hit Ctl-D, then print >> all the lines, then wait for another Ctl-D, and so on (until I pressed >> Ctl-D twice in

Re: Another newbie design question

2007-12-19 Thread John Machin
On Dec 20, 5:00 am, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Dec 19, 10:48 am, [EMAIL PROTECTED] wrote: > > > This morning block comments disappeared from the Decaf design. Maybe > > later today they'll be instantiated in the tokenizer. > > Out of the idlest of curiousity, does this language ha

Re: Changing intobject to use int rather than long

2007-12-19 Thread Terry Reedy
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Terry Reedy wrote: | > Good idea. I think people who moved to 64 bits to get 64 bits would be | > upset if they did not ;-). | | Windows X64 users still get 32bit ints. The long datatype is 32bit even | on the 64bit

dbus bindings under Windows

2007-12-19 Thread Yann Leboulanger
Are there any python dbus bindings under windows ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to in Python

2007-12-19 Thread John Machin
On Dec 20, 4:02 am, [EMAIL PROTECTED] wrote: > I've got a pointer to a position in a line of code that contains > either a digit or a period (decimal point). I've got this comment: > > Numbers are one of these: > integers: > digit+ >

Re: operator module isSequenceType with builtin set produces False

2007-12-19 Thread Terry Reedy
"MarkE" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] || > Is there a short Pythonic way to determine whether an object is | > iterable (iteratable ??) Welcome to Python and its neat concept of iterables and iterators. An iterable is an object that has an __iter__ method that retur

integer subclass range behavior

2007-12-19 Thread [EMAIL PROTECTED]
I was wondering what would happen, so I tried this out for the heck of it with: Python 3.0a2 (py3k:59572M, Dec 19 2007, 15:54:07) [MSC v.1500 32 bit (Intel)] on win32 class a(int): def __new__(cls,number): return int.__new__(cls,number) for x in range(0,a(5)): print(x) Which resulted in

Is there a simple way to parse this string ?

2007-12-19 Thread Stef Mientki
hello, I need to translate the following string a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' into the following list or tuple b = [(0, 0, 0, 255), (192, 192, 192, 255), True, 8 ] Is there a simple way to to this. (Not needed now, but might need it in the future: even deeper nested

In an inherited class, "embedded" classes is referenced?

2007-12-19 Thread Christian Joergensen
Hello I stumpled upon this "feature" during my work tonight, and found it a bit confusing: >>> class A(object): ... class C: ... foobar = 42 ... >>> class B(A): pass ... >>> A.C >>> B.C >>> B.C.foobar = 60 >>> A.C.foobar 60 Whe

class memebers

2007-12-19 Thread N L
How do I list the members of a class? Meaning, how do I know what are the functions a particular class has, if i do not want to manually browse through the class? N Never miss a thing. Make Yahoo your

RE: Is there a simple way to parse this string ?

2007-12-19 Thread James Newton
>I need to translate the following string >a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8' > >into the following list or tuple >b = [(0, 0, 0, 255), (192, 192, 192, 255), True, 8 ] >Is there a simple way to to this. >Stef Mientki >>> a = '(0, 0, 0, 255), (192, 192, 192, 255), True, 8

  1   2   >