Re: easyGUI and py2exe

2010-10-27 Thread Tim Roberts
Snooky wrote: >I have a python program that imports the following: > >import sys >from easygui import * ### This is line 11 in the source code ### >import SOAPpy >import datetime >import win32com.client > >This program works OK (compiled using py2exe) on my development >Windows Vista Noteboo

Re: Using nested lists and tables

2010-10-27 Thread robert
Zeynel wrote: I am trying to make this simple app for GAE. I get a string s that user enters in a form. I append that to an empty list L = [] then I test if the last saved string is the same as the new string. If same, I write it on the same column; if not the cursor moves to next column (I was

Re: Why "flat is better than nested"?

2010-10-27 Thread David
On 27 October 2010 20:58, Robin Becker wrote: > On 27/10/2010 10:13, Stefan Behnel wrote: >> Robin Becker, 25.10.2010 15:56: >>> >>> "I know that that that that that boy said is wrong!". >> >> What's a "that boy"? >> > well they say nested is hard. How about this break down [...] How about this b

Using nested lists and tables

2010-10-27 Thread Zeynel
I am trying to make this simple app for GAE. I get a string s that user enters in a form. I append that to an empty list L = [] then I test if the last saved string is the same as the new string. If same, I write it on the same column; if not the cursor moves to next column (I was trying to do th

Re: Why "flat is better than nested"?

2010-10-27 Thread alex23
On Oct 27, 7:58 pm, Robin Becker wrote: > >> "I know that that that that that boy said is wrong!". > > well they say nested is hard. How about this break down > > I know that X that a boy said is wrong. (any boy) > I know that X that the boy said is wrong. (a single boy) > I know that X that that

Re: Why "flat is better than nested"?

2010-10-27 Thread alex23
Steven D'Aprano wrote: > > Load the source code for the ‘this’ module into a text editor, and see > > how many of the maxims it violates. > > None of them. I'd say it easily violates the first 3, being neither beautiful, explicit nor simple, and especially "Readability counts". The whole thing c

Biosphere Technology -

2010-10-27 Thread neha shena
Biosphere Technology - The Greatest Innovation in Green Technologies by D. A. Ocampo Green technologies for more than a century today have been our greatest weapons towards saving planet earth. Comprehensive environmental awareness campaigns have been launched all over the world to inform people

Re: Why "flat is better than nested"?

2010-10-27 Thread Steven D'Aprano
On Tue, 26 Oct 2010 08:02:19 +1100, Ben Finney wrote: > Steve Holden writes: > >> And everyone taking the Zen too seriously should remember that it was >> written by Tim Peters one night during the commercial breaks between >> rounds of wrestling on television. So while it can give useful >> gui

Re: parsing of structured text

2010-10-27 Thread Kushal Kumaran
On Thu, Oct 28, 2010 at 1:33 AM, Robert Fendt wrote: > Hi all, > > I have to parse a file containing (slightly erroneous) vCal data. The > format of vCal/iCal is that of a structured ASCII file, not unlike XML > in a way. A vCal block contains information on a line-by-line basis, > with the possib

Lot of chance in Management work.

2010-10-27 Thread gaurav
Great earning in Management careers. Start career in Management work. http://topcareer.webs.com/humanresourcemgmt.htm http://managementjobs.webs.com/pm.htm Big money receives by Part Time Jobs in computer or government jobs. http://rojgars1.webs.com/gov.htmhttp://rojgars.webs.com/bankingjobs.

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-27 Thread Dave Angel
On 2:59 PM, Lawrence D'Oliveiro wrote: In message, Dave Angel wrote: On 2:59 PM, Lawrence D'Oliveiro wrote: In message, Nobody wrote: python.exe is a console executable, pythonw.exe is a GUI executable. Hence python.exe automatically gets a console window, while pythonw.exe doesn't. That's t

Re: Python 2.7 or 3.1

2010-10-27 Thread Braden Faulkner
Would it be safe to say that 2.6 would be even better for beginners than? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why "flat is better than nested"?

2010-10-27 Thread Steven D'Aprano
On Wed, 27 Oct 2010 14:02:27 +, kj wrote: > I have nothing against humor. The reason why I find "import braces" > funny is that it is so obviously a joke. But I do find it mildly > annoying (and just mildly) that a joke/hoax/farce like ZoP/this.py is > built into the standard lib, because a

Re: Land Of Lisp is out

2010-10-27 Thread TheFlyingDutchman
On Oct 27, 4:55 pm, Lawrence D'Oliveiro wrote: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? There is a new version of Lisp called Clojure that runs on the Java Virtual Machine (JVM) that is on the upswing. Don't know how many users it has but

easyGUI and py2exe

2010-10-27 Thread Snooky
I have a python program that imports the following: import sys from easygui import * ### This is line 11 in the source code ### import SOAPpy import datetime import win32com.client This program works OK (compiled using py2exe) on my development Windows Vista Notebook PC. I am trying to dist

Re: Land Of Lisp is out

2010-10-27 Thread Pascal J. Bourguignon
Lawrence D'Oliveiro writes: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? The lisps in common use nowadays are emacs lisp, Common Lisp, and the various schemes, from R4RS to R6RS. Some other lisps are in use in niches too. Eg. guile (a kind

[ANN] Benchmarker 2.0.0 released - a samll benchmark utility

2010-10-27 Thread kwatch
I released Benchmarker 2.0.0. http://pypi.python.org/pypi/Benchmarker/ Benchmarker is a small utility to benchmark your code. Download http://pypi.python.org/pypi/Benchmarker/ Installation:: ## if you have installed easy_install: $ sudo easy_install Benchmarker ## or down

Re: Land Of Lisp is out

2010-10-27 Thread Paul Donnelly
Lawrence D'Oliveiro writes: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? Probably not. It depends on how you want to define "in common use". Is Emacs still in common use? -- http://mail.python.org/mailman/listinfo/python-list

Re: is list comprehension necessary?

2010-10-27 Thread rantingrick
On Oct 26, 4:31 am, Xah Lee wrote: > recently wrote a article based on a debate here. (can't find the > original thread on Google at the moment) Hey all you numbskulls who are contributing the annoying off-topic chatter about Report Lab need to... 1) GET A LIFE 2) START A NEW THREAD! This thre

Re: Land Of Lisp is out

2010-10-27 Thread Paul Rubin
Lawrence D'Oliveiro writes: > Would it be right to say that the only Lisp still in common use is the > Elisp built into Emacs? Google "Greenspun's tenth law". ;-) -- http://mail.python.org/mailman/listinfo/python-list

RE: Generating PDF file in Python

2010-10-27 Thread Sells, Fred
I just shell down and use pdftk to merge fdf and pdf -Original Message- From: python-list-bounces+frsells=adventistcare@python.org [mailto:python-list-bounces+frsells=adventistcare@python.org] On Behalf Of Steve Piercy - Web Site Builder Sent: Wednesday, October 27, 2010 8:24 AM To

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-27 Thread Lawrence D'Oliveiro
In message , Nobody wrote: > On Wed, 27 Oct 2010 13:46:28 +1300, Lawrence D'Oliveiro wrote: > >> Why would you want both CLI and GUI functions in one program? > > An obvious example was the one which was being discussed, i.e. the Python > interpreter. But the Python interpreter has no GUI. > D

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-27 Thread Lawrence D'Oliveiro
In message , Dave Angel wrote: > On 2:59 PM, Lawrence D'Oliveiro wrote: >> In message, Nobody wrote: >> >>> python.exe is a console executable, pythonw.exe is a GUI executable. >>> Hence python.exe automatically gets a console window, while pythonw.exe >>> doesn't. That's the whole reason why Win

Re: Python use with Mightex Buffer USB camera

2010-10-27 Thread Christoph Gohlke
On Oct 27, 7:16 am, Greg Miller wrote: > Does anyone have any experience using Python and ctypes to interface > with one of the Mightex USB cameras?  I am following the CPP code > example and so far I think I've done pretty well talking to the dll. > I am able to get serial number information back

Re: Certificate validation with HTTPSConnection

2010-10-27 Thread Aahz
In article <4ca3a46b.4080...@animats.com>, John Nagle wrote: > >http://bugs.python.org/issue1589 >(2010: Developer "Bill Jansen" in denial, others disagree. >Currently being debated. See bug tracker.) While I agree with you that SSL ended up being rather a cluster, I think that using scare quot

Re: hand made class with destructor and the logging module

2010-10-27 Thread Vinay Sajip
On Oct 27, 3:21 pm, climb65 wrote: > This class has a destructor which is expected to log something into my log > file if a crash occurs. > Well, the destructor works well but during the crash, python has already > closed the log file and the reference to the Logger has been set to None. > So, I c

Re: stdout in subprocess

2010-10-27 Thread D'Arcy J.M. Cain
On Wed, 27 Oct 2010 16:24:29 -0400 Not To Miss wrote: > I have a question on subprocess.Popen, as shown comparably below. When I ran > 1.py, it prints "0". I don't understand how the file is empty. Isn't it > flushed when the file object "out" is closed? On the other hand, running > 2.py prints co

stdout in subprocess

2010-10-27 Thread Not To Miss
Hi all, I have a question on subprocess.Popen, as shown comparably below. When I ran 1.py, it prints "0". I don't understand how the file is empty. Isn't it flushed when the file object "out" is closed? On the other hand, running 2.py prints correct value. ### 1.py ## from subprocess

Re: ANN: ActivePython 3.1.2.4 (with PyPM) is now available

2010-10-27 Thread Sridhar Ratnakumar
On 2010-10-27, at 11:39 AM, John Nagle wrote: > On 10/27/2010 11:26 AM, Sridhar Ratnakumar wrote: >> ActiveState is pleased to announce ActivePython 3.1.2.4, a complete, >> ready-to-install binary distribution of Python 3.1 > ... > >> New Features & Upgrades > >> - [Windows] Installer upgra

parsing of structured text

2010-10-27 Thread Robert Fendt
Hi all, I have to parse a file containing (slightly erroneous) vCal data. The format of vCal/iCal is that of a structured ASCII file, not unlike XML in a way. A vCal block contains information on a line-by-line basis, with the possibility of sub-blocks (for events). BEGIN:VCALENDAR VERSION:1.0 BE

Re: [OFF] sed equivalent of something easy in python

2010-10-27 Thread Arnaud Delobelle
Tim Chase writes: > On 10/27/10 09:39, Jussi Piitulainen wrote: >>> So, is there some simple expression in Python for this? Just asking >>> out of curiosity when nothing comes to mind, not implying that there >>> should be or that Python should be changed in any way. >> >> To expand, below is the

Re: ANN: ActivePython 3.1.2.4 (with PyPM) is now available

2010-10-27 Thread John Nagle
On 10/27/2010 11:26 AM, Sridhar Ratnakumar wrote: ActiveState is pleased to announce ActivePython 3.1.2.4, a complete, ready-to-install binary distribution of Python 3.1 ... New Features & Upgrades - [Windows] Installer upgrade: automatically uninstall previous versions - Bug #87783 ..

Re: Why "flat is better than nested"?

2010-10-27 Thread Raymond Hettinger
On Oct 25, 8:23 am, Steve Holden wrote: > And everyone taking the Zen too seriously should remember that it was > written by Tim Peters one night during the commercial breaks between > rounds of wrestling on television. So while it can give useful guidance, > it's nether prescriptive nor a bible .

ANN: ActivePython 3.1.2.4 (with PyPM) is now available

2010-10-27 Thread Sridhar Ratnakumar
ActiveState is pleased to announce ActivePython 3.1.2.4, a complete, ready-to-install binary distribution of Python 3.1. A major update in this release is that PyPM (ActiveState's Python Package Manager) is now included with full support for installing Python 3 packages. http://www.actives

Re: Why "flat is better than nested"?

2010-10-27 Thread nn
On Oct 25, 4:18 pm, Ethan Furman wrote: > kj wrote: > > In Steve Holden > > writes: > > >>> On Oct 25, 5:07 am, kj wrote: > In "The Zen of Python", one of the "maxims" is "flat is better than > nested"?  Why?  Can anyone give me a concrete example that illustrates > this point?

Re: Land Of Lisp is out

2010-10-27 Thread namekuseijin
On 27 out, 09:46, Xah Lee wrote: > The Land Of Lisp is out! > > http://landoflisp.com/ > > Very well done site. > > spread the news, team lisp! > >  Xah haha, I've read some of the comics before. It's truly remarkably funny, no matter the language of your choice... going well down the rabbit ho

Re: [OFF] sed equivalent of something easy in python

2010-10-27 Thread Tim Chase
On 10/27/10 09:39, Jussi Piitulainen wrote: So, is there some simple expression in Python for this? Just asking out of curiosity when nothing comes to mind, not implying that there should be or that Python should be changed in any way. To expand, below is the best I can think of in Python 3 and

Re: [OFF] sed equivalent of something easy in python

2010-10-27 Thread Jussi Piitulainen
Jussi Piitulainen writes: > Daniel Fetchinson writes: > > > This question is really about sed not python, hence it's totally > > off. But since lots of unix heads are frequenting this list I > > thought I'd try my luck nevertheless. > ... > > using python. The pattern is that the first line is de

hand made class with destructor and the logging module

2010-10-27 Thread climb65
Hello, I have a handmade class within a python program which uses the logging module. This class has a destructor which is expected to log something into my log file if a crash occurs. Well, the destructor works well but during the crash, python has already closed the log file and the reference

Python use with Mightex Buffer USB camera

2010-10-27 Thread Greg Miller
Does anyone have any experience using Python and ctypes to interface with one of the Mightex USB cameras? I am following the CPP code example and so far I think I've done pretty well talking to the dll. I am able to get serial number information back from the camera, however I am not sure if I'm u

Re: sed equivalent of something easy in python

2010-10-27 Thread Tim Chase
On 10/27/10 08:27, Martin Gregorie wrote: (2) made me take care of 2 files instead of 1 from now on. Not necessarily: $ cat heredoc.sh #!/usr/bin/env bash python<< 'EOF' print "hello world" def foo(): print "foo()" foo() EOF $ Or even better: $ cat hello #!/usr/bin/python print "hello

Re: [OFF] sed equivalent of something easy in python

2010-10-27 Thread Jussi Piitulainen
Daniel Fetchinson writes: > This question is really about sed not python, hence it's totally > off. But since lots of unix heads are frequenting this list I > thought I'd try my luck nevertheless. ... > using python. The pattern is that the first line is deleted, then 2 > lines are kept, 3 lines

Re: Why "flat is better than nested"?

2010-10-27 Thread kj
In Steve Holden writes: >On 10/26/2010 2:44 PM, kj wrote: >> In Steve Holden >> writes: >> >>> The answer is probably the same as you will see if you try >> >>> from __future__ import braces >> >>> That feature *is* available in Python 2.6 ;-) >> >> Now, that's hilarious. >> >See, ther

Tkinter: how to create (modal) dialogs a la tk_dialog?

2010-10-27 Thread Olaf Dietrich
I'm stuck with a probably simple task: How can I create a user defined dialog (similar to tkFileDialog.askdirectory(), but with my own set of options/selections)? In Tk, that's set reply [tk_dialog .foo "The Title" "Which one?" {} 0 \ Yes No "I'm not sure"] What would be the equ

Re: sed equivalent of something easy in python

2010-10-27 Thread Martin Gregorie
On Wed, 27 Oct 2010 03:28:16 -0700, Lie wrote: > On Oct 26, 4:04 am, Daniel Fetchinson wrote: > >> (2) made me take care of 2 files instead of 1 from now on. > > Not necessarily: > > $ cat heredoc.sh > #!/usr/bin/env bash > python << 'EOF' > print "hello world" > def foo(): > print "foo()"

Re: Multilingual documentation solutions

2010-10-27 Thread Astley Le Jasper
Thanks for the pointer. I'll have a look into it. -- http://mail.python.org/mailman/listinfo/python-list

Live careers in Management work.

2010-10-27 Thread gaurav
Employments in Management careers. Management careers earn cash. Wide range in Management careers. http://managementjobs.webs.com/pm.htm http://topcareer.webs.com/humanresourcemgmt.htm Today vacancies for railway engineers, the site updating daily for government, banking and computer jobs. http://r

Re: Generating PDF file in Python

2010-10-27 Thread Steve Piercy - Web Site Builder
On 10/26/10 at 8:38 AM, gher...@islandtraining.com (Gary Herron) pronounced: Try a package named reportlab. It's very comprehensive, opensource, written in Python and is cross-platform: http://www.reportlab.com/software/opensource/ It appears that the open source version of ReportLab does no

Re: Multilingual documentation solutions

2010-10-27 Thread Hrvoje Niksic
Astley Le Jasper writes: > At the moment I'm producing a word document with screenshots that gets > translated, but this is getting very difficult to control, especially > tracking small content changes and translations. I don't know if you considered this, but you might want to look into Restru

Re: Retrieval of widget property values

2010-10-27 Thread Peter Otten
Jah_Alarm wrote: > hi, here's my problem: > > let's say I have a function that uses some widget's property. How canI > retireve the value of this property? > > For example, > > PopSize=IntVar(); > > popsize=Entry(root,width=10,textvariable=PopSize) > > def rand_opo_gen (self,event): > p

Re: Why "flat is better than nested"?

2010-10-27 Thread Lie Ryan
On 10/26/10 06:56, Steve Holden wrote: > On 10/25/2010 3:11 PM, kj wrote: >> In Steve Holden >> writes: >> >>> On 10/25/2010 10:47 AM, rantingrick wrote: On Oct 25, 5:07 am, kj wrote: > In "The Zen of Python", one of the "maxims" is "flat is better than > nested"? Why? Can anyone

Re: is list comprehension necessary?

2010-10-27 Thread Roy Smith
Andre Alexander Bell wrote: >> I occasionally use LCs, if they seem useful. However, what I >> don't like about LCs is that they 'look-like' being a closed scope >> [...] > antingrick wrote: > I must admit you make a good point here however the only time that > will slip you up is when you firs

Retrieval of widget property values

2010-10-27 Thread Jah_Alarm
hi, here's my problem: let's say I have a function that uses some widget's property. How canI retireve the value of this property? For example, PopSize=IntVar(); popsize=Entry(root,width=10,textvariable=PopSize) def rand_opo_gen (self,event): popsize_start=#need to get the textvariable v

Multilingual documentation solutions

2010-10-27 Thread Astley Le Jasper
My query isn't specific to Python, but some of you might have been in a similar position and if there are any technical solutions, I'd prefer to do it in Python. I have developed an application using Django and the supporting documentation needs to be multilingual. This isn't at code level, rather

Study Abroad Scholarship For Study in Australia...

2010-10-27 Thread neha shena
Study Abroad Scholarship For Study in Australia... Studying in Australia holds a particular appeal to the adventurous student who wishes to have excellent quality education in a multicultural ... http://www.childschooledu.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sed equivalent of something easy in python

2010-10-27 Thread Lie
On Oct 26, 4:04 am, Daniel Fetchinson wrote: > (2) made me take care of 2 files instead of 1 from now on. Not necessarily: $ cat heredoc.sh #!/usr/bin/env bash python << 'EOF' print "hello world" def foo(): print "foo()" foo() EOF $ $ ./heredoc.sh hello world foo() -- http://mail.python.or

Re: Why "flat is better than nested"?

2010-10-27 Thread Robin Becker
On 27/10/2010 10:13, Stefan Behnel wrote: Robin Becker, 25.10.2010 15:56: "I know that that that that that boy said is wrong!". What's a "that boy"? Stefan well they say nested is hard. How about this break down I know that X that a boy said is wrong. (any boy) I know that X that the boy

Re: ANN: PyGUI 2.3

2010-10-27 Thread Daniel Fetchinson
> PyGUI 2.3 is available: > >http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ > > This version works on Snow Leopard with PyObjC 2.3. > > > What is PyGUI? > -- > > PyGUI is a cross-platform GUI toolkit designed to be lightweight > and have a highly Pythonic API. Installation

Re: How on Factorial

2010-10-27 Thread Jussi Piitulainen
Geobird writes: > @ Ulrich : Tx > @ Rebert : Appreciate your interpretation. >It made me think about ternary operation . Say > >>> (a > b) and x or y > >Are all ternary operations prone to ...( in your words ) >> It exploits short-circuit evaluation >>(http://en.wikiped

Re: Why "flat is better than nested"?

2010-10-27 Thread Stefan Behnel
Robin Becker, 25.10.2010 15:56: "I know that that that that that boy said is wrong!". What's a "that boy"? Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: How on Factorial

2010-10-27 Thread Geobird
@ Ulrich : Tx @ Rebert : Appreciate your interpretation. It made me think about ternary operation . Say >>> (a > b) and x or y Are all ternary operations prone to ...( in your words ) > It exploits short-circuit evaluation >(http://en.wikipedia.org/wiki/Short-circuit_evaluat

Re: Why "flat is better than nested"?

2010-10-27 Thread Jorgen Grahn
On Tue, 2010-10-26, Carl Banks wrote: > On Oct 25, 11:20 pm, Jorgen Grahn wrote: >> On Mon, 2010-10-25, bruno.desthuilli...@gmail.com wrote: >> > On 25 oct, 15:34, Alex Willmer wrote: >> >> On Oct 25, 11:07 am, kj wrote: >> >> >> > In "The Zen of Python", one of the "maxims" is "flat is better t

Re: How on Factorial

2010-10-27 Thread Arnaud Delobelle
Chris Rebert writes: > On Tue, Oct 26, 2010 at 11:25 PM, Geobird wrote: >> >>  I  am a beginner in Python and would ask for a help. >> >> >> I  was searching for  smaller  version  of  code  to calculate >> factorial . Found  this one >> def fact(x): >>        return x > 1 and x * fact(x - 1) or

Re: Unix-head needs to Windows-ize his Python script (II)

2010-10-27 Thread Dave Angel
On 2:59 PM, Lawrence D'Oliveiro wrote: In message, Nobody wrote: python.exe is a console executable, pythonw.exe is a GUI executable. Hence python.exe automatically gets a console window, while pythonw.exe doesn't. That's the whole reason why Windows has separate python.exe and pythonw.exe prog

Re: Excercises

2010-10-27 Thread Johannes Charra
http://projecteuler.net/ Neither Python-specific nor biological stuff, but a good place to hone your programming skills in any language. Regards, Johannes Am Oct 27, 2010 um 9:19 AM schrieb Mateusz Koryciński: > Hi, > > I am pretty new to python. Theoretically I knew python syntax (how to de

Excercises

2010-10-27 Thread Mateusz Koryciński
Hi, I am pretty new to python. Theoretically I knew python syntax (how to define functions, classes etc.) but unfortunately as I see now I do not know how to use it right in program which I need. As I think I must start doing exercises to practice in solving particular problems, to learn how to us

Re: Interaction btw unittest.assertRaises and __getattr__. Bug?

2010-10-27 Thread Chris Torek
In article Inyeol wrote: [snippage below] >import unittest >class C(): >def __getattr__(self, name): >raise AttributeError >class Test(unittest.TestCase): >def test_getattr(self): >c = C() >self.assertRaises(AttributeError, c.foo) >unittest.main() >

Re: How on Factorial

2010-10-27 Thread Ulrich Eckhardt
Geobird wrote: > I am a beginner in Python and would ask for a help. > > > I was searching for smaller version of code to calculate > factorial . Found this one > def fact(x): > return x > 1 and x * fact(x - 1) or 1 I'd say this is about as small as it gets. > But I don't really ge

Re: How on Factorial

2010-10-27 Thread Chris Rebert
On Tue, Oct 26, 2010 at 11:25 PM, Geobird wrote: > >  I  am a beginner in Python and would ask for a help. > > > I  was searching for  smaller  version  of  code  to calculate > factorial . Found  this one > def fact(x): >        return x > 1 and x * fact(x - 1) or 1 > >  But I don't  really get h