Re: Fastest way to detect a non-ASCII character in a list of strings.

2010-10-28 Thread Dun Peal
On Wed, Oct 20, 2010 at 6:52 AM, Stefan Behnel wrote: > Well, the estimate is about one man-month, so it would be doable in about > three months time if we had the money to work on it. So far, no one has made > a serious offer to support that project, though. I find myself surprised at the relati

Re: Land Of Lisp is out

2010-10-28 Thread Lawrence D'Oliveiro
In message <3fe80ac4-b595-4bcb-96b9-9138b1ec5...@l17g2000yqe.googlegroups.com>, TheFlyingDutchman wrote: > 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 c

Re: Why "flat is better than nested"?

2010-10-28 Thread Steven D'Aprano
On Wed, 27 Oct 2010 22:45:21 -0700, alex23 wrote: > 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

Re: Land Of Lisp is out

2010-10-28 Thread Mario Miri
Why not? Java language may be dying, but I don't think Java virtual machine is. On Thu, Oct 28, 2010 at 9:59 AM, Lawrence D'Oliveiro wrote: > In message > <3fe80ac4-b595-4bcb-96b9-9138b1ec5...@l17g2000yqe.googlegroups.com>, > TheFlyingDutchman wrote: > > > On Oct 27, 4:55 pm, Lawrence D'Oliveiro

is elementTree really a part of python 2.6?

2010-10-28 Thread hackingKK
Hello all, Some days back I had asked a few questions about parsing xml files using python. I have tryed dom.minidom module but I did not like the prittyPrint way of writing nodes. There were many other things I did not quite like about dom.minidom, so now trying to use elementTree. But to my

Re: Land Of Lisp is out

