trying to remember how to do inline code testing

2007-10-24 Thread Alex Hunsley
I can remember Python having a feature which allowed you to add some simple tests to your code, something like adding console output to your actual python script, like so: 1+1 2 2*7 14 ... then python would actually run these queries and check that the expected results occurred. I can't

Re: trying to remember how to do inline code testing

2007-10-24 Thread Alex Hunsley
Diez B. Roggisch wrote: Alex Hunsley wrote: I can remember Python having a feature which allowed you to add some simple tests to your code, something like adding console output to your actual python script, like so: 1+1 2 2*7 14 ... then python would actually run these queries

Re: John Bokma harassment

2006-05-24 Thread Alex Hunsley
Xah Lee wrote: I'm sorry to trouble everyone. But as you might know, due to my controversial writings and style, recently John Bokma lobbied people to complaint to my web hosting provider. After exchanging a few emails, my web hosting provider sent me a 30-day account cancellation notice last

Re: algorithmic mathematical art

2006-05-07 Thread Alex Hunsley
Xah Lee wrote: i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see

Re: algorithmic mathematical art

2006-05-07 Thread Alex Hunsley
Xah Lee wrote: i've long time been interested in algorithmic mathematical art. That is, mathematical or algorithmic visual art works that are generated by computer such that the program's source code reflects the algorithmic essence of the visual quality in the art work. (for detail, see

Re: A Lambda Logo Tour

2006-04-07 Thread Alex Hunsley
Xah Lee wrote: A Lambda Logo Tour (and why LISP languages using λ as logo should not be looked upon kindly) Xah Lee, 2002-02 Dear lispers, For the love of Java! Where is the Java in this post? Underwear related off topic trivia: At university we worked out that Y-fronts weren't Y-fronts

Re: DO NOT USE JAVA BECAUSE IT IS NOT OPEN SOURCE

2006-04-02 Thread Alex Hunsley
[EMAIL PROTECTED] wrote: Programing Languiges Are Ment to be free. That is why i am starting The iCoo De Tar/i thats french for Blow of state No, Coup d'état is French. http://en.wikipedia.org/wiki/Coup it is a flash/java alternative and if you are going to use a server side languige use

Re: tkinter: drop-down widget

2005-12-16 Thread Alex Hunsley
James Stroud wrote: Alex Hunsley wrote: Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here

tkinter: drop-down widget

2005-12-15 Thread Alex Hunsley
Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here and there, such as:

Re: tkinter: drop-down widget

2005-12-15 Thread Alex Hunsley
Alex Hunsley wrote: Can anyone recommend some code for creating drop-down menus in tkinter? To be absolutely clear, here's an example of a drop-down: http://www.google.co.uk/preferences?hl=en (see the language selection widget) I've found the odd bit of code here and there, such as: http

Re: Need Python Pro for Help!! Plzz

2005-11-01 Thread Alex Hunsley
Gerhard Häring wrote: Alex Hunsley wrote: [EMAIL PROTECTED] wrote: Need python Pro at [EMAIL PROTECTED] , if u wanna help, [...] 2) Why should someone willing to help you enter into a private email discussion? [...] Actually, it's a Google Group mailing list (formerly eGroups

Re: Need Python Pro for Help!! Plzz

2005-11-01 Thread Alex Hunsley
Fredrik Lundh wrote: Alex Hunsley wrote: 2) Why should someone willing to help you enter into a private email discussion? Newsgroups like this exist to help people looks like Fan wants to run his own group: http://groups.google.com/group/newtopython/about

Re: Need Python Pro for Help!! Plzz

2005-11-01 Thread Alex Hunsley
Alex Hunsley wrote: Fredrik Lundh wrote: Alex Hunsley wrote: 2) Why should someone willing to help you enter into a private email discussion? Newsgroups like this exist to help people looks like Fan wants to run his own group: http://groups.google.com/group/newtopython/about

