Re: Windows Debugging w/o MS

2007-05-23 Thread Thomas Lenarz
On Tue, 22 May 2007 18:49:04 -0700, "Christopher Anderson" <[EMAIL PROTECTED]> wrote: >problem is, when I attempt to use it, I get a segfault. Now, I'm >pretty sure this segfault is just a bug in my C++ code. So of course, >I would like to debug this thing somehow. I tried using the mingw gdb >giv

how to use imaageop.scale

2007-05-23 Thread Bruce
Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band (24bit per pixel), 100 * 100 size to 50 * 50 size. I tried to use scale function in imageop module but failed. Any suggestions about this? Thanks! Bruce -- http://mail.python.org/mailman/listinfo/python-list

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-23 Thread Steven Bethard
kaens wrote: > Now the code looks like this: > [snip ElementTree code] > > freaking easy. Compare with making a generic xml parser class, and > inheriting from it for doing different things with different xml > files. This does exactly the right thing. I'm sure it's not perfect > for all cases, and

Re: Can I reference 1 instance of an object by more names ?

2007-05-23 Thread Bruno Desthuilliers
Stef Mientki a écrit : > hello, > > I'm trying to build a simple functional simulator for JAL (a Pascal-like > language for PICs). > My first action is to translate the JAL code into Python code. > The reason for this approach is that it simplifies the simulator very much. > In this translation I

Re: Unable to strip \n characters

