Steven D'Aprano wrote:
On Sat, 16 May 2009 09:55:39 -0700, Emanuele D'Arrigo wrote:
Hi everybody,
let's assume I have a module with loads of classes inheriting from one
class, from the same module, i.e.:
[...]
Now, let's also assume that myFile.py cannot be changed or it's
impractical to do
Announcing
--
The 2.8.10.1 release of wxPython is now available for download at
http://wxpython.org/download.php. This release fixes the problem with
using Python 2.6's default manifest, and updates wxcairo to work with
the latest PyCairo. A summary of changes is listed below and also
Carl Banks writes:
> I don't think this is anything more than a trivial consideration,
Okay, thank you.
Anyone else?
--
\ “All television is educational television. The question is: |
`\ what is it teaching?” —Nicholas Johnson |
_o__)
En Sat, 16 May 2009 04:04:03 -0300, Igor Katson
escribió:
Gabriel Genellina wrote:
En Fri, 15 May 2009 09:04:05 -0300, Igor Katson escribió:
Lawrence D'Oliveiro wrote:
In message , Igor
Katson wrote:
Lawrence D'Oliveiro wrote:
In message ,
Igor Katson wrote:
I have problems in getting
On May 16, 8:20 pm, Ben Finney wrote:
> Carl Banks writes:
> > There's already precedent for what to do in the Python library.
>
> > Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26)
> > [GCC 4.3.2] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> f = op
On Mon, 11 May 2009, k...@fiber-space.de wrote:
> On 12 Mai, 02:10, Tomasz Rola wrote:
> > On Mon, 11 May 2009, rump...@web.de wrote:
> > > > One question I ask myself upon seeing a new language is if it is
> > > > possible
> > > > to program amb (amb=ambiguous) operator in it. This page gives a
Carl Banks writes:
> There's already precedent for what to do in the Python library.
>
> Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26)
> [GCC 4.3.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> f = open('somefile')
> >>> f.close()
> >>> f.close()
>
On May 16, 5:50 pm, Ben Finney wrote:
> Ideas? How should this be addressed both Pythonically and respecting the
> intent of PEP 3143?
There's already precedent for what to do in the Python library.
Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26)
[GCC 4.3.2] on linux2
Type "help", "copyright",
On 2009-05-17, Thomas Vogel wrote:
> I'm currently have the problem that I try to read UDP messages from
> multiple sockets in parallel. So let's say I get UDP packets from the
> same IP on the ports 2000, 2001, 2002,...
Is there any reason you can't do it the easy way by using
select?
http:/
Hi all,
I'm currently have the problem that I try to read UDP messages from
multiple sockets in parallel. So let's say I get UDP packets from the
same IP on the ports 2000, 2001, 2002,...
Therefore I created the following class.
But if I try to instantiate it several times with different port
On Sat, 16 May 2009 09:55:39 -0700, Emanuele D'Arrigo wrote:
> Hi everybody,
>
> let's assume I have a module with loads of classes inheriting from one
> class, from the same module, i.e.:
[...]
> Now, let's also assume that myFile.py cannot be changed or it's
> impractical to do so. Is there a w
Howdy all,
I'm slowly developing PEP 3143 and, in parallel, its reference
implementation, the ‘python-daemon’ library
http://pypi.python.org/pypi/python-daemon/>. Feedback continues to
be welcome from people wanting to make a program become a daemon; please
try it out and critique the specificatio
[posted and e-mailed]
On Sat, May 16, 2009, Pete wrote:
>
> python-concurre...@googlegroups.com is a new email list for discussion
> of concurrency issues in python. It arose out of Dave Beazley's class
> on the subject last week: http://www.dabeaz.com/chicago/concurrent.html
>
> The list wil
On May 17, 1:28 am, a...@pythoncraft.com (Aahz) wrote:
> In article
> <180531ca-33aa-47b9-9c69-5b5973f6b...@v35g2000pro.googlegroups.com>,
> John Machin wrote:
> >Neat trick. However, from 2.6.2:
>
> help(sum)
> >Help on built-in function sum in module __builtin__:
>
> >sum(...)
> > sum(
"Emanuele D'Arrigo" writes:
> On May 16, 8:17 pm, Arnaud Delobelle wrote:
>> # Insert Wedge into each subclass of modfoo.Base
>> for subclass in modfoo.Base.__subclasses__():
>> if subclass.__module__ != 'modfoo': continue
>> attrs = dict(item for item in subclass.__dict__.items()
>>
On 2009-05-16 12:13, anand j wrote:
Hi,
I am looking for a bunch of rules or a tool that takes the code for
my python class and checks the amount of code bloat and points out where
i can improve. I am a n00b to python and built an application linking
wordnet and graph packages. but somehow h
On May 16, 8:17 pm, Arnaud Delobelle wrote:
> # Insert Wedge into each subclass of modfoo.Base
> for subclass in modfoo.Base.__subclasses__():
> if subclass.__module__ != 'modfoo': continue
> attrs = dict(item for item in subclass.__dict__.items()
> if item[0][:2] !=
In article , a...@pythoncraft.com (Aahz)
wrote:
> In article ,
> Ned Deily wrote:
> >The second example is a call to the built-in function "list", [...]
> Actually, list() is not a function:
> >>> list
>
> Rather, ``list`` is an object (specifically a ``type`` object) with a
> __call__() meth
In article <2009051416013116807-tomfsess...@gmailcom>,
TomF wrote:
>
>I'm looking for a medium-sized Python system with very good coding
>style and good code organization, so I can learn from it. I'm reading
>various books on Python with advice on such things but I'd prefer to
>see a real sys
In article ,
Ned Deily wrote:
>In article
>,
> Sam Tregar wrote:
>>
>> Can anyone explain why this creates a list containing a
>> dictionary:
>> [{'a': 'b', 'foo': 'bar'}]
>> But this creates a list of keys of the dictionary:
>> list({ "a": "b", "foo": "bar" })
>
>The first example is a li
> I need to get the creation date from a jpeg file in Python. Googling
> brought up a several references to apparently defunct modules. The best
> way I have been able to find so far is something like this:
>
> from PIL import Image
> img = Image.open('img.jpg')
> exif_data = img._getexif()
> cre
Phillip B Oldham writes:
> On May 16, 2:15 pm, "Diez B. Roggisch" wrote:
>> matplotlib should serve you well.
>
> Thanks, I'll check that out.
>
>> Or you use some web-based solution with a javascript-based chart library.
>
> I'd rather stay away from web-based solutions; since this is going to
"Emanuele D'Arrigo" writes:
> Hi everybody,
>
> let's assume I have a module with loads of classes inheriting from one
> class, from the same module, i.e.:
>
> ## myFile.py
> class SuperClass(object)
> class SubClass1(SuperClass)
> class SubClass2(SuperClass)
> class SubClass3(SuperClass)
>
> In
> Since when is a list a number? Perhaps the help needs clarification,
> in line with the docs.
Everyone is supposed to use reduce() here ;)
Kay
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-05-16, Robert Dailey wrote:
> On May 16, 11:49 am, Gary Herron wrote:
>> Robert Dailey wrote:
>> > Hi,
>>
>> > I'm not a big expert on the tarfile component, but I assumed that .tgz
>> > files were short for .tar.gz and the format was the same.
>>
>> That's correct.
>>
>> > When I try
>>
Diez B. Roggisch wrote:
> Phillip B Oldham schrieb:
> > I've come into possession of a mac mini and a large LCD tv at the
> > office. I'd like to set it up in the corner to pull statistics from
> > our various servers (load, uptimes, etc) and display them in a
> > graphical format, full-screen, w
Hi Gabriel,
Gabriel Genellina wrote:
The (excellent!) article series by Doug Hellmann, "Python Module of the
Week", covers ConfigParser (and almost the whole standard library by now).
http://www.doughellmann.com/PyMOTW
Thanks for the pointer, I hadn't come across this site before, it
looks
Hi,
I am looking for a bunch of rules or a tool that takes the code for my
python class and checks the amount of code bloat and points out where i can
improve. I am a n00b to python and built an application linking wordnet and
graph packages. but somehow have this nagging feeling my code is too
On May 16, 11:49 am, Gary Herron wrote:
> Robert Dailey wrote:
> > Hi,
>
> > I'm not a big expert on the tarfile component, but I assumed that .tgz
> > files were short for .tar.gz and the format was the same.
>
> That's correct.
>
> > When I try
> > to extract a .tgz file using tarfile in Python
On May 16, 11:46 am, Kushal Kumaran wrote:
> On Sat, May 16, 2009 at 10:03 PM, Robert Dailey wrote:
> > Hi,
>
> > I'm not a big expert on the tarfile component, but I assumed that .tgz
> > files were short for .tar.gz and the format was the same. When I try
> > to extract a .tgz file using tarfil
On May 16, 11:49 am, Gary Herron wrote:
> Robert Dailey wrote:
> > Hi,
>
> > I'm not a big expert on the tarfile component, but I assumed that .tgz
> > files were short for .tar.gz and the format was the same.
>
> That's correct.
>
> > When I try
> > to extract a .tgz file using tarfile in Python
Hi everybody,
let's assume I have a module with loads of classes inheriting from one
class, from the same module, i.e.:
## myFile.py
class SuperClass(object)
class SubClass1(SuperClass)
class SubClass2(SuperClass)
class SubClass3(SuperClass)
In a separate file I also have:
## myOtherFile.py
cla
On May 16, 11:33 am, Robert Dailey wrote:
> Hi,
>
> I'm not a big expert on the tarfile component, but I assumed that .tgz
> files were short for .tar.gz and the format was the same. When I try
> to extract a .tgz file using tarfile in Python 3.0 on Windows, I get
> the following error:
>
> File
Robert Dailey wrote:
Hi,
I'm not a big expert on the tarfile component, but I assumed that .tgz
files were short for .tar.gz and the format was the same.
That's correct.
When I try
to extract a .tgz file using tarfile in Python 3.0 on Windows, I get
the following error:
File "C:\Python30
On Sat, May 16, 2009 at 10:03 PM, Robert Dailey wrote:
> Hi,
>
> I'm not a big expert on the tarfile component, but I assumed that .tgz
> files were short for .tar.gz and the format was the same. When I try
> to extract a .tgz file using tarfile in Python 3.0 on Windows, I get
> the following erro
Gabriel,
If you can guarantee the identifiers are all lowercase inside the
dictionary:
class lowercase_dict(dict):
def __getitem__(self, name):
return dict.__getitem__(self, name.lower())
import string
values = lowercase_dict( name='John Doe', phone='999-555-1212' )
output = str
Hi,
I'm not a big expert on the tarfile component, but I assumed that .tgz
files were short for .tar.gz and the format was the same. When I try
to extract a .tgz file using tarfile in Python 3.0 on Windows, I get
the following error:
File "C:\Python30\lib\tarfile.py", line 1630, in open
rai
On May 16, 5:04 pm, MRAB wrote:
> Seb wrote:
> > On May 16, 4:20 pm, MRAB wrote:
> >> Seb wrote:
> >>> I'm trying to construct a menu from an xml file. However my recursive
> >>> algorithm isn't doing what I want it too. I've been starring at this
> >>> for too long. Any help appreciated :)
> >>>
In article <180531ca-33aa-47b9-9c69-5b5973f6b...@v35g2000pro.googlegroups.com>,
John Machin wrote:
>
>Neat trick. However, from 2.6.2:
>
help(sum)
>Help on built-in function sum in module __builtin__:
>
>sum(...)
>sum(sequence[, start]) -> value
>
>Returns the sum of a sequence of nu
On May 16, 5:04 pm, MRAB wrote:
> Seb wrote:
> > On May 16, 4:20 pm, MRAB wrote:
> >> Seb wrote:
> >>> I'm trying to construct a menu from an xml file. However my recursive
> >>> algorithm isn't doing what I want it too. I've been starring at this
> >>> for too long. Any help appreciated :)
> >>>
Seb wrote:
On May 16, 4:20 pm, MRAB wrote:
Seb wrote:
I'm trying to construct a menu from an xml file. However my recursive
algorithm isn't doing what I want it too. I've been starring at this
for too long. Any help appreciated :)
I get the following error but the problem is more of a logical
On May 16, 2:15 pm, "Diez B. Roggisch" wrote:
> matplotlib should serve you well.
Thanks, I'll check that out.
> Or you use some web-based solution with a javascript-based chart library.
I'd rather stay away from web-based solutions; since this is going to
be running 24/7 and has a fixed a scre
On May 16, 4:20 pm, MRAB wrote:
> Seb wrote:
> > I'm trying to construct a menu from an xml file. However my recursive
> > algorithm isn't doing what I want it too. I've been starring at this
> > for too long. Any help appreciated :)
>
> > I get the following error but the problem is more of a log
Seb wrote:
I'm trying to construct a menu from an xml file. However my recursive
algorithm isn't doing what I want it too. I've been starring at this
for too long. Any help appreciated :)
I get the following error but the problem is more of a logical nature.
./gnomeAppletMenu.py:40: GtkWarning:
I'm trying to construct a menu from an xml file. However my recursive
algorithm isn't doing what I want it too. I've been starring at this
for too long. Any help appreciated :)
I get the following error but the problem is more of a logical nature.
./gnomeAppletMenu.py:40: GtkWarning: gtk_menu_shel
On May 16, 3:40 pm, gert wrote:
> On May 16, 3:16 pm, "Diez B. Roggisch" wrote:
>
> > gert schrieb:
>
> > > open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'),
> > > 'rb')
> > > how do you do this on windows (py3) so it still works on linux ?
>
> > os.path.join("..", "www", "bi
On May 16, 3:16 pm, "Diez B. Roggisch" wrote:
> gert schrieb:
>
> > open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'),
> > 'rb')
> > how do you do this on windows (py3) so it still works on linux ?
>
> os.path.join("..", "www", "bin", "picture.png")
>
> Or use os.sep.
>
> Diez
Diez B. Roggisch wrote:
gert schrieb:
open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'),
'rb')
how do you do this on windows (py3) so it still works on linux ?
os.path.join("..", "www", "bin", "picture.png")
Or use os.sep.
Windows should understand '/' as well as '\'.
--
gert schrieb:
open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'),
'rb')
how do you do this on windows (py3) so it still works on linux ?
os.path.join("..", "www", "bin", "picture.png")
Or use os.sep.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Phillip B Oldham schrieb:
I've come into possession of a mac mini and a large LCD tv at the
office. I'd like to set it up in the corner to pull statistics from
our various servers (load, uptimes, etc) and display them in a
graphical format, full-screen, with a reasonable refresh rate (say
every 3
Hi all,
I have to design web parser which will visit the given list of websites and
need to fetch a particular set of details.
It has to be so generic that even if we add new websites, it must fetch
those details if available anywhere.
So it must be something like a framework.
Though i have done
open(os.path.join(os.path.dirname(__file__),'../www/bin/picture.png'),
'rb')
how do you do this on windows (py3) so it still works on linux ?
--
http://mail.python.org/mailman/listinfo/python-list
I've come into possession of a mac mini and a large LCD tv at the
office. I'd like to set it up in the corner to pull statistics from
our various servers (load, uptimes, etc) and display them in a
graphical format, full-screen, with a reasonable refresh rate (say
every 30 seconds). There will be qu
Hi there,
I have a problem using Winpdb in Pythonscripts running in a program
which uses an embedded Python interpreter. After linking all needed
modules statically to python, "import rpdb2" can be done and leads to
no error.
But on using the next line "rpdb2.start_embedded_debugger('password')".
Hi all,
I need to get the creation date from a jpeg file in Python. Googling
brought up a several references to apparently defunct modules. The best
way I have been able to find so far is something like this:
from PIL import Image
img = Image.open('img.jpg')
exif_data = img._getexif()
creation_
kj wrote:
> The module has only one non-standard dependency, described by the
> following code:
>
> if sys.version_info[:2] >= (2, 6):
> import json
> else:
> import simplejson as json
I think
try:
import json
except ImportError:
import simplejson as json
Is more pythonic
On May 16, 4:02 am, "Gabriel Genellina"
wrote:
> You could use the 3-argument form of the raise
> statement:http://docs.python.org/reference/simple_stmts.html#the-raise-statement
Ah! When did that get there? :)
> There is a problem: remember that the traceback object keeps a reference
> to a
Edd schrieb:
Hi folks,
I have a some threadpool code that works like this :
tp = ThreadPool(number_of_threads)
futures = [tp.future(t) for t in tasks] # each task is callable
for f in futures:
print f.value() # <-- may propagate an exception
The idea being that a Future obj
Gabriel Genellina wrote:
En Fri, 15 May 2009 09:04:05 -0300, Igor Katson escribió:
Lawrence D'Oliveiro wrote:
In message ,
Igor Katson wrote:
Lawrence D'Oliveiro wrote:
In message ,
Igor Katson wrote:
I have problems in getting a SocketServer to shutdown.
Do you want to do a shutdown or
59 matches
Mail list logo