Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 21, 4:04 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 20 Mar 2008 16:50:18 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: I received a direct email from someone, and I came up with the following after implementing his advice:

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 using

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 build a small

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't write

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 an adversary is

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 version of

function-class frustration

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

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 is choosing the

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 can run a

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 not

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 the

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: 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, it works.  

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 did qualify his remarks:

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 editing of

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 stand

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: 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/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 based

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

[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

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 command

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: 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 application so that

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 that is

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

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

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 dialog

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 == number:

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 pipe, so you're not

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 == number:

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. while running:

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

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. --

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

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/keywords.html

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 running. Also,

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 platform are you

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: 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 from

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. Get

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. Thank you.

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 for first

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: 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 did qualify his remarks:

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 best

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. Access to

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, wrapperA { void handleMessage(void *message) {

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

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

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 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

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: If I

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: 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

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

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

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

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, or

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: 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: 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. As

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 Interesting.

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 not

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 Linux and

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: 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 ask

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: 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 this:

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: 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 understand the

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 {

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 wrong

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 this

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: snip 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 picture (

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: 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

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, and merge

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

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 scheduling

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_long)) LPHANDLE

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 do you mean

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 resource

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 resource

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 resource

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 basic

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 concentrating

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 I

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 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 would be a

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 damn (except

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 fix this, you'll

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.

[issue908441] default index for __getslice__ is not sys.maxint

2008-03-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Closing as Fixed. -- nosy: +georg.brandl resolution: - fixed status: open - closed Tracker [EMAIL PROTECTED] http://bugs.python.org/issue908441

[issue1918] weak references are removed before __del__ is called.

2008-03-22 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Done in r61733. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1918 __ ___ Python-bugs-list

[issue2349] Py3K warn against assigning to True/False

2008-03-22 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Keep what you've got but don't lose sleep if some offbeat case is not covered. -- assignee: rhettinger - brett.cannon __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2349

[issue1721812] A subclass of set doesn't always have __init__ called.

2008-03-22 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Attaching a possible fix (untested). -- keywords: +patch Added file: http://bugs.python.org/file9809/set.diff _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1721812

[issue1943] improved allocation of PyUnicode objects

2008-03-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg [EMAIL PROTECTED] added the comment: I wasn't clear enough: my point was that your free list patch would probably benefit from some tuning of the cut-off parameters. 15 characters appears to be too small (see the HISTORY file histogram). You'll likely get better results for

[issue1605] Semi autogenerated _types module

2008-03-22 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Fri, Mar 21, 2008 at 11:06 PM, Guido van Rossum [EMAIL PROTECTED] wrote: Guido van Rossum [EMAIL PROTECTED] added the comment: Well, okay. I still think we should expose these core interpreter types somehow, so people can

[issue1477] UnicodeDecodeError that cannot be caught in narrow unicode builds

2008-03-22 Thread Walter Dörwald
Walter Dörwald [EMAIL PROTECTED] added the comment: The patch looks goog to me now. Go ahead and check it in. -- assignee: doerwalter - amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1477 __

  1   2   >