2010-10-28 Thread Stefan Hübner
> Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? Clojure (http://clojure.org) is a Lisp on the JVM. It's gaining more and more traction. -- http://mail.python.org/mailman/listinfo/python-list

Re: Land Of Lisp is out

2010-10-28 Thread Xah Lee
On Oct 28, 12:59 am, Lawrence D'Oliveiro wrote: > In message > <3fe80ac4-b595-4bcb-96b9-9138b1ec5...@l17g2000yqe.googlegroups.com>, > > TheFlyingDutchman wrote: > > 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 >

Re: Land Of Lisp is out

2010-10-28 Thread Alain Ketterlin
Lawrence D'Oliveiro writes: >>> 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. > > Now is not exactly a good time to buil

Re: is elementTree really a part of python 2.6?

2010-10-28 Thread Godson Gera
do the following import xml.etree that imports the elementtree library in 2.5 it self so you sure can do that in 2.6 http://docs.python.org/library/xml.etree.elementtree.html -- Thanks & Regards, Godson Gera Python Consultant India

Re: is elementTree really a part of python 2.6?

2010-10-28 Thread Chris Rebert
On Thu, Oct 28, 2010 at 1:23 AM, hackingKK wrote: > Hello all, > Some days back I had asked a few questions about parsing xml files using > python. > I have tryed dom.minidom module but I did not like the prittyPrint way of > writing nodes. > There were many other things I did not quite like about

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
sthueb...@googlemail.com (Stefan Hübner) writes: >> Would it be right to say that the only Lisp still in common use is the Elisp >> built into Emacs? > > Clojure (http://clojure.org) is a Lisp on the JVM. It's gaining more and > more traction. There are actually 2 REAL Lisp on the JVM: - abcl

Re: Land Of Lisp is out

2010-10-28 Thread Xah Lee
On Oct 28, 1:42 am, p...@informatimago.com (Pascal J. Bourguignon) wrote: > sthueb...@googlemail.com (Stefan Hübner) writes: > >> Would it be right to say that the only Lisp still in common use is the > >> Elisp > >> built into Emacs? > > > Clojure (http://clojure.org) is a Lisp on the JVM. It's g

Re: Python use with Mightex Buffer USB camera

2010-10-28 Thread Godson Gera
In case if you are on windows, have you tried python videocapture module ? It binds with DirectX API i think. http://videocapture.sourceforge.net/ -- Thanks & Regards, Godson Gera Python Consultant India On Wed, Oct 27,

Re: Using nested lists and tables

2010-10-28 Thread Peter Otten
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

Re: SIP Libraries?

2010-10-28 Thread Godson Gera
There were some attempts to build SIP libraries in python, I am giving a list of the libs that I know - Twisted - http://twistedmatrix.com/documents/8.1.0/api/twisted.protocols.sip.html - Shtoom - a dead project by anthony baxter made some enhancements to twisted's sip library - http:

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
Alain Ketterlin writes: > Lawrence D'Oliveiro writes: > 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. >> >> No

Re: Retrieval of widget property values

2010-10-28 Thread Alex
thanks Peter, I'm probably not getting something, but how do show_size and show_button account for the changes in Entry? There are no references to the widget in either the function of the button. Sorry if the question is too dumb. cheers, Alex On Oct 28, 1:11 am, Peter Otten <__pete...@web.de>

Re: Retrieval of widget property values

2010-10-28 Thread Peter Otten
Alex wrote: > thanks Peter, > > I'm probably not getting something, but how do show_size and > show_button account for the changes in Entry? There are no references > to the widget in either the function of the button. Sorry if the > question is too dumb. After size_var = IntVar() size_entry =

Re: is list comprehension necessary?

2010-10-28 Thread Xah Lee
On Oct 27, 5:46 pm, rantingrick wrote: > 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

xml : remove a node with dom

2010-10-28 Thread alain walter
Hello, I have many difficulties to manipulate xml routines. I'm working with python 2.4.4 and I cannot change to a more recent one, then I use dom package, why not. In the following code, I'm trying unsuccessfully to remove a particular node. It seems to me that it should be basic, but it's not. Th

Re: How on Factorial

2010-10-28 Thread Bj Raz
I'm working on some factorial stuff myself, and I'm running into that issue that the CPU or ALU (Algorithmic Logical Unit), isn't powerful enough to compute the numbers I'm trying to produce, including the OS has its own number crunching limitation for accuracy. To accurately generate the numbers

Re: How on Factorial

2010-10-28 Thread Xavier Ho
On 27 October 2010 18:27, Arnaud Delobelle wrote: > True. It's far too verbose. I'd go for something like: > >f=lambda n:n<=0 or n*f(~-n) > > I've saved a few precious keystrokes and used the very handy ~- idiom! > Huh, I've never seen that one before. Seems to work on both positive and ne

'NoneType' object has no attribute 'bind'

2010-10-28 Thread Alex
hi there, I keep getting the message in the Topic field above. Here's my code: self.click2=Button(root,text="Click Me").grid(column=4,row=10) self.click2.bind("",self.pop2pop) def pop2pop(self,event): print("Adsfadsf") newpop=IntVar() newpop=self.PopSize.get(); what am

Re: 'NoneType' object has no attribute 'bind'

2010-10-28 Thread Xavier Ho
On 28 October 2010 20:24, Alex wrote: > hi there, I keep getting the message in the Topic field above. > > Here's my code: > > self.click2=Button(root,text="Click Me").grid(column=4,row=10) > self.click2.bind("",self.pop2pop) > what am I doing wrong? > Try self.click2=Button(root,text="Click Me

Re: 'NoneType' object has no attribute 'bind'

2010-10-28 Thread Peter Otten
Alex wrote: > hi there, I keep getting the message in the Topic field above. > > Here's my code: > > self.click2=Button(root,text="Click Me").grid(column=4,row=10) Replace the above line to button = Button(root, text="Click Me") print "Button() returns", button grid = button.grid(column=4, row

Re: 'NoneType' object has no attribute 'bind'

2010-10-28 Thread Alex Willmer
On Oct 28, 11:24 am, Alex wrote: > hi there, I keep getting the message in the Topic field above. > > Here's my code: > > self.click2=Button(root,text="Click Me").grid(column=4,row=10) > self.click2.bind("",self.pop2pop) >From reading the Tkinter docs grid doesn't itself return a control. So I th

Re: parsing of structured text

2010-10-28 Thread Robert Fendt
On 28 Okt., 05:59, Kushal Kumaran wrote: > Using code someone else has already written would qualify as pythonic, IMO. > > http://pypi.python.org/pypi/vobject That seems to do what I need, thank you. I seem to have been a bit blind when I looked for existing packages. Of course, using vobject "o

Re: xml : remove a node with dom

2010-10-28 Thread Diez B. Roggisch
alain walter writes: > Hello, > I have many difficulties to manipulate xml routines. I'm working with > python 2.4.4 and I cannot change to a more recent one, then I use dom > package, why not. > In the following code, I'm trying unsuccessfully to remove a > particular node. It seems to me that i

wxpython 2.8 -- timing and latency issues when displaying widgets

2010-10-28 Thread Josef Frank
Dear all, in an application window (subwindow of a Notebook-control) I'm trying to do the following: 1. Create a StaticText control kind of "Please wait until processing has finished" 2. Do some processing (e.g. vacuuming an sqlite database) 3. Create a 2nd StaticText control with the messa

Re: xml : remove a node with dom

2010-10-28 Thread Stefan Behnel
alain walter, 28.10.2010 11:37: dom = parseString(toxml) self.ApplicationWhitespaceRemoving(dom) print toxml def ApplicationWhitespaceRemoving(self,ele) : from xml.dom import Node for c in ele.childNodes: if c.nodeType == c.TEXT_NODE: if c.nodeValue == "xxx_toremove_xxx"

Re: xml : remove a node with dom

2010-10-28 Thread alain walter
Hi, You're right for my post code : I extract it from a more complicated context. However, the solution you propose produce the line not a blank line. Finally, I've found a good solution by using : from xml.dom.ext import PrettyPrint from xml.dom.ext.reader.Sax2 import FromXmlStream dom = FromXm

Re: Land Of Lisp is out

2010-10-28 Thread kodifik
On Oct 28, 1:55 am, Lawrence D'Oliveiro wrote: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? Surely surpassed by autolisp (a xlisp derivative inside the Autocad engineering software). -- http://mail.python.org/mailman/listinfo/python-list

Re: Using nested lists and tables

2010-10-28 Thread Zeynel
On Oct 28, 4:49 am, Peter Otten <__pete...@web.de> wrote: Thank you this is great; but I don't know how to modify this code so that when the user types the string 's' on the form in the app he sees what he is typing. So, this will be in GAE. But I have a couple of other questions, for learning pur

Re: Land Of Lisp is out

2010-10-28 Thread Pascal J. Bourguignon
kodifik writes: > On Oct 28, 1:55 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: >> Would it be right to say that the only Lisp still in common use is the Elisp >> built into Emacs? > > Surely surpassed by autolisp (a xlisp derivative inside the Autocad > engineering software). I would

Re: Using nested lists and tables

2010-10-28 Thread Zeynel
On Oct 28, 2:32 am, robert wrote: > the reason may be that your text doesn't contain a question (mark). ... > perhaps drill down to a question on python-level. Thanks, I realize that what I was trying to ask is not too clear. I am learning to GAE using Python and I want to deploy a simple app. Th

Re: Using nested lists and tables

2010-10-28 Thread Iain King
On Oct 28, 2:19 pm, Zeynel wrote: > On Oct 28, 4:49 am, Peter Otten <__pete...@web.de> wrote: > > Thank you this is great; but I don't know how to modify this code so > that when the user types the string 's' on the form in the app he sees > what he is typing. So, this will be in GAE. But I have a

Re: Using nested lists and tables

2010-10-28 Thread Iain King
On Oct 28, 2:35 pm, Iain King wrote: ... > (a) I don't know if the order of resolution is predicated left-to- > right in the language spec of if it's an implementation detail > (b) columns[-1].startswith('s') would be better > ... Ignore (b), I didn't read the original message properly. Iain -

Re: Using nested lists and tables

2010-10-28 Thread Zeynel
On Oct 28, 9:35 am, Iain King wrote: > It's equivalent to: > > if columns: >     if columns[-1][0] == s: >         dostuff() > > i.e. check columns is not empty and then check if the last item > startswith 's'. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: How on Factorial

2010-10-28 Thread Dave Angel
On 2:59 PM, Xavier Ho wrote: On 27 October 2010 18:27, Arnaud Delobelle wrote: True. It's far too verbose. I'd go for something like: f=lambda n:n<=0 or n*f(~-n) I've saved a few precious keystrokes and used the very handy ~- idiom! Huh, I've never seen that one before. Seems to work

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

2010-10-28 Thread Olaf Dietrich
Peter Otten <__pete...@web.de>: > Olaf Dietrich wrote: > >> 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)? > > Have a look at the SimpleDialog module. A usage example is at th

Re: How on Factorial

2010-10-28 Thread Xavier Ho
On 28 October 2010 23:52, Dave Angel wrote: > The ~- trick only works on two's complement numbers. I've worked on > machines in the past that used one's complement, and this wouldn't work > there. > > DaveA > I imagine this wouldn't work on floating point numbers either. Cheers, Xav -- http:/

Re: How on Factorial

2010-10-28 Thread Dave Angel
On 10/28/2010 10:01 AM, Xavier Ho wrote: On 28 October 2010 23:52, Dave Angel wrote: The ~- trick only works on two's complement numbers. I've worked on machines in the past that used one's complement, and this wouldn't work there. DaveA I imagine this wouldn't work on floating point numbe

Re: Land Of Lisp is out

2010-10-28 Thread Emile van Sebille
On 10/28/2010 1:46 AM Xah Lee said... btw, who cross posted this thread to python? i call troll! Xah +1 QOTW :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How on Factorial

2010-10-28 Thread Xavier Ho
On 29 October 2010 00:13, Dave Angel wrote: > From the help: > > "The unary ~ (invert) operator yields the bitwise inversion of its plain or > long integer argument. The bitwise inversion of x is defined as -(x+1). It > only applies to integral numbers" > > Inverting the bits of a floating point

Re: minimal D: need software testers

2010-10-28 Thread Kruptein
On Oct 26, 4:24 pm, a...@pythoncraft.com (Aahz) wrote: > [posted & e-mailed] > > In article > <43bd55e3-e924-40b5-a157-b57ac8544...@f25g2000yqc.googlegroups.com>, > > Kruptein   wrote: > > >I've released the second alpha forminimal-Da program I've written in > >python which should make developing

Re: Using nested lists and tables

2010-10-28 Thread Peter Otten
Zeynel wrote: > Thank you this is great; but I don't know how to modify this code so > that when the user types the string 's' on the form in the app he sees > what he is typing. So, this will be in GAE. I've no idea what GAE is. In general the more precise your question is the better the answe

Re: embedding python in macOS 10.6

2010-10-28 Thread Aahz
[posted & e-mailed] In article , tinau...@libero.it wrote: > >i'm trying to embed python in a c++ code.i'm starting with the example in the >tutorial.i've problem with setting up the enveiroment. >I've installed python with the distributed version (i.e., i did not, as a >start, build it myself)

Re: Land Of Lisp is out

2010-10-28 Thread kodifik
On Oct 28, 3:24 pm, p...@informatimago.com (Pascal J. Bourguignon) wrote: > . > On the other hand, AutoCAD allow people to customize it using other > programming languages than AutoLisp, so I wouldn't expect it to be > majoritary. It is just a guess of the relative number of users. -- http://

Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread cbr...@cbrownsystems.com
It's clear but tedious to write: if 'monday" in days_off or "tuesday" in days_off: doSomething I currently am tending to write: if any([d for d in ['monday', 'tuesday'] if d in days_off]): doSomething Is there a better pythonic idiom for this situation? Cheers - Chas -- http://mail.p

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread John Posner
On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: It's clear but tedious to write: if 'monday" in days_off or "tuesday" in days_off: doSomething I currently am tending to write: if any([d for d in ['monday', 'tuesday'] if d in days_off]): doSomething Is there a better pythonic

Runtime error

2010-10-28 Thread Sebastian
Hi all, I am new to python and I don't know how to fix this error. I only try to execute python (or a cgi script) and I get an ouptu like [...] 'import site' failed; traceback: Traceback (most recent call last): File "/usr/lib/python2.6/site.py", line 513, in main() File "/usr/lib/python2.6/s

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread cbr...@cbrownsystems.com
On Oct 28, 9:23 am, John Posner wrote: > On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: > > > It's clear but tedious to write: > > > if 'monday" in days_off or "tuesday" in days_off: > >      doSomething > > > I currently am tending to write: > > > if any([d for d in ['monday', 'tuesday']

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread Chris Kaynor
On Thu, Oct 28, 2010 at 9:16 AM, cbr...@cbrownsystems.com < cbr...@cbrownsystems.com> wrote: > It's clear but tedious to write: > > if 'monday" in days_off or "tuesday" in days_off: >doSomething > > I currently am tending to write: > > if any([d for d in ['monday', 'tuesday'] if d in days_off]

Re: How on Factorial

2010-10-28 Thread karmaguedon
On 27 oct, 10:27, Arnaud Delobelle wrote: > 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(

Runtime Error

2010-10-28 Thread Sebastian
Hi all, I am new to python and I don't know how to fix this error. I only try to execute python (or a cgi script) and I get an ouptu like [...] 'import site' failed; traceback: Traceback (most recent call last): File "/usr/lib/python2.6/site.py", line 513, in main() File "/usr/lib/python2.6/s

Re: Land Of Lisp is out

2010-10-28 Thread namekuseijin
On 28 out, 06:46, Xah Lee wrote: > lol. He said REAL! > > how about the 10 Scheme Lisps on JVM? guess they are UNREAL. lol you know only CL is the real lisp and schmers are just zanny time- travelling folks as the webcomic depict. :p > btw, who cross posted this thread to python? i call troll!

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread Chris Rebert
On Thu, Oct 28, 2010 at 9:33 AM, cbr...@cbrownsystems.com wrote: > On Oct 28, 9:23 am, John Posner wrote: >> On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: >> >> > It's clear but tedious to write: >> >> > if 'monday" in days_off or "tuesday" in days_off: >> >      doSomething >> >> > I c

Re: Land Of Lisp is out

2010-10-28 Thread namekuseijin
On 28 out, 07:02, p...@informatimago.com (Pascal J. Bourguignon) wrote: > Alain Ketterlin writes: > > Lawrence D'Oliveiro writes: > > 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 th

Re: Land Of Lisp is out

2010-10-28 Thread namekuseijin
On 27 out, 21:55, Lawrence D'Oliveiro wrote: > Would it be right to say that the only Lisp still in common use is the Elisp > built into Emacs? Perhaps you should ask Google's Peter Norvig... -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread nn
On Oct 28, 12:33 pm, "cbr...@cbrownsystems.com" wrote: > On Oct 28, 9:23 am, John Posner wrote: > > > > > On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: > > > > It's clear but tedious to write: > > > > if 'monday" in days_off or "tuesday" in days_off: > > >      doSomething > > > > I cur

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread cbr...@cbrownsystems.com
On Oct 28, 10:05 am, Chris Rebert wrote: > On Thu, Oct 28, 2010 at 9:33 AM, cbr...@cbrownsystems.com > > > > wrote: > > On Oct 28, 9:23 am, John Posner wrote: > >> On 10/28/2010 12:16 PM, cbr...@cbrownsystems.com wrote: > > >> > It's clear but tedious to write: > > >> > if 'monday" in days_off o

Re: How on Factorial

2010-10-28 Thread Stefan Behnel
karmaguedon, 28.10.2010 18:46: On 27 oct, 10:27, Arnaud Delobelle wrote: 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

PHP MySQL Web Development - Why Do You Need a PHP & MySQL ...

2010-10-28 Thread neha shena
PHP MySQL Web Development - Why Do You Need a PHP & MySQL ... 20 Aug 2010 ... PHP is web development language. PHP stands for Hypertext Preprocessor. MySQL is an opensource, SQL Relational Database Management System ... http://childschooledu.blogspot.com/ -- http://mail.python.org/mailman/listin

Python changes

2010-10-28 Thread Craig McRoberts
First off, greetings from a newbie! Here's the deal. I gained a passable knowledge of Python nearly ten years ago. Then I decided a career in the computer sciences wasn't for me, and I let it go. Now I find myself back in the development arena, and I'd like to pick up Python again. How much has

Re: Land Of Lisp is out

2010-10-28 Thread Adam Tauno Williams
On Thu, 2010-10-28 at 10:06 -0700, namekuseijin wrote: > On 28 out, 07:02, p...@informatimago.com (Pascal J. Bourguignon) > wrote: > > Alain Ketterlin writes: > > > Lawrence D'Oliveiro writes: > > Would it be right to say that the only Lisp still in common use is the > > Elisp built in

Re: Python changes

2010-10-28 Thread Seebs
On 2010-10-28, Craig McRoberts wrote: >I've already resigned >myself to starting over from the beginning, but are my books from >that time period even worth using now? Impression I get is mostly "no". I think you'll find life overall a lot better now, though. Programming languages tend to impro

Re: How on Factorial

2010-10-28 Thread Arnaud Delobelle
Stefan Behnel writes: > karmaguedon, 28.10.2010 18:46: >> On 27 oct, 10:27, Arnaud Delobelle wrote: >>> Chris Rebert writes: This is stunt coding / code golf; no one should actually write factorial like that. >>> >>> True. It's far too verbose. I'd go for something like: >>> >>>

Re: Python changes

2010-10-28 Thread Neil Cerutti
On 2010-10-28, Craig McRoberts wrote: > First off, greetings from a newbie! > > Here's the deal. I gained a passable knowledge of Python nearly > ten years ago. Then I decided a career in the computer sciences > wasn't for me, and I let it go. Now I find myself back in the > development arena, and

Re: Pythonic way of saying 'at least one of a, b, or c is in some_list'

2010-10-28 Thread Arnaud Delobelle
"cbr...@cbrownsystems.com" writes: > It's clear but tedious to write: > > if 'monday" in days_off or "tuesday" in days_off: > doSomething > > I currently am tending to write: > > if any([d for d in ['monday', 'tuesday'] if d in days_off]): > doSomething > > Is there a better pythonic idio

Re: Python changes

2010-10-28 Thread Craig McRoberts
Thanks for the prompt replies. Sounds like it's time to hit a bookstore. Craig McRoberts -- http://mail.python.org/mailman/listinfo/python-list

Re: Python changes

2010-10-28 Thread Teenan
On Thu, 2010-10-28 at 15:03 -0400, Craig McRoberts wrote: > Thanks for the prompt replies. Sounds like it's time to hit a bookstore. > > Craig McRoberts You could do a lot worse than getting 'Dive into Python' (There's even a nice new version just for python 3.0) hmmm bookstore.. those are the t

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

2010-10-28 Thread Nobody
On Thu, 28 Oct 2010 12:54:03 +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. It may have one if you use

Re: Python changes

2010-10-28 Thread Craig McRoberts
Oh, I like to browse brick-and-mortar enough. But it's been forever since I've bought something there. Craig McRoberts On Oct 28, 2010, at 15:16, Teenan wrote: > On Thu, 2010-10-28 at 15:03 -0400, Craig McRoberts wrote: >> Thanks for the prompt replies. Sounds like it's time to hit a bookstore

Newbie question - parsing MIME(?) strings

2010-10-28 Thread Dan M
I'm working on a script that grabs messages from a Usenet server and does some work with them. All works nicely except for a few issues with the data I retrieve. For example, in one newsgroup I find occasional lines containing bits like: "Re: Mlle. =?ISO-8859-1?Q?Ana=EFs_introdooses_her_ownself

Re: Newbie question - parsing MIME(?) strings

2010-10-28 Thread Dan M
On Thu, 28 Oct 2010 15:05:56 -0500, Dan M wrote: Ok, I didn't research enough before I posted this. I see now that this *is* indeed a MIME message, and the '?Q' bit says that the next piece is quoted-printable, and that the encoding is defined in RFC2047. So the question the becomes, do we have

Re: Newbie question - parsing MIME(?) strings

2010-10-28 Thread superpollo
Dan M ha scritto: On Thu, 28 Oct 2010 15:05:56 -0500, Dan M wrote: Ok, I didn't research enough before I posted this. I see now that this *is* indeed a MIME message, and the '?Q' bit says that the next piece is quoted-printable, and that the encoding is defined in RFC2047. So the question th

Re: Newbie question - parsing MIME(?) strings

2010-10-28 Thread Anssi Saari
Dan M writes: > On Thu, 28 Oct 2010 15:05:56 -0500, Dan M wrote: > > Ok, I didn't research enough before I posted this. I see now that this > *is* indeed a MIME message, and the '?Q' bit says that the next piece is > quoted-printable, and that the encoding is defined in RFC2047. > > So the ques

Create a GUI and EXE for a python app?

2010-10-28 Thread Braden Faulkner
Having trouble with my mail client, so sorry if this goes through more than once. I'm worknig on a simple math program as my first application. I would like to make a cross-platform pretty GUI for it and also package it up in a EXE for distribution on Windows. What are the best and easiest way

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread Chris Rebert
On Thu, Oct 28, 2010 at 1:53 PM, Braden Faulkner wrote: > Having trouble with my mail client, so sorry if this goes through more than > once. > I'm worknig on a simple math program as my first application. I would like > to make a cross-platform pretty GUI for it and also package it up in a EXE >

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread bradenf
Thanks ill give it a try! Anyone know about the GUI then? --Original Message-- From: Chris Rebert Sender: ch...@rebertia.com To: Braden Faulkner Cc: python-list@python.org Subject: Re: Create a GUI and EXE for a python app? Sent: Oct 28, 2010 5:04 PM On Thu, Oct 28, 2010 at 1:53 PM, Brade

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread Alex Hall
There is tkinter or WX for a gui solution. I use wx just because I already know it and it does what I need it to do, so I see no reason to switch to a different library to do the same thing. On 10/28/10, brad...@hotmail.com wrote: > Thanks ill give it a try! Anyone know about the GUI then? > > --

Re: Why "flat is better than nested"?

2010-10-28 Thread Ben Finney
Steven D'Aprano writes: > On Wed, 27 Oct 2010 22:45:21 -0700, alex23 wrote: > > The whole thing could be replaced by a single print """The Zen > > of...""". > > But that would miss the point. It's supposed to be light-hearted. Yes, and to that end it's also (deliberately, in my view) breaking as

Re: Using nested lists and tables

2010-10-28 Thread Rhodri James
On Thu, 28 Oct 2010 14:30:16 +0100, Zeynel wrote: On Oct 28, 2:32 am, robert wrote: the reason may be that your text doesn't contain a question (mark). ... perhaps drill down to a question on python-level. Thanks, I realize that what I was trying to ask is not too clear. I am learning to

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread Philip Semanchuk
On Oct 28, 2010, at 5:43 PM, brad...@hotmail.com wrote: > Thanks ill give it a try! Anyone know about the GUI then? Lots of people know about GUIs, the problem is that it's not a simple subject. There's lots of free education on the subject in the list archives. Here's my very brief summary of

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread python
Tkinter is built-in and available on Windows, Mac, and Linux. If you're using Python 2.7 or 3.1 you can take advantage of Tkinter's ttk (Tile) support for platform native user interfaces. Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread Grant Edwards
On 2010-10-28, pyt...@bdurham.com wrote: > Tkinter is built-in and available on Windows, Mac, and Linux. If you're > using Python 2.7 or 3.1 you can take advantage of Tkinter's ttk (Tile) > support for platform native user interfaces. You get a native UI using the correct theme even on Linux und

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread bradenf
Thanks what is there to learn about each gui tools? --Original Message-- From: Alex Hall To: brad...@hotmail.com Cc: python-list@python.org Subject: Re: Create a GUI and EXE for a python app? Sent: Oct 28, 2010 5:49 PM There is tkinter or WX for a gui solution. I use wx just because I al

Re: Land Of Lisp is out

2010-10-28 Thread Lawrence D'Oliveiro
In message , kodifik wrote: > On Oct 28, 1:55 am, Lawrence D'Oliveiro > wrote: > >> Would it be right to say that the only Lisp still in common use is the >> Elisp built into Emacs? > > Surely surpassed by autolisp (a xlisp derivative inside the Autocad > engineering software). How many copie

Calling a method from invoking module

2010-10-28 Thread Baskaran Sankaran
Hi, I have two classes in separate python modules and I need to access some methods of the either classes from the other. They are not in base and derived class relationship. Please see the example below. Foo imports Bar and inside the Foo class it creates a Bar obj and then calls Bar.barz(). Now

Re: Land Of Lisp is out

2010-10-28 Thread jos...@corporate-world.lisp.de
On 29 Okt., 01:34, Lawrence D'Oliveiro wrote: > In message > , kodifik > wrote: > > > On Oct 28, 1:55 am, Lawrence D'Oliveiro > > wrote: > > >> Would it be right to say that the only Lisp still in common use is the > >> Elisp built into Emacs? > > > Surely surpassed by autolisp (a xlisp derivativ

Re: Land Of Lisp is out

2010-10-28 Thread bradenf
Sounds interesting --Original Message-- From: Lawrence D'Oliveiro Sender: python-list-bounces+bradenf=hotmail@python.org To: Python List Subject: Re: Land Of Lisp is out Sent: Oct 28, 2010 7:34 PM In message , kodifik wrote: > On Oct 28, 1:55 am, Lawrence D'Oliveiro > wrote: > >>

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread python
Grant, >> Tkinter is built-in and available on Windows, Mac, and Linux. If you're >> using Python 2.7 or 3.1 you can take advantage of Tkinter's ttk (Tile) >> support for platform native user interfaces. > You get a native UI using the correct theme even on Linux under Qt or GTk? That's an excel

Re: Discussion board software?

2010-10-28 Thread Tim Harig
On 2010-10-29, Gnarlodious wrote: > Is there such a thing as website discussion board software written in > Python? Yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Discussion board software?

2010-10-28 Thread bradenf
Not that I'm aware of --Original Message-- From: Gnarlodious Sender: python-list-bounces+bradenf=hotmail@python.org To: Python List Subject: Discussion board software? Sent: Oct 28, 2010 9:12 PM Is there such a thing as website discussion board software written in Python? -- http://

Re: Discussion board software?

2010-10-28 Thread Gnarlodious
On Oct 28, 7:20 pm, Tim Harig wrote: > On 2010-10-29, Gnarlodious wrote: > > > Is there such a thing as website discussion board software written in > > Python? > > Yes. OK I'll play, what and where? -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Why "flat is better than nested"?

2010-10-28 Thread rantingrick
On Oct 25, 10:23 am, Steve Holden wrote: > it was > written by Tim Peters one night during the commercial breaks between > rounds of wrestling on television. Tim Peters...a "WrestleMania" fan...who would have guessed? ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling a method from invoking module

2010-10-28 Thread Dave Angel
On 2:59 PM, Baskaran Sankaran wrote: Hi, I have two classes in separate python modules and I need to access some methods of the either classes from the other. They are not in base and derived class relationship. Please see the example below. Foo imports Bar and inside the Foo class it creates a

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

2010-10-28 Thread Andrew
On Thu, 28 Oct 2010 13:57:24 + (UTC), Olaf Dietrich wrote: > Could it be that these parts of Tkinter > are not particularly extensively documented? (Or am I searching > with the wrong expressions?) > Olaf I've wondered about this too. The tkinter and tkinter.ttk sections of the documentation

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

2010-10-28 Thread python
Excellent Tkinter tutorials Fundamentals Of Tkinter Part 1 http://www.dreamincode.net/forums/topic/116314-fundamentals-of-tkinter-part-one/ Fundamentals Of Tkinter Part 2 http://www.dreamincode.net/forums/topic/117474-fundementals-of-tkinter-part-2/ Tkinter, Part 3 - Dialogs http://www.dreaminco

Fwd: Calling a method from invoking module

2010-10-28 Thread Baskaran Sankaran
Sorry for the confusion; fooz(), track() and barz() are all members of their respective classes. I must have missed the self argument while creating the synthetic example. Yeah, I realize the mutual import is a bad idea. So, if I merge them into a single module (but still retaining the two classes

  1   2   >