Re: Flagging classes as not intended for direct initialization

2015-02-15 Thread Peter Otten
Mario Figueiredo wrote: > Hello everyone, > > [Python 3.X] > > I have the following factory model for the initialization of a class > tree (code abbreviated for simplicity). > > # item.py > class BadItemType(Exception): > pass > > class Item: > def __init__(self, _data): > > class Con

Re: How to install PIL or PILLOW on OS X Yosemite?

2015-02-15 Thread Ned Deily
In article , KP wrote: > just upgraded my Mac Mini to Yosemite and have never dabbled in Python on > this OS. > > I see it has Python 2.7.6 installed. > > When I do something like > > from PIL import ImageFont, ImageDraw > > it tells me that it cannot find PIL > > How do I install this on Y

Re: Flagging classes as not intended for direct initialization

2015-02-15 Thread Steven D'Aprano
Mario Figueiredo wrote: > Hello everyone, > > [Python 3.X] > > I have the following factory model for the initialization of a class > tree (code abbreviated for simplicity). > > # item.py > class BadItemType(Exception): > pass If this is a type error, why aren't you using TypeError? Or at

Re: Python discussed in Nature

2015-02-15 Thread Chris Angelico
On Mon, Feb 16, 2015 at 8:09 AM, giacomo boffi wrote: >> That's a font alias. Unfortunately, I've never yet figured out a >> straight-forward way to snap the pointer; > > when you know it, it's easy... > > % fc-match mono > DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book" > % Learn something new eve

Re: Python discussed in Nature

2015-02-15 Thread giacomo boffi
Chris Angelico writes: > On Sat, Feb 14, 2015 at 6:40 AM, John Ladasky > wrote: >> The default font that the Geany program editor uses on my Ubuntu >> system renders everything I've tried. When I look up that font in >> Geany's Preferences menu, it is called, simply, "monospace". >> > > That's

How to install PIL or PILLOW on OS X Yosemite?

2015-02-15 Thread KP
Hi, just upgraded my Mac Mini to Yosemite and have never dabbled in Python on this OS. I see it has Python 2.7.6 installed. When I do something like from PIL import ImageFont, ImageDraw it tells me that it cannot find PIL How do I install this on Yosemite? Any pointers much appreciated KP

Flagging classes as not intended for direct initialization

2015-02-15 Thread Mario Figueiredo
Hello everyone, [Python 3.X] I have the following factory model for the initialization of a class tree (code abbreviated for simplicity). # item.py class BadItemType(Exception): pass class Item: def __init__(self, _data): class Container(Item): def __init__(self, _data): I

Go Ahead, Make my PEP... (was: PEP 441 - Improving Python ZIP Application Support)

2015-02-15 Thread Skip Montanaro
>From over yonder, on python-dev... > -- Forwarded message -- > From: Steve Dower > Subject: Re: [Python-Dev] PEP 441 - Improving Python ZIP Application Support > > "Go ahead, make my pep." > > We should make a python-dev t-shirt with this on it :) +1 from me as QOTW. Skip -- h

Re: pickle error by multiprocessing

2015-02-15 Thread Albert-Jan Roskam
On Sun, Feb 15, 2015 7:43 AM CET dieter wrote: >Martijn Millecamp writes: > >> for a schoolproject we had to build a robot and control this robot with a >> gui to follow a pathWe use multiprocessingand in our group 2 people can run >> the codebut if i run the code,

Creating Python RPM on AIX

2015-02-15 Thread Blaxton
Hi Has any one created Python RPM on AIX ? I am using the spec file that comes with Python source file and here is the problems I was facing: README file says download the bz2 version, but only gziped and xz version available from Python website so had to convert the .tgz file to bz2 and copy