Re: How to get outer class name from an inner class?

2012-05-08 Thread alex23
On May 9, 6:05 am, John Gordon wrote: > I'd like to group the classes underneath a parent class, like so: > > class Question(ApplicationException): > >     class TooShort(ApplicationException): >         pass > >     class TooLong(ApplicationException): >         pass > > This will make it easier

Last CFP- CyberSecurity - Malaysia - IEEE

2012-05-08 Thread sdiwc conferences
The International Conference on Cyber Security, Cyber Warfare and Digital Forensic (CyberSec2012) University Putra Malaysia, Kuala Lumpur, Malaysia June 26-28, 2012 http://www.sdiwc.net/CyberSec2012/ The CyberSec2012 is technically

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Terry Reedy
On 5/8/2012 5:47 PM, Terry Reedy wrote: From what others have posted, it has a new code repository (that being the ostensible reason for the fork), project site, and mailing list -- the latter two incompetently. Apparently, the only thing he has kept are the domain and project names (the latter

Re: How to get outer class name from an inner class?

2012-05-08 Thread Steve Howell
On May 8, 1:05 pm, John Gordon wrote: > I'm trying to come up with a scheme for organizing exceptions in > my application. > > Currently, I'm using a base class which knows how to look up the text > of a specific error in a database table, keyed on the error class name. > > The base class looks li

Re: How do I run a python program from an internet address?

2012-05-08 Thread alex23
On May 8, 9:20 am, Albert wrote: > I have a small text based python program that I want to make available > to people who might be behind a firewall or can't install python on > their office computers, but can access the internet.  It is just an > algorithm that makes a handful of straightforward

Re: Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Edward C. Jones
Terry Reedy said: > Question 1: if you use the .pth method, do you get the same result? (I expect you will, but good to > check.) Recompiled Pyhton 3.3 without the SITEPATH change. Same result: > python3.3 Python 3.3.0a3 (default, May 8 2012, 19:57:45) [GCC 4.6.3] on linux Type "help", "cop

Re: indexed property? Can it be done?

2012-05-08 Thread Charles Hixson
On 05/08/2012 01:19 PM, Adam Tauno Williams wrote: On Mon, 2012-05-07 at 20:15 -0700, Charles Hixson wrote: class Node: def__init__(self, nodeId, key, value, downRight, downLeft, parent): dirty=True dlu=utcnow() self.node=[nodeI

Re: which book?

2012-05-08 Thread Mark Lawrence
On 08/05/2012 19:16, d.po...@gmail.com wrote: folks hi, I am going to learn python for some plot issues. which book or sources, do you recommend please? Cheers, Dave matplotlib - google and yee shall find. -- Cheers. Mark Lawrence. -- http://mail.python.org/mailman/listinfo/python-list

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Mark Lawrence
On 08/05/2012 22:47, Terry Reedy wrote: On 5/8/2012 12:42 PM, Chris Angelico wrote: On Wed, May 9, 2012 at 2:12 AM, Terry Reedy wrote: You still have it backwards. Risinger forked the project with a new code host and mailing list, but stole the name and and some data in the process and made t

Re: Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Terry Reedy
On 5/8/2012 3:13 PM, Edward C. Jones wrote: I use up-to-date Debian testing (wheezy), amd64 architecture. I downloaded, compiled and installed Python 3.3.0 alpha 3 (from python.org) using "altinstall". Debian wheezy comes with python3.2 (and 2.6 and 2.7). I installed the Debian package "python3-b

Re: How to get outer class name from an inner class?

2012-05-08 Thread Terry Reedy
On 5/8/2012 4:05 PM, John Gordon wrote: I'm trying to come up with a scheme for organizing exceptions in my application. Currently, I'm using a base class which knows how to look up the text of a specific error in a database table, keyed on the error class name. The base class looks like this:

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Terry Reedy
On 5/8/2012 12:42 PM, Chris Angelico wrote: On Wed, May 9, 2012 at 2:12 AM, Terry Reedy wrote: You still have it backwards. Risinger forked the project with a new code host and mailing list, but stole the name and and some data in the process and made the false claim that his fork was the ori

Re: Retrieving result from embedded execution

2012-05-08 Thread William R. Wing (Bill Wing)
On May 8, 2012, at 3:07 PM, F L wrote: > Hello everyone, > > We are trying to implement our own interactive interpreter in our application > using an embedded Python interpreter. > > I was wondering what would be the best way to retreive as text the result of > executing Python code. The text

Re: How to get outer class name from an inner class?

2012-05-08 Thread Chris Rebert
On Tue, May 8, 2012 at 1:05 PM, John Gordon wrote: > I'm trying to come up with a scheme for organizing exceptions in > my application. > > Currently, I'm using a base class which knows how to look up the text > of a specific error in a database table, keyed on the error class name. > > The base c

Re: indexed property? Can it be done?

2012-05-08 Thread Adam Tauno Williams
On Mon, 2012-05-07 at 20:15 -0700, Charles Hixson wrote: > class Node: > def__init__(self, nodeId, key, value, downRight, downLeft, parent): > dirty=True > dlu=utcnow() > self.node=[nodeId, downLeft, [key], [value], > [downRight], parent

Re: How to get outer class name from an inner class?

2012-05-08 Thread John Gordon
In John Gordon writes: > class QuestionTooShortError(NetIDAppsError): > """User entered a security question which is too short.""" > pass > class QuestionTooLongError(NetIDAppsError): > """User entered a security question which is too long.""" > pass Oops! These classes inheri

How to get outer class name from an inner class?

2012-05-08 Thread John Gordon
I'm trying to come up with a scheme for organizing exceptions in my application. Currently, I'm using a base class which knows how to look up the text of a specific error in a database table, keyed on the error class name. The base class looks like this: class ApplicationException(Exception):

Re: pickle question: sequencing of operations

2012-05-08 Thread Ian Kelly
On Tue, May 8, 2012 at 1:19 PM, Russell E. Owen wrote: > In article , >  "Russell E. Owen" wrote: > >> What is the sequence of calls when unpickling a class with __setstate__? I believe it just calls object.__new__ followed by yourclass.__setstate__. So at the point __setstate__ is called, you

Re: pickle question: sequencing of operations

2012-05-08 Thread Russell E. Owen
In article , "Russell E. Owen" wrote: > What is the sequence of calls when unpickling a class with __setstate__? > > >From experimentation I see that __setstate__ is called and __init__ is > not, but I think I need more info. > > I'm trying to pickle an instance of a class that is a subclass

Using modules from Debian "python3-..." packages with locally compiled Python 3.3

2012-05-08 Thread Edward C. Jones
I use up-to-date Debian testing (wheezy), amd64 architecture. I downloaded, compiled and installed Python 3.3.0 alpha 3 (from python.org) using "altinstall". Debian wheezy comes with python3.2 (and 2.6 and 2.7). I installed the Debian package "python3-bs4" (BeautifulSoup4 for Python3). Note: De

Retrieving result from embedded execution

2012-05-08 Thread F L
Hello everyone, We are trying to implement our own interactive interpreter in our applicationusing an embedded Python interpreter. I was wondering what would be the best way to retreive as text the result of executing Python code. The text must be exactly the same as it would be in thestand

Re: which book?

2012-05-08 Thread Alec Taylor
plot issues? On Wed, May 9, 2012 at 4:16 AM, wrote: > folks > hi, > I am going to learn python for some plot issues. which book or sources, do > you recommend please? > Cheers, > Dave > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-l

which book?

2012-05-08 Thread d . poreh
folks hi, I am going to learn python for some plot issues. which book or sources, do you recommend please? Cheers, Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: indexed property? Can it be done?

2012-05-08 Thread Ian Kelly
On Tue, May 8, 2012 at 10:30 AM, Charles Hixson wrote: > That depends on what you're doing.  For many, perhaps most, purposes I would > agree.  Not for this one.  And I couldn't use an internal dict, as the order > in which the items of the sub-lists occur is significant.  The sub-lists > need to

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Chris Angelico
On Wed, May 9, 2012 at 2:12 AM, Terry Reedy wrote: > On 5/8/2012 9:47 AM, Chris Angelico wrote: >> >> On Tue, May 8, 2012 at 11:43 PM, Devin Jeanpierre >>  wrote: >>> >>> There is no "both projects". there was Luke's project, and then >>> Risinger stole it and it's Risinger's project. There is on

Re: indexed property? Can it be done?

2012-05-08 Thread Charles Hixson
On 05/08/2012 12:50 AM, Peter Otten wrote: Charles Hixson wrote: class Node: def__init__(self, nodeId, key, value, downRight, downLeft, parent): dirty=True dlu=utcnow() self.node=[nodeId, downLeft, [key], [value], [downR

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Terry Reedy
On 5/8/2012 9:47 AM, Chris Angelico wrote: On Tue, May 8, 2012 at 11:43 PM, Devin Jeanpierre wrote: There is no "both projects". there was Luke's project, and then Risinger stole it and it's Risinger's project. There is only that one thing -- Luke has no """fork""" of his own codebase. Presu

Re: Problem with time.time() standing still

2012-05-08 Thread Bob Cowdery
Hopefully somebody can add the last piece of this puzzle. My code didn't work because I did make a silly mistake. The number of seconds since EPOC is a large number but it also needs a high precision. Attempting to put this value into a 32 bit float corrupts the least significant part because 2

Re: Expand RFC-2445 (iCalendar) recurrence rule?

2012-05-08 Thread Roy Smith
O.B. Murithi suggested I look at http://labix.org/python-dateutil, which turns out to have exactly what I'm looking for. Thanks! from dateutil.rrule import rrulestr from dateutil.parser import parse rule = rrulestr("FREQ=WEEKLY;COUNT=6;INTERVAL=2;BYDAY=FR", dtstart=parse("2012-0

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Chris Angelico
On Tue, May 8, 2012 at 11:43 PM, Devin Jeanpierre wrote: > There is no "both projects". there was Luke's project, and then > Risinger stole it and it's Risinger's project. There is only that one > thing -- Luke has no """fork""" of his own codebase. Presumably Luke could fork his own project, tho

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Devin Jeanpierre
On Tue, May 8, 2012 at 1:20 AM, Chris Angelico wrote: > I hope that pyjamas can be restored at some point to a single live > project. Whether that's headed by Luke Leighton or C Anthony Risinger > (neither of whom I know at all and thus I can't speak to either's > merits) or someone else, I don't

Re: How do I run a python program from an internet address?

2012-05-08 Thread james hedley
> What would be the best way to figure out how to do this? I looked at > Google app engine tutorial, but can't figure out how that will help we > get the code into the cloud so I can access it from any browser. GAE is quite a good option, since it includes free hosting. You should be able to ge

Re: Looking for proven Python code for Line Simplication such as Douglas-Peucker

2012-05-08 Thread Robert Kern
On 5/8/12 10:38 AM, David Shi wrote: Dear All, I am looking for proven Python code for Line Simplication such as Douglas-Peucker. https://svn.enthought.com/svn/enthought/EnthoughtBase/trunk/enthought/util/dp.py -- Robert Kern "I have come to believe that the whole world is an enigma, a harm

Expand RFC-2445 (iCalendar) recurrence rule?

2012-05-08 Thread Roy Smith
Does there exist a stand-alone module to expand RFC-2445 recurrence rule? The idea is to start with a string like: "RRULE:FREQ=WEEKLY;COUNT=6;INTERVAL=2;BYDAY=FR" and derive a list of dates on which that event occurs. I'm aware of http://codespeak.net/icalendar/, but that solves a much larger

Looking for proven Python code for Line Simplication such as Douglas-Peucker

2012-05-08 Thread David Shi
Dear All, I am looking for  proven Python code for Line Simplication such as Douglas-Peucker. Regards. David -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with time.time() standing still

2012-05-08 Thread Bob Cowdery
Can anyone make sense of this. I've looked over the Python timemodule.c again and it uses one of gettimeofday(), ftime() or time(). The gettimeofday() is not available on Windows so its going to use ftime() or time(). As time() only has a resolution of 1 second and returns a long and I know Py

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread Tim Wintle
On Tue, 2012-05-08 at 15:20 +1000, Chris Angelico wrote: > I hope that pyjamas can be restored at some point to a single live > project. Whether that's headed by Luke Leighton or C Anthony Risinger > (neither of whom I know at all and thus I can't speak to either's > merits) or someone else, I don'

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-08 Thread james hedley
Agreed with pretty much all of that. It's third-world politics, lurching from one dictator to another. Risinger seems to have banned all discussion of the subject from the list too, I'm not posting anymore because I don't want to give him an excuse to wield his newly found banhammer. But yeah,

Re: indexed property? Can it be done?

2012-05-08 Thread Peter Otten
Charles Hixson wrote: > class Node: > > def__init__(self, nodeId, key, value, downRight, downLeft, > parent): > dirty=True > dlu=utcnow() > self.node=[nodeId, downLeft, [key], [value], > [downRight], parent, dirty, dlu] > > Note th