2007-05-23 Thread Asun Friere
On May 22, 6:37 am, aiwarrior <[EMAIL PROTECTED]> wrote: > On May 21, 7:05 am, Asun Friere <[EMAIL PROTECTED]> wrote: > > > On May 20, 10:49 pm, Michael Bentley <[EMAIL PROTECTED]> > > wrote: > > > > On May 20, 2007, at 7:41 AM, Michael Bentley wrote: > > > > > (upload.strip()) > > > > Oops: (uploa

CGIHTTPServer and XML

2007-05-23 Thread Abdurrahman Kurucak
I am trying to write an CGI script that writes in an XML file. I am fairly new at all programming, cgi and python. I am using CGIHTTPServer that is bundled in python. When I try to open the created xml file directly from the directory, there is no problem. But when i try to open it within the serve

Module listing in order.

2007-05-23 Thread Ramashish Baranwal
Hi, I want to get a module's contents (classes, functions and variables) in the order in which they are declared. Using dir(module) therefore doesn't work for me as it returns a list in alphabetical order. As an example- # mymodule.py class B: pass class A: pass class D: pass # test.py import my

Volume 2, Issue 2 of The Python Papers is now available! Download it from www.pythonpapers.org.

2007-05-23 Thread [EMAIL PROTECTED]
Volume 2, Issue 2 of The Python Papers is now available! Download it from www.pythonpapers.org. This issue marks a major landmark in our publication. We present a number of industry articles. These include "Python in Education" and "MPD WebAMP", as well as a great insight into Python in Germany, a

RE: Restart Linux System

2007-05-23 Thread Sander Steffann
Hi, > > Probably not. You need to just spawn the "reboot" command, or run > > "init 6." This requires root, though. Without root there's no way > > to reboot a linux system. > > ...unless you run shutdown(8) or reboot(8) setuid root (reboot is > kinda harsh though, btw). It's not that bad. Re

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread Tim Golden
Robert Rawlins - Think Blue wrote: > I've got an application that runs on an embedded system, the application > uses a whole bunch or dicts and other data types to store state and other > important information. > I'm looking to build a small network of these embedded systems, and I'd love > to hav

Re: how to use imaageop.scale

2007-05-23 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Bruce wrote: > Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band > (24bit per pixel), 100 * 100 size to 50 * 50 size. I > tried to use scale function in imageop module but failed. Any > suggestions about this? Thanks! I guess you are talking about the P

Writing a Web Service in Python for MS Office Research Task Pane

2007-05-23 Thread Mickel Grönroos
Hi fellow pythoneers, I'm thinking about writing a simple web service for use in the "Research Task Pane" in Microsoft Office. There is a lot of C# and VB code samples out there and tutorials on how to do this in Visual Studio on Windows; however, I am interested in writing the web service in Pyth

Re: httpd: Syntax error on line 54

2007-05-23 Thread Johny
On May 22, 8:57 am, deepak <[EMAIL PROTECTED]> wrote: > I installed apache 2.2.4 and modPython 3.3.1 on Fc6 > while starting the apache server the following error occurs: > > httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: > Cannot load /usr/local/apache2/modules/mod_python.s

Re: Module listing in order.

2007-05-23 Thread Gabriel Genellina
En Wed, 23 May 2007 04:32:42 -0300, Ramashish Baranwal <[EMAIL PROTECTED]> escribió: > I want to get a module's contents (classes, functions and variables) > in the order in which they are declared. Using dir(module) therefore > doesn't work for me as it returns a list in alphabetical order. As

Re: Python on Vista installation issues

2007-05-23 Thread Mattia Gentilini
will ha scritto: > Vista is a 64 bit OS and there is no port of pywin32 for either Vista > or 64-bit XP Vista exists in BOTH 32 bit and 64 bit versions. -- |\/|55: Mattia Gentilini e 55 curve di seguito con gli sci |/_| ETICS project at CNAF, INFN, Bologna, Italy |\/| www.getfirefox.com www.gett

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread Gabriel Genellina
En Wed, 23 May 2007 05:04:10 -0300, Tim Golden <[EMAIL PROTECTED]> escribió: > I noticed that the post hadn't appeared on Google > Groups, at least. I read things via the mailing list; > is it possible your post hasn't made it across to > Usenet either? I read this thru the gmane news interfase

Re: model browser

2007-05-23 Thread Daniel Nogradi
> > Are there other options I overlooked? > > > > Daniel > > There is a CRUD template for TG: > http://docs.turbogears.org/1.0/CRUDTemplate > > Might be what you're looking for. I was looking for something that is not based on a framework such as django or tg (and not on sqlalchemy either, but on

SOAPpy - send xml data

2007-05-23 Thread marcello lussana
Hi, I'm trying to send some xml data to a WSDL server. Here's my code: xmldata = "Test di messaggio 1 + 3202181465 17.5.2007 12:59:53 """ SOAPpy.WSDL.Config.namespaceStyle = '2001' server = SOAPpy.WSDL.Proxy('https://www.oesystem.net/services/oeservice.asmx?WSDL') print server.insertMes

SOAPpy - send xml data

2007-05-23 Thread marcello . lussana
Hi, I'm trying to send some xml data to a WSDL server. Here's my code: xmldata = "Test di messaggio 1 + 2 17.5.2007 12:59:53 """ SOAPpy.WSDL.Config.namespaceStyle = '2001' server = SOAPpy.WSDL.Proxy('https://www.mywdslserver.com/foo.asp?WSDL') print server.insertMessages(xmlRequ

Re: OSError[Error 5]

2007-05-23 Thread SamG
On May 23, 1:39 am, Miki <[EMAIL PROTECTED]> wrote: > Hello SamG, > > > I do this on PowerPC.. > > > >>> import os > > >>> os.listdir('/usr/bin') > > > And endup getting this ... > > > OSError: [Error 5] Input/output error:/usr/bin > > What happens when you run "ls /usr/bin" in the terminal? > > HT

Re: how to use imaageop.scale

2007-05-23 Thread Amit Khemka
On 23 May 2007 00:02:34 -0700, Bruce <[EMAIL PROTECTED]> wrote: > Hi, I want to compress a jpg file. e.g. a jpg file which has RGB band > (24bit per pixel), 100 * 100 size to 50 * 50 size. I > tried to use scale function in imageop module but failed. Any > suggestions about this? Thanks! Were ther

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread D.Hering
On May 23, 4:04 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Robert Rawlins - Think Blue wrote: > > > I've got an application that runs on an embedded system, the application > > uses a whole bunch or dicts and other data types to store state and other > > important information. > > I'm looking to b

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread D.Hering
On May 23, 4:04 am, Tim Golden <[EMAIL PROTECTED]> wrote: > Robert Rawlins - Think Blue wrote: > > > I've got an application that runs on an embedded system, the application > > uses a whole bunch or dicts and other data types to store state and other > > important information. > > I'm looking to b

Re: Module listing in order.

2007-05-23 Thread Diez B. Roggisch
Ramashish Baranwal wrote: > Hi, > > I want to get a module's contents (classes, functions and variables) > in the order in which they are declared. Using dir(module) therefore > doesn't work for me as it returns a list in alphabetical order. As an > example- > > # mymodule.py > class B: pass > c

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread Paul Boddie
On 23 May, 11:48, "D.Hering" <[EMAIL PROTECTED]> wrote: > > Possibly, IPython's new interactive parallel environment is what you > are looking for:http://ipython.scipy.org/moin/Parallel_Computing See this and related projects on the python.org Wiki: http://wiki.python.org/moin/ParallelProcessing

Re: Shared Memory Space - Accross Apps & Network

2007-05-23 Thread Paul Boddie
On 23 May, 11:48, "D.Hering" <[EMAIL PROTECTED]> wrote: > > Possibly, IPython's new interactive parallel environment is what you > are looking for:http://ipython.scipy.org/moin/Parallel_Computing See this and related projects on the python.org Wiki: http://wiki.python.org/moin/ParallelProcessing

Re: trying to gzip uncompress a StringIO

2007-05-23 Thread Graeme Glass
On May 23, 2:37 am, [EMAIL PROTECTED] wrote: > Perfect, thanks! Now I have a working WMF file and everything. > > Bob Now you just got to get your reply button working :-D -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing dots in sequence ('...')

2007-05-23 Thread beertje
On May 23, 3:36 am, rzed <[EMAIL PROTECTED]> wrote: > "Tim Williams" <[EMAIL PROTECTED]> wrote innews:[EMAIL PROTECTED]: > > [...] > > > maybe this: (on Win32, don't know about *nix) > > > for x in range(10): > > print '.\b', > > better: > print '\b.', > > -- > rzed print '.\b' gives a

stdlib doc for logger.findCaller() needs update.

2007-05-23 Thread jitudon
The logger objects findCaller() method is returning a "3" element tuple instead of "2" two as documented in the 2.4.4 Python Library Reference .DocString is showing it correctly. findCaller() Finds the caller's source filename and line number. Returns the filename and line number as a 2-eleme

Python 404 Problem

2007-05-23 Thread lumo2000
hello NG. i have to install a little python application and my problem is, that python does not find the proper include files, although they are, where the script searches for... any ideas how to solve this? i am out of ideas... python returns the following error message: --> --> --> IOError

Basic Class/Instance Question

2007-05-23 Thread Siah
Ready to go insane here. Class A, taking on a default value for a variable. Instantiating two separate objects of A() gives me a shared val list object. Just see the example bellow: class A(object): def __init__(self, val=[]): self.val=val obj1 = A() obj2 = A() print obj1 is obj2

Re: Can I reference 1 instance of an object by more names ? rephrase

2007-05-23 Thread stef
thanks Guys for your information, indeed you're all quit right, but I think I've not correctly described my problem :-( I need to have 2 (or more) names, that references the same instance of an object, and in assigning a value to the object (or to some property in the object), I need to do extra

Re: Basic Class/Instance Question

2007-05-23 Thread Alan Franzoni
Il 23 May 2007 04:07:19 -0700, Siah ha scritto: > Ready to go insane here. Class A, taking on a default value for a __init__ is a function, taking a default value of [], which is a list, which is a mutable object. That said, you should remember that this means that such default value is 'shared'

Re: Basic Class/Instance Question

2007-05-23 Thread Bruno Desthuilliers
Siah a écrit : > Ready to go insane here. Class A, taking on a default value for a > variable. Instantiating two separate objects of A() gives me a shared > val list object. Just see the example bellow: > > > class A(object): > def __init__(self, val=[]): > self.val=val > > obj1 = A(

Re: Basic Class/Instance Question

2007-05-23 Thread Mike
Thanks Alan, I am still perplexed why the default value of this object is shared. hemm...d Back to programming, :) Sia On May 23, 7:19 am, Alan Franzoni <[EMAIL PROTECTED]> wrote: > Il 23 May 2007 04:07:19 -0700, Siah ha scritto: > > > Ready to go insane here. Class A, taking on a default value

Re: xml.parsers.expat loading xml into a dict and whitespace

2007-05-23 Thread Stefan Behnel
kaens wrote: > Now the code looks like this: > > import xml.etree.ElementTree as etree > > optionsXML = etree.parse("options.xml") > options = {} > > for child in optionsXML.getiterator(): >if child.tag != optionsXML.getroot().tag: >options[child.tag] = child.text > > for key, value

Re: Can I reference 1 instance of an object by more names ? rephrase

2007-05-23 Thread Bruno Desthuilliers
stef a écrit : > thanks Guys for your information, > > indeed you're all quit right, > but I think I've not correctly described my problem :-( > > I need to have 2 (or more) names, that references the same instance of > an object, > and in assigning a value to the object (or to some property in

Re: Basic Class/Instance Question

2007-05-23 Thread Antoon Pardon
On 2007-05-23, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Siah a écrit : >> Ready to go insane here. Class A, taking on a default value for a >> variable. Instantiating two separate objects of A() gives me a shared >> val list object. Just see the example bellow: >> >> >> class A(object): >

Re: Basic Class/Instance Question

2007-05-23 Thread Siah
I think that's because: >>> [] is [] False >>> () is () True -- Sia -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I reference 1 instance of an object by more names ? rephrase

2007-05-23 Thread stef
Bruno Desthuilliers wrote: > stef a écrit : >> thanks Guys for your information, >> >> indeed you're all quit right, >> but I think I've not correctly described my problem :-( >> >> I need to have 2 (or more) names, that references the same instance >> of an object, >> and in assigning a value to

Re: Can I reference 1 instance of an object by more names ? rephrase

2007-05-23 Thread Carsten Haese
On Wed, 2007-05-23 at 12:55 +0200, stef wrote: > Is there another way, without using the dummy index, to achieve the same > results ? > > thanks, > Stef Mientki > > > class cpu_ports(object): > def __init__(self, value=0): > self._d = value > def __setitem__(self, index, value):

Re: Basic Class/Instance Question

2007-05-23 Thread Diez B. Roggisch
Siah wrote: > I think that's because: No idea what is because of what. Please quote essential parts of the posting you refer to. [] is [] > False () is () > True This is an implementation artifact. The interpreter chose to create only one instance for the empty tuple for optimization

Re: converting text and spans to an ElementTree

2007-05-23 Thread Neil Cerutti
On 2007-05-22, Steven Bethard <[EMAIL PROTECTED]> wrote: > Thanks a lot! This put me on the right track (though the > devil's definitely in the details). It's working now:: > > > >>> tree = xmltools.text_and_spans_to_etree('aaa aaa aaaccc cccaaa', [ > ... (etree.Element('a'), 0, 21), > ...

Re: Lists vs tuples (newbie)

2007-05-23 Thread Neil Cerutti
On 2007-05-22, Duncan Booth <[EMAIL PROTECTED]> wrote: > "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > >> Aside from the hashing issue, there is nothing that a tuple can do >> that can't be done as well or better by a list. > > There are a few other cases where you have to use a tuple, for > ex

Re: Properties/Decorators [WAS: Can I reference 1 instance of an object by more names ? rephrase]

2007-05-23 Thread Wildemar Wildenburger
Bruno Desthuilliers wrote: > here's an example using a property: > > class cpu_ports(object): > def __init__(self, value=0): > self._d = value > @apply > def value(): > def fset(self, value): > print 'vv' > self._d = value > def fget(self)

Re: Basic Class/Instance Question

2007-05-23 Thread Wildemar Wildenburger
Antoon Pardon wrote: >> This is a FAQ. Default arguments are only evaled once - when the def >> statement is evaled (which is usually at import time). The solution is >> simple: don't use mutable objects as default arguments: >> > > An immutable object would have given the same behaviour in

Re: Module listing in order.

2007-05-23 Thread Wildemar Wildenburger
Ramashish Baranwal wrote: > I want a way to get the contents in the order of their declaration, > i.e. [B, A, D]. Does anyone know a way to get it? > My suggestion would be to actually parse the text of the module. "Brute force" is what it's called ;). But doing so with, say, pyparsing shouldn

Re: Basic Class/Instance Question

2007-05-23 Thread Siah
Bruno, I got my lesson today, first get your morning coffee before posting and of course avoid mutable objects as default arguments. Silly post, perhaps. Good to hear universe is in place. I should have rtffaq, though that's not why she left... Sia -- http://mail.python.org/mailman/listinfo/pyt

Re: Create an XML document

2007-05-23 Thread kyosohma
On May 22, 7:30 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > I am attempting to create an XML document dynamically with Python. It > > needs the following format: > > > > > > >1179775800 > >1800 > > > > > > Try lxml.objectify. >

Re: Cherrypy setup questions

2007-05-23 Thread Brian Blais
fumanchu wrote: > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote: >> I'd like to start trying out some cherrypy apps, but I've >> been having some setup problems. I think I need some >> bone-head simple example to clear my understanding. :) >> 1) can I configure cherrypy to look a

Re: Can I reference 1 instance of an object by more names ?

2007-05-23 Thread Eric Yaeger
Perhaps Stef Mientki, you might be interested in copy.copy( ) and copy.deepcopy( ) ! Please see the info I have put below. On May 23, 12:44 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > One of the problems is the alias statement, assigning a second name to an > object. > I've defined a class IO_

Re: Python on Vista installation issues

2007-05-23 Thread Chris Gonnerman
Mattia Gentilini wrote: will ha scritto: Vista is a 64 bit OS and there is no port of pywin32 for either Vista or 64-bit XP Vista exists in BOTH 32 bit and 64 bit versions. Indeed, and this is running on a Core 2 Duo laptop, a 32 bit platform. The problem is obvious (or seems to be

Decorator question

2007-05-23 Thread Steven W. Orr
I just discovered decorators. Very cool. My question is that I can't figure out how to make a decorator not be restricted to a function so it would also work on a method. Here's my code: def g(expr): def rpt(func): def wrapper(t): for ii in range(expr):

Re: Decorator question

2007-05-23 Thread Peter Otten
Steven W. Orr wrote: > I just discovered decorators. Very cool. My question is that I can't > figure out how to make a decorator not be restricted to a function so it > would also work on a method. > > Here's my code: > @g(20) > def f(s): > print 's="%s"'%s > f('Hello') Here you are callin

Re: Decorator question

2007-05-23 Thread Giles Brown
On 23 May, 14:46, "Steven W. Orr" <[EMAIL PROTECTED]> wrote: > I just discovered decorators. Very cool. My question is that I can't > figure out how to make a decorator not be restricted to a function so it > would also work on a method. > > Here's my code: > > def g(expr): > def rpt(func): >

Re: Slightly OT: Why all the spam?

2007-05-23 Thread Joel Hedlund
> Thus you may want to consider reading c.l.p via nntp when at work. I'm doing that using Thunderbird 1.5.0, and I still get the spam. Googling for a bit shows me that people have been having issues with Thunderbird not removing expired articles all the way since 2003. Does anyone have a sugges

Re: Properties/Decorators [WAS: Can I reference 1 instance of an object by more names ? rephrase]

2007-05-23 Thread Diez B. Roggisch
Wildemar Wildenburger wrote: > Bruno Desthuilliers wrote: >> here's an example using a property: >> >> class cpu_ports(object): >> def __init__(self, value=0): >> self._d = value >> @apply >> def value(): >> def fset(self, value): >> print 'vv' >>

Re: Decorator question

2007-05-23 Thread Michele Simionato
If you are using Python 2.5, you can use functools.update_wrapper to simplify your life. For instance from functools import update_wrapper # requires Python 2.5 def trace(func): def wrapper(*args,**kw): print 'calling %s with args %s' % (func.__name__,args) return func(*args,*

Re: Slightly OT: Why all the spam?

2007-05-23 Thread Grant Edwards
On 2007-05-23, Joel Hedlund <[EMAIL PROTECTED]> wrote: >> Thus you may want to consider reading c.l.p via nntp when at work. > > I'm doing that using Thunderbird 1.5.0, and I still get the > spam. Googling for a bit shows me that people have been > having issues with Thunderbird not removing expir

Re: Windows Debugging w/o MS

2007-05-23 Thread olsongt
> > I've tried compiling python from source, and my extension module, > using MSVC8 (free express version), and I managed to get this to work. > The thing is, I don't want to have to recompile every single python > package I need (wxPython, SciPy, etc). > Debug builds are incompatible with releas

Re: Slightly OT: Why all the spam?

2007-05-23 Thread Joel Hedlund
> Expired articles are removed on the server by the server. > ... > maybe Thunderbird is doing something weird (caching headers?). I can see the spam headers and also read the actual articles, and there are lots of them for the last 5 days. Nothing much before that, though. /Joel -- http://m

Re: Cherrypy setup questions

2007-05-23 Thread fumanchu
On May 23, 6:11 am, Brian Blais <[EMAIL PROTECTED]> wrote: > fumanchu wrote: > > > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote: > >> I'd like to start trying out some cherrypy apps, but I've > >> been having some setup problems. I think I need some > >> bone-head simple example t

Re: Cherrypy setup questions

2007-05-23 Thread fumanchu
On May 23, 6:11 am, Brian Blais <[EMAIL PROTECTED]> wrote: > fumanchu wrote: > > > On May 22, 6:38 pm, Brian Blais <[EMAIL PROTECTED]> wrote: > >> I'd like to start trying out some cherrypy apps, but I've > >> been having some setup problems. I think I need some > >> bone-head simple example t

Re: Cherrypy setup questions

2007-05-23 Thread Brian Blais
fumanchu wrote: > > No, you're not missing anything; my fault. I wasn't very awake when I > wrote that, I guess. Don't include the hostname, just write: > > sn = '/~myusername/apps' > cherrypy.quickstart(Root(), sn, config) > yay! Thanks, that works perfectly.

Re: dabo framework dependancies

2007-05-23 Thread Uwe Grauer
daniel gadenne wrote: > Paul McNett wrote: >> Shameless plug: consider using Dabo on top of wxPython - we feel it >> makes wxPython even easier and more pythonic, but admittedly there's a >> bit of a learning curve there too. Even though Dabo is a full >> application framework originally meant for

Re: Slightly OT: Why all the spam?

2007-05-23 Thread Grant Edwards
On 2007-05-23, Joel Hedlund <[EMAIL PROTECTED]> wrote: > > Expired articles are removed on the server by the server. > > ... > > maybe Thunderbird is doing something weird (caching headers?). > > I can see the spam headers and also read the actual articles, Then they aren't expired. If they were

Re: Properties/Decorators [WAS: Can I reference 1 instance of an object by more names ? rephrase]

2007-05-23 Thread Brian van den Broek
Wildemar Wildenburger said unto the world upon 05/23/2007 08:43 AM: > Bruno Desthuilliers wrote: >> here's an example using a property: >> >> class cpu_ports(object): >> def __init__(self, value=0): >> self._d = value >> @apply >> def value(): >> def fset(self, value): >

Re: Resizing listbook's listview pane

2007-05-23 Thread kyosohma
On May 22, 1:49 pm, mkPyVS <[EMAIL PROTECTED]> wrote: > I'm having an issue I need help with. I want to resize the listview > control in a listbook but have been unsuccessfull through setting the > columnWidth of the 0'th column and trying to retrieve the listbooks > sizer return's None Ideas?

The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-23 Thread Xah Lee
The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations Xah Lee, 2006-03-15 [This articles explains away the confusion of common terms for notation systems used in computer languages: prefix, infix, postfix, algebraic, functional. These notation's relation to the conc

Re: Basic Class/Instance Question

2007-05-23 Thread Alan Franzoni
Il 23 May 2007 04:53:55 -0700, Siah ha scritto: [cut] No. It's because the *body* of the function gets evaluated every time the function is called, while the *definition* of the function gets evaluated just once, when the function is 'declared'. Your issue arises when the default value of the f

Re: dabo framework dependancies

2007-05-23 Thread Peter Decker
On 5/22/07, daniel gadenne <[EMAIL PROTECTED]> wrote: > I'm considering moving over to dabo for wxpython development. > However I do not write traditional database applications > à la foxpro (I'm a 20 years user of fox...) anymore. > Only xml-fed applications. > > I'm a bit hesitant to jump onboar

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
Sorry, copied from wxpython submit as well.. I'm using wxpython 2.8... Primariy I want the resize to happen programatically during object creation/post creation... I can worry about app size changes later. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
On May 23, 9:04 am, [EMAIL PROTECTED] wrote: > Which Python gui toolkit are you using? Tkinter, wxPython, pyQT? Are > you wanting the resize to happen programmatically, when the user > changes the app's size, both or what? > > More details would be helpful. > > Mike Sorry, copied from wxpython sub

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
On May 23, 9:04 am, [EMAIL PROTECTED] wrote: > Which Python gui toolkit are you using? Tkinter, wxPython, pyQT? Are > you wanting the resize to happen programmatically, when the user > changes the app's size, both or what? > > More details would be helpful. > > Mike Sorry, copied from wxpython sub

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
On May 23, 9:04 am, [EMAIL PROTECTED] wrote: > Which Python gui toolkit are you using? Tkinter, wxPython, pyQT? Are > you wanting the resize to happen programmatically, when the user > changes the app's size, both or what? > > More details would be helpful. > > Mike Sorry, copied from wxpython sub

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-05-23 Thread Larry Clapp
["Followup-To:" header set to comp.lang.lisp.] On 2007-05-23, Xah Lee <[EMAIL PROTECTED]> wrote: > The Concepts and Confusions of Prefix, Infix, Postfix and Fully > Functional Notations > > Xah Lee, 2006-03-15 Xah, why do you post year-old essays to newsgroups that couldn't care less about them?

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
On May 23, 9:04 am, [EMAIL PROTECTED] wrote: > Which Python gui toolkit are you using? Tkinter, wxPython, pyQT? Are > you wanting the resize to happen programmatically, when the user > changes the app's size, both or what? > > More details would be helpful. > > Mike Sorry, copied from wxpython sub

Re: Resizing listbook's listview pane

2007-05-23 Thread mkPyVS
On May 23, 9:04 am, [EMAIL PROTECTED] wrote: > Which Python gui toolkit are you using? Tkinter, wxPython, pyQT? Are > you wanting the resize to happen programmatically, when the user > changes the app's size, both or what? > > More details would be helpful. > > Mike Sorry, copied from wxpython sub

Inheriting from Python list object(type?)

2007-05-23 Thread Mangabasi
Howdy, I would like to create a Point class that lets me use Point instances like the following example. >>> p = Point(3, 4) >>> p.x 3 >>> p.y 4 >>> p.z 1 >>> p[0] 3 >>> p[1] 4 >>> p[1] = 5 >>> p.y 5 >>> other than the x, y, z attributes, these instances should behave like regular Python lists.

CP4E revival

2007-05-23 Thread Michael Tobis
Is education Python's killer app? I think it could be. I used the occasion of the Python Papers to motivate my efforts, and you can see what I came up with here on pages 8-15. The part that makes me especially queasy is the CP4E section on pages 10-11. I wish I had more to say there. It's fairly

Re: Properties/Decorators [WAS: Can I reference 1 instance of an object by more names ? rephrase]

2007-05-23 Thread Peter Otten
Brian van den Broek wrote: > I had the same sort of question as Wildemar and I set about > investigating as any good pythonista would by typing help(apply) at > the interactive prompt. That produced a help text that started: > > Help on built-in function apply in module __builtin__: > > But: >

Re: Properties/Decorators [WAS: Can I reference 1 instance of an object by more names ? rephrase]

2007-05-23 Thread Brian van den Broek
Peter Otten said unto the world upon 05/23/2007 01:32 PM: > Brian van den Broek wrote: >> Help on built-in function apply in module __builtin__: >> >> But: >> >> >>> [x for x in dir('__builtin__') if 'apply' in x] >> [] >> >> ? If apply is in the __builtin__ module, why doesn't >> dir('__built

Re: Inheriting from Python list object(type?)

2007-05-23 Thread Jerry Hill
On 23 May 2007 09:58:36 -0700, Mangabasi <[EMAIL PROTECTED]> wrote: > There must be a way to inherit from the list type without having to > redefine all the methods and attributes that regular lists have. Like this: class Point(list): def __init__(self, x, y, z = 1): list.__init__(sel

f.readline(), for line in f

2007-05-23 Thread 7stud
Hi, 1) Does this make any sense: """ Thus, the loop: for line in f: iterates on each line of the file. Due to buffering issues, interrupting such a loop prematurely(e.g. with break), or calling f.next() instead of f.readline(), leaves the files position set to an arbitrary value. """ The

Re: Inheriting from Python list object(type?)

2007-05-23 Thread km
Hi, u have the answer in ur question itself :) u dont need to redefine list methods again - just inherit from the builtin-list-type. try this with new style classes: code ### class Point(list): def __init__(self,x,y): super(Point, self).__init__() self.x = x self.y

Parallel/distributed generator

2007-05-23 Thread George Sakkis
I'm looking for any existing packages or ideas on how to implement the equivalent of a generator (in the Python sense, i.e. http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed way. As a use case, imagine a function that generates a range of primes. I'd like to be able to do somethin

Re: dabo framework dependancies

2007-05-23 Thread Paul McNett
Peter Decker wrote: > On 5/22/07, daniel gadenne <[EMAIL PROTECTED]> wrote: > >> I'm considering moving over to dabo for wxpython development. >> However I do not write traditional database applications >> à la foxpro (I'm a 20 years user of fox...) anymore. >> Only xml-fed applications. >> >> I'm

Re: Parallel/distributed generator

2007-05-23 Thread Diez B. Roggisch
George Sakkis wrote: > I'm looking for any existing packages or ideas on how to implement the > equivalent of a generator (in the Python sense, i.e. > http://www.python.org/dev/peps/pep-0255/) in a parallel/distributed > way. As a use case, imagine a function that generates a range of > primes. I'

Re: Inheriting from Python list object(type?)

2007-05-23 Thread Mangabasi
On May 23, 12:47 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On 23 May 2007 09:58:36 -0700, Mangabasi <[EMAIL PROTECTED]> wrote: > > > There must be a way to inherit from the list type without having to > > redefine all the methods and attributes that regular lists have. > > Like this: > > class

Re: Inheriting from Python list object(type?)

2007-05-23 Thread Mangabasi
On May 23, 12:47 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On 23 May 2007 09:58:36 -0700, Mangabasi <[EMAIL PROTECTED]> wrote: > > > There must be a way to inherit from the list type without having to > > redefine all the methods and attributes that regular lists have. > > Like this: > > class

Re: Inheriting from Python list object(type?)

2007-05-23 Thread Mangabasi
On May 23, 12:47 pm, "Jerry Hill" <[EMAIL PROTECTED]> wrote: > On 23 May 2007 09:58:36 -0700, Mangabasi <[EMAIL PROTECTED]> wrote: > > > There must be a way to inherit from the list type without having to > > redefine all the methods and attributes that regular lists have. > > Like this: > > class

  1   2   >