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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
> > 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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'
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(
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
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
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
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):
>
I think that's because:
>>> [] is []
False
>>> () is ()
True
--
Sia
--
http://mail.python.org/mailman/listinfo/python-list
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
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):
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
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),
> ...
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
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)
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
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
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
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.
>
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
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_
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
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):
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
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):
>
> 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
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'
>>
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,*
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
>
> 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
> 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
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
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
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.
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
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
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):
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
["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?
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
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
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.
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
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:
>
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
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
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
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
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
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
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'
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
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
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 - 100 of 176 matches
Mail list logo