Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Paul Rubin
John Nagle <[EMAIL PROTECTED]> writes: > What a mess. That's some professor inventing his very own variation on > predicate calculus and writing a book using his own notation and terminology. I thought it was all pretty standard. It's the same notation I see in other PL stuff. > There's no

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread John Nagle
Paul Rubin wrote: > Jeff Schwab <[EMAIL PROTECTED]> writes: >> I've been learning a fair amount about functional programming >> recently, mostly because compile-time C++ turns out to be a pure >> functional programming language. Where should I go for a solid >> grounding in lambda-calculus? > > F

Re: finding items that occur more than once in a list

2008-03-22 Thread Bryan Olson
Arnaud Delobelle wrote: > Bryan Olson wrote: >> We mean that the party supplying the keys deliberately chose >> them to make the hash table inefficient. In this thread the goal >> is efficiency; a party working toward an opposing goal is an >> adversary. > > There are situations where this can hap

Know Your Python-Devs!

2008-03-22 Thread Jack Diederich
At the PyCon core python sprint I suggested this game and it got some laughs. So I put together a webpage for the game of: German, American, or Other? There is a list of about 30 core devs' last names. Highlight the white text on white background for the [mostly correct] answers. http://jackd

Re: Pyparsing help

2008-03-22 Thread rh0dium
On Mar 22, 6:30 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > Oof, I see that you have multiple "Layer" entries, with different > qualifying labels.  Since the dicts use "Layer" as the key, you only > get the last "Layer" value, with qualifier "PRBOUNDARY", and lose the > "Layer" for "METAL2".  To

Re: List question

2008-03-22 Thread Mensanator
On Mar 22, 8:40�pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 22 Mar 2008 14:55:39 -0700 (PDT), Zentrader > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > is funny and not mean. �In the words of whoever it was in "Gone With > > The Wind", frankly I don't give a

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Mensanator
On Mar 22, 11:29�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote: > > On 22 Mar, 23:42, 7stud <[EMAIL PROTECTED]> wrote: > > >> Beginning programmers in grades 9-12 are not going to understand issues > >> like that, and it w

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Paul Rubin
Jeff Schwab <[EMAIL PROTECTED]> writes: > I've been learning a fair amount about functional programming > recently, mostly because compile-time C++ turns out to be a pure > functional programming language. Where should I go for a solid > grounding in lambda-calculus? For PL theory in general, try

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Paul Rubin
jmDesktop <[EMAIL PROTECTED]> writes: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and principles. I guess

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Steven D'Aprano
On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote: > On 22 Mar, 23:42, 7stud <[EMAIL PROTECTED]> wrote: > >> Beginning programmers in grades 9-12 are not going to understand issues >> like that, and it would be a mistake to try and introduce them. >> Beginning programmers should be concentr

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread sturlamolden
On 22 Mar, 23:42, 7stud <[EMAIL PROTECTED]> wrote: > Beginning programmers in grades 9-12 are not going to understand > issues like that, and it would be a mistake to try and introduce > them. Beginning programmers should be concentrating their efforts on > learning the syntax of a language and b

Re: wxFormBuilder

2008-03-22 Thread Bill
sturlamolden wrote, On 3/20/2008 9:41 AM: > I just discovered wxFormBuilder. After having tried several GUI > builders for wx (including DialogBlocks, wxGlade, XRCed, Boa > constructor), this is the first one I can actually use. > > To use it wxFormBuilder with wxPython, I generated an xrc resourc

Re: wxFormBuilder

2008-03-22 Thread Bill
sturlamolden wrote, On 3/20/2008 9:41 AM: > I just discovered wxFormBuilder. After having tried several GUI > builders for wx (including DialogBlocks, wxGlade, XRCed, Boa > constructor), this is the first one I can actually use. > > To use it wxFormBuilder with wxPython, I generated an xrc resourc

Re: wxFormBuilder

2008-03-22 Thread Bill
sturlamolden wrote, On 3/20/2008 9:41 AM: > I just discovered wxFormBuilder. After having tried several GUI > builders for wx (including DialogBlocks, wxGlade, XRCed, Boa > constructor), this is the first one I can actually use. > > To use it wxFormBuilder with wxPython, I generated an xrc resourc

Re: Anomaly in time.clock()