data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
There's no really specific questions in this post, but I'm looking for people's thought on the issues within... The two main versions I've encountered for data pseudo-hiding (encapsulation) in python are: method 1: _X - (single underscore) - just cosmetic, a convention to let someone

mixin helper class for unknown attribute access?

2005-10-31 Thread Alex Hunsley
I know that I can catch access to unknown attributes with code something like the following: class example: def __getattr__(self, name): if name == 'age': return __age else: raise AttributeError but is there an existing mixin helper class

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
bruno at modulix wrote: Alex Hunsley wrote: There's no really specific questions in this post, but I'm looking for people's thought on the issues within... The two main versions I've encountered for data pseudo-hiding (encapsulation) OT Hmmm... Are data-hiding and encapsulation really

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Sorry, I wasn't being clear. What I should have said is that I don't like the idea of a typo in an assignment causing the assigning of the wrong thing. e.g. imagine a simple value-holding class: class Values: pass v = Values

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Sorry, I wasn't being clear. What I should have said is that I don't like the idea of a typo in an assignment causing the assigning of the wrong thing. e.g. imagine a simple value-holding class: class Values: pass v = Values

Re: mixin helper class for unknown attribute access?

2005-10-31 Thread Alex Hunsley
Steven D'Aprano wrote: On Mon, 31 Oct 2005 10:39:40 +, Alex Hunsley wrote: I know that I can catch access to unknown attributes with code something like the following: class example: def __getattr__(self, name): if name == 'age': return __age else

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Jorge Godoy wrote: Alex Hunsley [EMAIL PROTECTED] writes: Btw, can you recall the subject line of the thread? I'd like to google groups for it and have a read of that thread... ta! Search for: alex martelli pychecker on comp.lang.python... I don't have the thread's name anymore

Re: Need Python Pro for Help!! Plzz

2005-10-31 Thread Alex Hunsley
[EMAIL PROTECTED] wrote: Need python Pro at [EMAIL PROTECTED] , if u wanna help, 1) Why would anyone want to help you when you're not even willing to spend the (small) time and effort to spell simple words like you correctly or make sure your post actually makes sense? Start by helping

Re: data hiding/namespace pollution

2005-10-31 Thread Alex Hunsley
Steven D'Aprano wrote: On Mon, 31 Oct 2005 10:35:19 +, Alex Hunsley wrote: There's no really specific questions in this post, but I'm looking for people's thought on the issues within... The two main versions I've encountered for data pseudo-hiding (encapsulation) in python

Bloodhound.Exploit.49 trojan found in MIMEBase.pyc

2005-10-18 Thread Alex Hunsley
Symantec antivirus has apparently picked up a virus in my Python 2.4 (under cygwin): Scan type: Scheduled Scan Event: Threat Found! Threat: Bloodhound.Exploit.49 File: C:\cygwin\lib\python2.4\email\MIMEBase.pyc Location: Quarantine Action taken: Quarantine succeeded There's info to be

equivelant of Java's toString() method? (not repr)

2005-02-01 Thread Alex Hunsley
Pretty simple seeming question, but can't find answer via google or docs... I am using urllib2 as follows: handle = urlopen(req, postdata) # and URL to return a handle on ... print handle.info() the print statement prints out the headers: Content-Type: text/html;charset=ISO-8859-1

Re: HAVE YOU HEARD THE GOOD NEWS!

2005-01-27 Thread Alex Hunsley
[EMAIL PROTECTED] wrote: Good News! Do you know how simple it is to go to Heaven after this life has ended? Some people believe that belonging to a local church, temple, mosque or synagogue will get them to Heaven. Others believe that water baptism, obeying the ten commandments or just being a

cookielib and urllib2: thread-safe?

2005-01-26 Thread Alex Hunsley
I'm writing a test script in python for pulling web pages from a web server using urllib2 and cookielib. Since the main thing I am testing is what happens when concurrent requests are made to the web server, I need to make several requests concurrently, which I'll do from different threads in