2008-03-22 Thread Craig
On Mar 22, 10:03 pm, Tim Roberts <[EMAIL PROTECTED]> wrote: > Godzilla <[EMAIL PROTECTED]> wrote: > > >Just found out that win32api.GetTickCount() returns a tick count in > >milli-second since XP started. Not sure whether that is reliable. > >Anyone uses that for calculating elapsed time? > > What

Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 22, 9:40 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 22 Mar 2008 15:12:47 -0700 (PDT), Craig <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > > > Anyway, I have the following for "types": > > LPBSTR = POINTER(c_void_p) > > HANDLE = POINTER(POINTER(c

Re: Anomaly in time.clock()

2008-03-22 Thread Tim Roberts
Godzilla <[EMAIL PROTECTED]> wrote: > >Just found out that win32api.GetTickCount() returns a tick count in >milli-second since XP started. Not sure whether that is reliable. >Anyone uses that for calculating elapsed time? What do you mean by "reliable"? The tick count is updated as part of schedu

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Paul McGuire
On Mar 22, 11:40 am, jmDesktop <[EMAIL PROTECTED]> wrote: > For students 9th - 12th grade, with at least Algebra I.  Do you think > Python is a good first programming language for someone with zero > programming experience?  Using Linux and Python for first exposure to > programming languages and p

Re: Pyparsing help

2008-03-22 Thread Paul McGuire
Oof, I see that you have multiple "Layer" entries, with different qualifying labels. Since the dicts use "Layer" as the key, you only get the last "Layer" value, with qualifier "PRBOUNDARY", and lose the "Layer" for "METAL2". To fix this, you'll have to move the optional alias term to the key, an

Re: Problem with complex numbers

2008-03-22 Thread Terry Reedy
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Well, the file is in the Demo folder. It's just a demo how to implement a naive complex type in Python. | Why do you think the power of a complex to a complex is not defined? I suspect because the naive implementa

Re: re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread Gabriel Genellina
En Sat, 22 Mar 2008 17:27:49 -0300, sgharvey <[EMAIL PROTECTED]> escribi�: > ... and by works, I mean works like I expect it to. > > I'm writing my own cheesy config.ini parser because ConfigParser > doesn't preserve case or order of sections, or order of options w/in > sections. Take a look at

Re: Pyparsing help

2008-03-22 Thread Paul McGuire
On Mar 22, 4:11 pm, rh0dium <[EMAIL PROTECTED]> wrote: > Hi all, > > I am struggling with parsing the following data: > > As a side note:  Is this the right approach to using pyparsing.  Do we > start from the inside and work our way out or should I have started > with looking at the bigger pictur

Re: List question

2008-03-22 Thread Steven D'Aprano
On Sat, 22 Mar 2008 14:55:39 -0700, Zentrader wrote: >> No one meant to laugh at you. Your naivete was not obvious. FWIW, a >> sense of humor is a valuable possession in most Python-related >> conversations. > > Perhaps someone can explain how telling something like this to the OP, > who thinks

Re: List question

2008-03-22 Thread Steven D'Aprano
On Sat, 22 Mar 2008 16:16:03 -0700, bearophileHUGS wrote: > bearophile: >> A more computer-friendly (and Pythonic) syntax may be ('are' is a >> keyword): > > Sorry for causing confusion, I was just thinking aloud. English isn't my > first language, and sometimes I slip a bit. There is nothing w

Re: How to use boost.python to wrap a class with a pure virtual function that has a 'void *' argument

2008-03-22 Thread James Whetstone
I found a solution to this problem: void handleMessage(void *message) { int size = getSize(message); PyObject *obj = PyBuffer_FromMemory( message, size ) ; boost::python::handle<> h(obj); PyGILState_STATE gstate = PyGILState_Ensure(); try { call(this->get_override("handleMessage").ptr()

Re: Prototype OO

2008-03-22 Thread John Machin
On Mar 23, 12:32 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > John Machin schrieb: > > > On Mar 21, 11:48 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > >> [1] Just one example:http://docs.mootools.net/Class/Class.js > > > Mootools being something a coworker might use? > > I don't und

Re: List question

2008-03-22 Thread bearophileHUGS
bearophile: > A more computer-friendly (and Pythonic) syntax may be ('are' is a keyword): Sorry for causing confusion, I was just thinking aloud. English isn't my first language, and sometimes I slip a bit. Replace that with: > A more computer-friendly (and Pythonic) syntax may be ('are' is meant

Re: re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread Brian Lane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 sgharvey wrote: > ... and by works, I mean works like I expect it to. > > I'm writing my own cheesy config.ini parser because ConfigParser > doesn't preserve case or order of sections, or order of options w/in > sections. > > What's confusing me is t

Re: re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread John Machin
On Mar 23, 7:27 am, sgharvey <[EMAIL PROTECTED]> wrote: > ... and by works, I mean works like I expect it to. You haven't told us what you expect it to do. In any case, your subject heading indicates that the problem is 99.999% likely to be in your logic -- the converse would require the result of

Re: Make Money Using Paypal Get Paid Instantly

2008-03-22 Thread Work from Home Secrets
> Interesting. What is being suggested here is against Paypal's > acceptable usage policy. Consult with a real person who has been > successful before you jump into a scam like this and above all, make > sure that person is going to be there to support you the whole way > whether you just need to

Re: Subprocess and /usr/bin/dialog

2008-03-22 Thread harrelson
Thanks Grant, that does it! I knew it had to be something simple like that and it was frustrating not to be able to find it. I do prefer the tuple. Thanks again. culley -- http://mail.python.org/mailman/listinfo/python-list

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread 7stud
On Mar 22, 3:34 pm, bsoist <[EMAIL PROTECTED]> wrote: > On Mar 22, 12:40 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > > > For students 9th - 12th grade, with at least Algebra I.  Do you think > > Python is a good first programming language for someone with zero > > programming experience?  Using Linu

Re: Problem with complex numbers

2008-03-22 Thread Christian Heimes
Matthias Götz schrieb: > So can you tell me what's the purpose of Complex.py, > > and where can i find the semantic i'am looking for. Well, the file is in the Demo folder. It's just a demo how to implement a naive complex type in Python. Why do you think the power of a complex to a complex is no

Re: Make Money Using Paypal Get Paid Instantly

2008-03-22 Thread wahreviews
On Mar 12, 12:10 pm, ayt46g6b <[EMAIL PROTECTED]> wrote: > Make Money Using Paypal Get Paid Instantly > > Make 1k-5k every week > without leaving the > comfort of your own home > > Click Here to Make Money Using Paypal > and Get Paid Instantlyhttp://freetrafficbuzz.com/recommends/cashdirectly Inte

Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 22, 3:13 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Fri, 21 Mar 2008 23:21:48 -0700 (PDT), Craig <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > Sorry, I wasn't trying to exclude any credit from Dennis, I just > > wasn't sure if he wanted to be listed. > >

Re: List question

2008-03-22 Thread Michael Wieher
If you can't laugh at your own stupidity, being a programmer will lead directly to insanity. =) 2008/3/22, Zentrader <[EMAIL PROTECTED]>: > > > No one meant to laugh at you. Your naivete was not obvious. FWIW, a > > sense of humor is a valuable possession in most Python-related > > conversations

Re: List question

2008-03-22 Thread Zentrader
> No one meant to laugh at you. Your naivete was not obvious. FWIW, a > sense of humor is a valuable possession in most Python-related > conversations. Perhaps someone can explain how telling something like this to the OP, who thinks this statement will work if 'one' and 'two' in f: is funny and

Re: re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread John Machin
On Mar 23, 8:21 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 22 Mar 2008 13:27:49 -0700, sgharvey wrote: > > ... and by works, I mean works like I expect it to. > > > I'm writing my own cheesy config.ini parser because ConfigParser > > doesn't preserve case or order of sections

Re: Problem with complex numbers

2008-03-22 Thread Christian Heimes
Matthias Götz schrieb: > So if somebody can help me, it would be nice. Thanks. The complex type is implemented in C. It's totally unrelated to Complex.py. Christian -- http://mail.python.org/mailman/listinfo/python-list

Django gets Wired

2008-03-22 Thread Terry Reedy
from Wired magazine, April 2008 (arrived today), p.44: Expired: ASP.NET; Tired: PHP; Wired: Django Congrats to the Django crew. http://www.djangoproject.com/ -- http://mail.python.org/mailman/listinfo/python-list

Problem with complex numbers

2008-03-22 Thread Matthias Götz
Hello python fans, I have a small problem using python and complex math. The pow(complex,complex) function in the windows python version doesn't have the same semantic as the source version. (I have downloaded : - Python 2.5.2 compressed source tarball

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread bsoist
On Mar 22, 12:40 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and p

Python-URL! - weekly Python news and links (Mar 18)

2008-03-22 Thread Gabriel Genellina
QOTW: "Most people don't use Python by accident, and most people don't continue to use Python by accident" - Chris Hagner, during the talk "Why Python Sucks (But Works Great For Us)" at PyCon 2008 "I don't want a macro facility in the language _because_ it would be so cool." - Laura Creighton

Re: re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread Marc 'BlackJack' Rintsch
On Sat, 22 Mar 2008 13:27:49 -0700, sgharvey wrote: > ... and by works, I mean works like I expect it to. > > I'm writing my own cheesy config.ini parser because ConfigParser > doesn't preserve case or order of sections, or order of options w/in > sections. > > What's confusing me is this: >

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Jeff Schwab
Arnaud Delobelle wrote: > Anyway, here the conclusion that I draw: learn lambda-calculus and > Turing machines. The rest is syntactic sugar. How is the lambda-calculus fundamentally different from Turing machine-based implementations? I've been learning a fair amount about functional programmi

Pyparsing help

2008-03-22 Thread rh0dium
Hi all, I am struggling with parsing the following data: test1 = """ Technology { name= "gtc" dielectric = 2.75e-05 unitTimeName= "ns" timePrecision

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Arnaud Delobelle
On Mar 22, 7:00 pm, Larry Bates <[EMAIL PROTECTED]> wrote: > jmDesktop wrote: > > For students 9th - 12th grade, with at least Algebra I.  Do you think > > Python is a good first programming language for someone with zero > > programming experience?  Using Linux and Python for first exposure to > >

re.search (works)|(doesn't work) depending on for loop order

2008-03-22 Thread sgharvey
... and by works, I mean works like I expect it to. I'm writing my own cheesy config.ini parser because ConfigParser doesn't preserve case or order of sections, or order of options w/in sections. What's confusing me is this: If I try matching every line to one pattern at a time, all the patter

How to use boost.python to wrap a class with a pure virtual function that has a 'void *' argument

2008-03-22 Thread James Whetstone
As the subject implies, I'm having trouble wrapping a C++ class that looks like this: struct A { virtual void handleMessage(void *message)=0; }; To wrap this class, I've written the following code: struct AWrapper : A, wrapper { void handleMessage(void *message) { this->get

Re: function-class frustration

2008-03-22 Thread Gabriel Genellina
En Sat, 22 Mar 2008 07:07:18 -0300, John Machin <[EMAIL PROTECTED]> escribi�: > On Mar 22, 7:19 pm, [EMAIL PROTECTED] wrote: > >> On the other hand, are you willing to make changes to the console? >> How big and what? I was thinking of __ to keep the second-to-last >> most recent command. > > A

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Paul Rubin
jmDesktop <[EMAIL PROTECTED]> writes: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? It's at least pretty good. It's not ideal, but nothing ever is. What I mean is: it's the bes

Re: finding items that occur more than once in a list

2008-03-22 Thread castironpi
On Mar 22, 3:31 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > John Machin wrote: > >> On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote: > >>> A collision sequence is not so rare. > >> [ hash( 2**i ) for i in range( 0, 256, 32 ) ] > >>> [1, 1, 1, 1, 1, 1, 1, 1] > >> Bryan

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Brian Lane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeff Schwab wrote: > jmDesktop wrote: >> For students 9th - 12th grade, with at least Algebra I. Do you think >> Python is a good first programming language for someone with zero >> programming experience? Using Linux and Python for first exposure to

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread André
On Mar 22, 3:48 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > jmDesktop <[EMAIL PROTECTED]> writes: > > For students 9th - 12th grade, with at least Algebra I. Do you think > > Python is a good first programming language for someone with zero > > programming experience? Using Linux and Python

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Jeff Schwab
Larry Bates wrote: > jmDesktop wrote: >> For students 9th - 12th grade, with at least Algebra I. Do you think >> Python is a good first programming language for someone with zero >> programming experience? Using Linux and Python for first exposure to >> programming languages and principles. >> >>

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Larry Bates
jmDesktop wrote: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and principles. > > Thank you. ABSOLUTELY.

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Arnaud Delobelle
jmDesktop <[EMAIL PROTECTED]> writes: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and principles. I'm not

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread Jeff Schwab
jmDesktop wrote: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and principles. Linux and Python are a nearly

Re: List question

2008-03-22 Thread Jeff Schwab
Zentrader wrote: > On Mar 22, 10:07 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> On Mar 22, 4:38 pm, Zentrader <[EMAIL PROTECTED]> wrote: >> if ('one', 'two') are in f: ... >>> "are" gives me an error in Python 2.5 with a "from future import *" >>> statement included. What version and p

Re: List question

2008-03-22 Thread Zentrader
On Mar 22, 10:07 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > On Mar 22, 4:38 pm, Zentrader <[EMAIL PROTECTED]> wrote: > > > > if ('one', 'two') are in f: ... > > > "are" gives me an error in Python 2.5 with a "from future import *" > > statement included. What version and platform are you ru

Re: List question

2008-03-22 Thread Arnaud Delobelle
On Mar 22, 4:38 pm, Zentrader <[EMAIL PROTECTED]> wrote: > > if ('one', 'two') are in f: ... > > "are" gives me an error in Python 2.5 with a "from future import *" > statement included.  What version and platform are you running.  Also, > the docs don't mention it.http://docs.python.org/ref/keywor

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread André
On Mar 22, 1:40 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > For students 9th - 12th grade, with at least Algebra I. Do you think > Python is a good first programming language for someone with zero > programming experience? Using Linux and Python for first exposure to > programming languages and pr

Do any of you recommend Python as a first programming language?

2008-03-22 Thread jmDesktop
For students 9th - 12th grade, with at least Algebra I. Do you think Python is a good first programming language for someone with zero programming experience? Using Linux and Python for first exposure to programming languages and principles. Thank you. -- http://mail.python.org/mailman/listinfo

Re: List question

2008-03-22 Thread Zentrader
> if ('one', 'two') are in f: ... "are" gives me an error in Python 2.5 with a "from future import *" statement included. What version and platform are you running. Also, the docs don't mention it. http://docs.python.org/ref/keywords.html -- http://mail.python.org/mailman/listinfo/python-list

Re: NameError: name 'guess' is not defined

2008-03-22 Thread Dan Bishop
On Mar 22, 10:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > I am very new to both programming and Pyhton and while trying to do > > some practice using A byte of python an Error pops up on the IDLE > > shell. I am using windows XP. PLease see below. > >

Re: NameError: name 'guess' is not defined

2008-03-22 Thread Gary Herron
[EMAIL PROTECTED] wrote: > I am very new to both programming and Pyhton and while trying to do > some practice using A byte of python an Error pops up on the IDLE > shell. I am using windows XP. PLease see below. > while running: > guess = int(raw_input('Enter an integer : ')) > > if guess == numbe

Re: Subprocess and /usr/bin/dialog

2008-03-22 Thread Grant Edwards
On 2008-03-22, harrelson <[EMAIL PROTECTED]> wrote: >>> proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, >>> stderr=subprocess.STDOUT) >>> stderr_value = proc.communicate()[0] >>> print stderr_value >> dialog displays the widget on stdout. You've connected stdout >> to a pip

Re: NameError: name 'guess' is not defined

2008-03-22 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I am very new to both programming and Pyhton and while trying to do > some practice using A byte of python an Error pops up on the IDLE > shell. I am using windows XP. PLease see below. > while running: > guess = int(raw_input('Enter an integer : ')) > > if guess == nu

Re: Subprocess and /usr/bin/dialog

2008-03-22 Thread harrelson
> > [It would be helpful if you didn't wrap sample code when you > post it.] > > dialog displays the widget on stdout. You've connected stdout > to a pipe, so you're not going to see anything displayed unless > you read data from the stdout pipe and write it to the terminal. Also... if I put the

Re: wxFormBuilder

2008-03-22 Thread sturlamolden
On 22 Mar, 08:10, CM <[EMAIL PROTECTED]> wrote: > Why can't you use Boa Constructor? I really enjoy using it. It feels awkward. I don't know why. -- http://mail.python.org/mailman/listinfo/python-list

NameError: name 'guess' is not defined

2008-03-22 Thread willkab6
I am very new to both programming and Pyhton and while trying to do some practice using A byte of python an Error pops up on the IDLE shell. I am using windows XP. PLease see below. while running: guess = int(raw_input('Enter an integer : ')) if guess == number: print 'Congratulations, you guessed

Re: How to implement command line tool integrating parsing engine

2008-03-22 Thread sturlamolden
On 22 Mar, 14:48, llandre <[EMAIL PROTECTED]> wrote: > - it must run both on linux and windows PC > - it must interact with an electronic device connected to the PC through > serial cable Python should be fine. > - initially the program must be written in the form of simple command > line tool t

Re: Distributing Python Apps on Linux\BSD

2008-03-22 Thread Diez B. Roggisch
PurpleServerMonkey schrieb: > On Mar 22, 2:26 am, Miki <[EMAIL PROTECTED]> wrote: >> Hello, >> >> Disclaimer: I'm not an expert on the subject. >> >>> Setuptools and friends seem to be focused on distributing modules, I'm >>> at the other end of the scale where I want to distribute an entire >>> ap

Re: Subprocess and /usr/bin/dialog

2008-03-22 Thread harrelson
On Mar 21, 3:59 pm, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2008-03-21, harrelson <[EMAIL PROTECTED]> wrote: > > > I am trying to get the below code to work and can't quite make things > > happen. This is with Python 2.5.1. Dialog is doing something odd... > > I have tinkered with different

Re: [RFC] How to implement command line tool integrating parsing engine

2008-03-22 Thread Diez B. Roggisch
llandre schrieb: > Hi all, > > I'd like to have some advices about how to implement a program that has > the following requirements: > - it must run both on linux and windows PC > - it must interact with an electronic device connected to the PC through > serial cable by sending/receiving some co

[RFC] How to implement command line tool integrating parsing engine

2008-03-22 Thread llandre
Hi all, I'd like to have some advices about how to implement a program that has the following requirements: - it must run both on linux and windows PC - it must interact with an electronic device connected to the PC through serial cable by sending/receiving some command strings and taking diffe

Re: finding items that occur more than once in a list

2008-03-22 Thread sturlamolden
On 22 Mar, 09:31, Bryan Olson <[EMAIL PROTECTED]> wrote: > Even a hash function that behaves as a random oracle has > worst-case quadratic-time in the algorithm here In which case inserts are not amortized to O(1). -- http://mail.python.org/mailman/listinfo/python-list

Re: URLError

2008-03-22 Thread Jim
On Mar 20, 7:03 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Thu, 20 Mar 2008 10:26:14 -0700, Jim wrote: > > The program is my first and I'm not a programmer so it will take me some > > time to get your recommendation to work. So far the program runs after I > > added code

Re: Prototype OO

2008-03-22 Thread Diez B. Roggisch
John Machin schrieb: > On Mar 21, 11:48 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > >> [1] Just one example:http://docs.mootools.net/Class/Class.js > > Mootools being something a coworker might use? > I don't understand the question. Diez -- http://mail.python.org/mailman/listinfo/pyt

Re: implementing tab completion using python

2008-03-22 Thread Christian Heimes
Siddhant schrieb: > Hi. > How can I implement a tab-completing code using Python? > Like for example, I want to design a simple shell (using Python, of > course), which could support tab completion as well. How do I go about > it? http://docs.python.org/lib/module-rlcompleter.html Christian --

Re: finding items that occur more than once in a list

2008-03-22 Thread John Machin
On Mar 22, 9:58 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > Lastly, if one deals with a totally ordered set of object but they are > not hashable (there isn't a good hash function), then Ninereeds' idea > of sorting first is still useful. ... and if not totally ordered, then ... I'll just

Re: function-class frustration

2008-03-22 Thread Arnaud Delobelle
On Mar 22, 10:07 am, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 22, 7:19 pm, [EMAIL PROTECTED] wrote: > > > > > On the other hand, are you willing to make changes to the console? > > How big and what?  I was thinking of __ to keep the second-to-last > > most recent command. > > Access to and e

Re: finding items that occur more than once in a list

2008-03-22 Thread Arnaud Delobelle
On Mar 22, 8:31 am, Bryan Olson <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > John Machin wrote: > >> On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote: > >>> A collision sequence is not so rare. > >> [ hash( 2**i ) for i in range( 0, 256, 32 ) ] > >>> [1, 1, 1, 1, 1, 1, 1, 1] > >> Bryan

Re: Can I run a python program from within emacs?

2008-03-22 Thread castironpi
On Mar 22, 3:47 am, David Reitter <[EMAIL PROTECTED]> wrote: > On Mar 20, 3:09 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > > > Hi, I'm trying to learn Python.  I using Aquamac an emac > > implementation with mac os x.  I have a program.  If I go to the > > command prompt and type pythong myprog.py,

implementing tab completion using python

2008-03-22 Thread Siddhant
Hi. How can I implement a tab-completing code using Python? Like for example, I want to design a simple shell (using Python, of course), which could support tab completion as well. How do I go about it? Thanks. Siddhant -- http://mail.python.org/mailman/listinfo/python-list

Re: function-class frustration

2008-03-22 Thread John Machin
On Mar 22, 7:19 pm, [EMAIL PROTECTED] wrote: > > On the other hand, are you willing to make changes to the console? > How big and what? I was thinking of __ to keep the second-to-last > most recent command. Access to and editing of previous input lines is already provided by the cooked mode of t

Re: Can I run a python program from within emacs?

2008-03-22 Thread David Reitter
On Mar 20, 3:09 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to learn Python. I using Aquamac an emac > implementation with mac os x. I have a program. If I go to the > command prompt and type pythong myprog.py, it works. Can the program > be run from within the editor or is that n

Re: Distributing Python Apps on Linux\BSD

2008-03-22 Thread PurpleServerMonkey
On Mar 22, 2:26 am, Miki <[EMAIL PROTECTED]> wrote: > Hello, > > Disclaimer: I'm not an expert on the subject. > > > Setuptools and friends seem to be focused on distributing modules, I'm > > at the other end of the scale where I want to distribute an entire > > application so that an Administrator

Re: finding items that occur more than once in a list

2008-03-22 Thread Bryan Olson
[EMAIL PROTECTED] wrote: > John Machin wrote: >> On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote: >>> A collision sequence is not so rare. >> [ hash( 2**i ) for i in range( 0, 256, 32 ) ] >>> [1, 1, 1, 1, 1, 1, 1, 1] >> Bryan did qualify his remarks: "If we exclude the case where an >> adversary i

function-class frustration

2008-03-22 Thread castironpi
>>> FunctionType.__eq__= 0 Traceback (most recent call last): File "", line 1, in TypeError: can't set attributes of built-in/extension type 'function' >>> type( 'F', ( FunctionType, ), { '__eq__': e } ) Traceback (most recent call last): File "", line 1, in TypeError: type 'function' is not

Re: Is this doable

2008-03-22 Thread fkallgren
On Mar 21, 12:48 pm, fkallgren <[EMAIL PROTECTED]> wrote: > Hi. > > I have a little problem. I have a script that is in the scheduler > (win32). But every now and then I update this script and I dont want > to go to every computer and update it. So now I want the program to 1) > check for new versi

Re: finding items that occur more than once in a list

2008-03-22 Thread castironpi
On Mar 21, 3:39 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Mar 22, 1:11 am, [EMAIL PROTECTED] wrote: > > A collision sequence is not so rare. > > > >>> [ hash( 2**i ) for i in range( 0, 256, 32 ) ] > > > [1, 1, 1, 1, 1, 1, 1, 1] > > Bryan did qualify his remarks: "If we exclude the case where

Re: dividing tuple elements with an int or float

2008-03-22 Thread castironpi
On Mar 21, 1:08 pm, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > Sane programmers replace that crazyness with this code: > > tuple(x+1 for x in y) > > Sane programmers -like D'Aprano, Jerry Hill and me- replace that > crazyness with this code: > > tuple(x/2.5 for x in y) > > Sane programmers don'

Re: wxPython/wxWidgets ok for production use ?

2008-03-22 Thread CM
On Mar 10, 3:27 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > Stefan Behnel wrote: > > Malcolm Greene wrote: > > >>> My personal experience with wxPython has its ups and downs. Specifically > >>> when it comes to crashes, I wouldn't bet my life on it. > > >> I'm new to Python and getting ready to b

Re: wxFormBuilder

2008-03-22 Thread CM
On Mar 20, 9:41 am, sturlamolden <[EMAIL PROTECTED]> wrote: > I just discovered wxFormBuilder. After having tried several GUI > builders for wx (including DialogBlocks, wxGlade, XRCed,Boa > constructor), this is the first one I can actually use. Why can't you use Boa Constructor? I really enjoy u