Re: Mathematics in Python are not correct

2008-05-12 Thread Arnaud Delobelle
Lou Pecora [EMAIL PROTECTED] writes: In article [EMAIL PROTECTED], Terry Reedy [EMAIL PROTECTED] wrote: Mark Dickinson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On May 11, 9:36 pm, Terry Reedy [EMAIL PROTECTED] wrote: | Do you have in mind any situations in which it is

Re: In metaclass, when to use __new__ vs. __init__?

2008-05-12 Thread [EMAIL PROTECTED]
On 12 mai, 18:10, Matthew Wilson [EMAIL PROTECTED] wrote: I have been experimenting with metaclasses lately. It seems possible to define a metaclass by either subclassing type and then either redefining __init__ or __new__. Here's the signature for __init__: def __init__(cls, name,

Python-URL! - weekly Python news and links (May 12)

2008-05-12 Thread Gabriel Genellina
QOTW: With Python, you can program with a smile on your face. - Gary Herron Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before. - Aahz http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4aa1d1578c26950/

Re: Saving an audio file's waveform into an image

2008-05-12 Thread Joshua Kugler
Julien wrote: Hi, I would like to pull out the waveform of an audio file and save it into an image file, for example in GIF format. Is that achievable, and if so, how? Take a look at http://code.enthought.com/projects/chaco/ One of their examples does exactly this. Last example on this

Re: Socket and cycle problem

2008-05-12 Thread Jean-Paul Calderone
On Mon, 12 May 2008 09:19:48 -0700 (PDT), [EMAIL PROTECTED] wrote: [snip] Where is the mistake? I dont know. You cannot reconnect a socket. You need to create a new one for each connection. It's also almost certainly the case that the way you are receiving data is incorrect. There is no

Re: Is there no single/uniform RDBMS access API module for Python ?

2008-05-12 Thread Daniel Fetchinson
Again a noob question. Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it correct to conclude that there is no RDBMS agnostic, single/uniform DB access API for Python ? Something in the lines of JDBC for Java, DBD for Perl etc. ? How is the RDBMS change handled

question about python statements

2008-05-12 Thread Ohad Frand
Hi I am looking for a way to programmically get a list of all python existing statements that I cannot access by __builtins__ or locals() (like [assert,break,class,...]) Thanks, Ohad -- http://mail.python.org/mailman/listinfo/python-list

Learning Python for no reason

2008-05-12 Thread John Salerno
Just something that crosses my mind every time I delve into Learning Python each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning anything at any time, but for something like a programming

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Arnaud Delobelle
Paul Hankin [EMAIL PROTECTED] writes: On May 12, 1:59 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: On May 12, 1:30 pm, John Machin [EMAIL PROTECTED] wrote: Duncan Booth wrote: [...] I think the variant I came up with is a bit clearer: for i in range(1,101): print '%s%s' % (''

Re: Compiling Python using Microsoft Visual C++ 2008

2008-05-12 Thread Martin v. Löwis
See PCbuild/readme.txt. I presume that this is PCbuild8.txt As Christian says: PCbuild/readme.txt are the correct instructions (and had been since Python 2.0 or so). Now, I would like to remove Python 2.5 from VS 2008 but see no obvious way of getting rid of it. You might be able to clear

Re: Learning Python for no reason

2008-05-12 Thread Martin v. Löwis
Hopefully this question even makes sense! I completely agree that you don't need to spend time on learning a language if you don't plan on using it; I'll leave alone the entire discussion of doing things for fun only (you don't *need* to eat ice cream, either - right?) OTOH: do you plan to do

Cannot run Python 3.0a5 )-:

2008-05-12 Thread Sven Siegmund
Hi, I just tried to install Python 3.0a5 an another Windows PC. I did what I have done yesterday at home: 1. Downloaded the daily snapshot http://svn.python.org/snapshots/msi/python-3.0.14011.msi 2. Installed to C:\Python30 3. Added C:\Python30 to the Path environment for all users. when I run

Re: Is there no single/uniform RDBMS access API module for Python ?

2008-05-12 Thread Banibrata Dutta
Thank you all for the pointers and precise information. Python community support surely rocks!! On 5/12/08, Daniel Fetchinson [EMAIL PROTECTED] wrote: Again a noob question. Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it correct to conclude that there is no

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread [EMAIL PROTECTED]
On 12 mai, 09:00, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sat, 10 May 2008 22:12:37 -0300, globalrev [EMAIL PROTECTED] escribió: http://reddit.com/r/programming/info/18td4/comments claims people take a lot of time to write a simple program like this: Write a program that prints

Re: Learning Python for no reason

2008-05-12 Thread Grant Edwards
On 2008-05-12, Martin v. L?wis [EMAIL PROTECTED] wrote: OTOH: do you plan to do any programming at all, in your life? If yes: consider using Python for every programming task you'll encounter - unless there are outside constraints demanding a different language. Python is flexible enough for

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Grant Edwards
On 2008-05-12, Paul Hankin [EMAIL PROTECTED] wrote: for i in xrange(1, 101): print 'Fizz'*(i%31)+'Buzz'*(i%51) or i Doh! It never occured to me that 'string' * 0 == ''. -- Grant Edwards grante Yow! An air of FRENCH FRIES at

Re: Learning Python for no reason

2008-05-12 Thread notbob
On 2008-05-12, John Salerno [EMAIL PROTECTED] wrote: language, I can't help but feel that I will be mostly unable to use what I learn simply because I have no reason to use it. The *process* of learning is enough fun for me, and every now and then I do find a small use for Python that

Re: Learning Python for no reason

2008-05-12 Thread Erich
On May 12, 12:27 pm, John Salerno [EMAIL PROTECTED] wrote: The *process* of learning is enough fun for me, and every now and then I do find a small use for Python that really pays off, but for the most part I'm wondering what people's thoughts are as far as simply learning it for the sake of

Re: Mathematics in Python are not correct

2008-05-12 Thread Arnaud Delobelle
Mark Dickinson [EMAIL PROTECTED] writes: On May 12, 11:15 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: But exp(y*log(x)) - 1 as (x, y) - (0, 0) along any analytic curve which is not the x=0 axis (I think at least - it seems easy to prove that given f and g analytic over R, f(x)*ln g(x) - 0

Re: execfile python3k

2008-05-12 Thread Christian Heimes
Odys schrieb: Hi there, Since execfile() is removed in Python 3.0 I have question about using exec. I know about exec(open('filename').read()) but from documentation the 1st arg of exec can be 'file object'. However exec(open('filename')) does not work. Does anybody have idea

Re: Cannot run Python 3.0a5 )-:

2008-05-12 Thread Martin v. Löwis
Hi, I just tried to install Python 3.0a5 an another Windows PC. I did what I have done yesterday at home: 1. Downloaded the daily snapshot http://svn.python.org/snapshots/msi/python-3.0.14011.msi 2. Installed to C:\Python30 3. Added C:\Python30 to the Path environment for all users.

Re: Cannot run Python 3.0a5 )-:

2008-05-12 Thread Sven Siegmund
Ah, I solved it. I was wrong. I did not do the same as yesterday. Yesterday I downloaded Python 3.0a5 from http://www.python.org/ftp/python/3.0/python-3.0a5.msi and not the daily build. I can python again now (-: S. -- http://mail.python.org/mailman/listinfo/python-list

Inconsistency in retrieving exceptions via sys module

2008-05-12 Thread Raj Bandyopadhyay
Hi I am writing some C code which sets and retrieves a Python exception. I set the exception using PyErr_SetString(), and retrieve it in 2 ways: 1) using PyErr_Occurred() and 2) Using sys.exc_type. However, I get two different results and am very puzzled by this apparent inconsistency. Could

Re: Socket and cycle problem

2008-05-12 Thread petr . poupa
On 12 Kvě, 19:16, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 12 May 2008 09:19:48 -0700 (PDT), [EMAIL PROTECTED] wrote: [snip] Where is the mistake? I dont know. You cannot reconnect a socket. You need to create a new one for each connection. It's also almost certainly the

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Carl Banks
On May 12, 3:42 am, Ben Finney [EMAIL PROTECTED] wrote: Because of the precedent of those names, choosing one of those names doesn't make it clear to the reader that the value is never used; Why is it even necessary to document this? This is the thing that baffles me the most about this

Re: buffering choking sys.stdin.readlines() ?

2008-05-12 Thread cshirky
readlines() reads all of the file into the memory. Try using xreadlines, the generator-version, instead. And I'm not 100% sure, but I *think* doing for line in sys.stdin both work -- many thanks. -clay -- http://mail.python.org/mailman/listinfo/python-list

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Mensanator
On May 11, 7:05 pm, Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote: Mensanator wrote: Ok, I agree with 101, but I wouldn't necessarily say the others were unfortunate. You might be surprised at how often such fixations discover bugs, something that I have a gift for. The discovering,

Re: Learning Python for no reason

2008-05-12 Thread Mensanator
On May 12, 12:27 pm, John Salerno [EMAIL PROTECTED] wrote: Just something that crosses my mind every time I delve into Learning Python each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning

Re: Socket and cycle problem

2008-05-12 Thread Jean-Paul Calderone
On Mon, 12 May 2008 11:16:08 -0700 (PDT), [EMAIL PROTECTED] wrote: [snip] My script send me via 3883 port (VRPN) data, but only once. I need listening this port countinously. So I need make some loop to print data from 3883 port permanent. Data that I recevied looks liek this: receive data

Re: py3k concerns. An example

2008-05-12 Thread Paul McGuire
On Apr 24, 9:21 am, Martin v. Löwis [EMAIL PROTECTED] wrote: Again, to me, this is a non-issue because I've been able to create a cross-version compatible single codebase for pyparsing.  But it was a bit dicey there for a while, and I think other module developers/ maintainers may not be

Re: py3k concerns. An example

2008-05-12 Thread Martin v. Löwis
Well, my concerns about 3.0 continue to be founded. Up until now I have been just reading What's New docs, and relying on input from others as to what changes I will have to make. Yesterday I downloaded and installed 3.0a5, and it is clear that there is *no* way to have a single code base

Re: threading - race condition?

2008-05-12 Thread skunkwerk
On May 11, 1:55 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sun, 11 May 2008 09:16:25 -0700 (PDT),skunkwerk [EMAIL PROTECTED] declaimed the following in comp.lang.python: the only issue i have now is that it takes a long time for 100 threads to initialize that connection (5 minutes)

Re: threading - race condition?

2008-05-12 Thread skunkwerk
On May 12, 1:40 am, Rhamphoryncus [EMAIL PROTECTED] wrote: On May 11, 10:16 am,skunkwerk[EMAIL PROTECTED] wrote: On May 10, 1:31 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Fri, 9 May 2008 08:40:38 -0700 (PDT),skunkwerk[EMAIL PROTECTED] declaimed the following in

Re: threading - race condition?

2008-05-12 Thread skunkwerk
On May 11, 9:10 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Sun, 11 May 2008 13:16:25 -0300,skunkwerk[EMAIL PROTECTED] escribió: the only issue i have now is that it takes a long time for 100 threads to initialize that connection (5 minutes) - and as i'm doing this on a webserver any

Re: question about python statements

2008-05-12 Thread Gary Herron
Ohad Frand wrote: Hi I am looking for a way to programmically get a list of all python existing statements that I cannot access by __builtins__ or locals() (like [assert,break,class,…]) Thanks, Ohad --

Re: Learning Python for no reason

2008-05-12 Thread Dotan Cohen
2008/5/12 Grant Edwards [EMAIL PROTECTED]: For windows/unix hosted user-space applications, Python is pretty hard to beat. Apparently, pythons _can_ be beat: (warning: graphic) http://www.proexotics.com/graphics/ball_python_live_prey_1.jpg Dotan Cohen http://what-is-what.com

Re: Learning Python for no reason

2008-05-12 Thread JustMe
On 12 May, 20:02, Mensanator [EMAIL PROTECTED] wrote: On May 12, 12:27 pm, John Salerno [EMAIL PROTECTED] wrote: Just something that crosses my mind every time I delve into Learning Python each night. Does anyone see any value in learning Python when you don't need to for school, work, or

downloading a link with javascript in it..

2008-05-12 Thread Jetus
I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the view link. I don't know how to automate this next part of my script. It seems like it uses Javascript. The line in the page source says

thread stomp?

2008-05-12 Thread pyn3wb
class1 (threading.Thread): def __init__(self, dir): self.dir = dir threading.Thread.__init__(self) def run(self): do stuff in dir here... class2 (threading.Thread): def __init__(self, dir, dir2):

Re: downloading a link with javascript in it..

2008-05-12 Thread Diez B. Roggisch
Jetus schrieb: I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the view link. I don't know how to automate this next part of my script. It seems like it uses Javascript. The line in the page source says

Re: thread stomp?

2008-05-12 Thread D'Arcy J.M. Cain
On Mon, 12 May 2008 20:00:52 GMT pyn3wb [EMAIL PROTECTED] wrote: class1 (threading.Thread): ^ SyntaxError: invalid syntax Give us a script that works. Ideally it should output something that indicates what the error is. //run over files This is not a

Re: threading - race condition?

2008-05-12 Thread Rhamphoryncus
On May 12, 1:31 pm, skunkwerk [EMAIL PROTECTED] wrote: On May 12, 1:40 am, Rhamphoryncus [EMAIL PROTECTED] wrote: On May 11, 10:16 am,skunkwerk[EMAIL PROTECTED] wrote: On May 10, 1:31 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Fri, 9 May 2008 08:40:38 -0700

Re: thread stomp?

2008-05-12 Thread Jerry Hill
On Mon, May 12, 2008 at 4:00 PM, pyn3wb [EMAIL PROTECTED] wrote: class main Why are you making main a class? It should almost certainly be a function (defined with def, not class). for i in dircache.listdir(dir): //run over files class1(dir).start()

Re: Learning Python for no reason

2008-05-12 Thread Matthew Woodcraft
John Salerno [EMAIL PROTECTED] wrote: Just something that crosses my mind every time I delve into Learning Python each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning anything at any

Re: Import/Create module from buffer

2008-05-12 Thread Gabriel Genellina
En Mon, 12 May 2008 08:09:45 -0300, Gruik [EMAIL PROTECTED] escribió: On May 12, 12:31 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Mon, 12 May 2008 05:49:22 -0300, Gruik [EMAIL PROTECTED] escribió: I'm currently working on python embedding with C++. My goal is that the C++ part

Re: Python-list Digest, Vol 56, Issue 204

2008-05-12 Thread Gareth Owen
On Monday 12 May 2008 14:55:06 [EMAIL PROTECTED] wrote: Send Python-list mailing list submissions to python-list@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/python-list or, via email, send a message with subject or

Re: Learning Python for no reason

2008-05-12 Thread king kikapu
Same for me here too! C# on the work, Python earning at the evening. I am bored to death with so many .net/C# years and i wanted to learn something different and cross platform. I think it will pay back some time... On May 12, 10:50 pm, JustMe [EMAIL PROTECTED] wrote: On 12 May, 20:02,

using PIL for good screenshots

2008-05-12 Thread Tim Arnold
Hi, I'm using PIL to enhance screenshots for print and online publication. I'm writing to see if someone else is doing similar work. The shots are dialogs, menus, etc. -- my workflow to create the print images: (1) writer takes screenshot on Windows XP box (96dpi) -- ***

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Terry Reedy
Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] En Sat, 10 May 2008 22:12:37 -0300, globalrev [EMAIL PROTECTED] escribió: | (We used this question last year - some people gave a sensible answer | in less | than 5 minutes, but others did not even know how to start)

Re: python vs. grep

2008-05-12 Thread Ricardo Aráoz
Ville Vainio wrote: On May 8, 8:11 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: All these examples assume your regular expression will not span multiple lines, but this can easily be the case. How would you process the file with regular expressions that span multiple lines? re.findall/

Re: Learning Python for no reason

2008-05-12 Thread CM
On May 12, 1:27 pm, John Salerno [EMAIL PROTECTED] wrote: Just something that crosses my mind every time I delve into Learning Python each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason? I mean, sure, there's value in learning

Re: anonymous assignment

2008-05-12 Thread Terry Reedy
Arnaud Delobelle [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] here is a very sophisticated implementation :) def extract(indices, seq): ... return tuple(seq[i] for i in indices) ... y, d = extract((0, 2), time.localtime()) y, d (2008, 12) === Or a generator

Re: downloading a link with javascript in it..

2008-05-12 Thread 7stud
On May 12, 1:54 pm, Jetus [EMAIL PROTECTED] wrote: I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the view link. I don't know how to automate this next part of my script. It seems like it uses

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Ben Finney
Carl Banks [EMAIL PROTECTED] writes: IMHO, whether a varibale is used or not has got to be one of the least important things of all (in no small part because it's easily discernable from nearby code). I couldn't disagree more. If you're binding a name to a value that will never be used,

Re: downloading a link with javascript in it..

2008-05-12 Thread 7stud
On May 12, 4:59 pm, 7stud [EMAIL PROTECTED] wrote: On May 12, 1:54 pm, Jetus [EMAIL PROTECTED] wrote: I am able to download this page (enclosed code), but I then want to download a pdf file that I can view in a regular browser by clicking on the view link. I don't know how to automate this

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Carl Banks
On May 12, 7:03 pm, Ben Finney [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] writes: IMHO, whether a varibale is used or not has got to be one of the least important things of all (in no small part because it's easily discernable from nearby code). I couldn't disagree more. If

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Terry Reedy
Ben Finney [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | So, when not using the values that come from the controlling iterator, | it's good to make that explicit. If Python supported it, we might | prefer to use no name at all for something that isn't used, but the | 'for' syntax

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Kam-Hung Soh
On Tue, 13 May 2008 03:42:30 +1000, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I just can't believe someone applying for a programmer position cannot provide a sensible anwser in 5 or less minutes. You should join the recruitment and interview panel in your organization to test your

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread John Machin
Terry Reedy wrote: Gabriel Genellina [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] En Sat, 10 May 2008 22:12:37 -0300, globalrev [EMAIL PROTECTED] escribió: | (We used this question last year - some people gave a sensible answer | in less | than 5 minutes, but others did not even

Re: question about python statements

2008-05-12 Thread Terry Reedy
Ohad Frand [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I am looking for a way to programmically get a list of all python | existing statements that I cannot access by __builtins__ or locals() | (like [assert,break,class,...]) You appear to want the keywords that begin

Python and Flaming Thunder

2008-05-12 Thread Dave Parker
I've read that one of the design goals of Python was to create an easy- to-use English-like language. That's also one of the design goals of Flaming Thunder at http://www.flamingthunder.com/ , which has proven easy enough for even elementary school students, even though it is designed for

Re: Learning Python for no reason

2008-05-12 Thread Chuckk Hubbard
I'm another one pretty early in his programming education, but here's my take. Python was specifically recommended to me by a few people for a specific program I wanted to write (userspace, GUI, music). While I gradually learn more about it, I start to spend a lot of time on certain aspects I

Re: python vs. grep

2008-05-12 Thread Kam-Hung Soh
On Tue, 13 May 2008 00:03:08 +1000, Ricardo Aráoz [EMAIL PROTECTED] wrote: Ville Vainio wrote: On May 8, 8:11 pm, Ricardo Aráoz [EMAIL PROTECTED] wrote: All these examples assume your regular expression will not span multiple lines, but this can easily be the case. How would you process

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread Dave Parker
On May 10, 8:19 pm, John Salerno [EMAIL PROTECTED] wrote: It seems somewhat artificial to use the for loop to do something a certain number of times, like above. I agree; it's a common flaw with lots of languages, not just Python. I'd be inclined to use something like: FOR 8 TIMES DO

Re: using PIL for good screenshots

2008-05-12 Thread python
Tim, Sounds like an interesting project. Have you considered using SnagIt to produce your screenshots? www.TechSmith.com/SnagIt Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket and cycle problem

2008-05-12 Thread castironpi
On May 12, 2:06 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 12 May 2008 11:16:08 -0700 (PDT), [EMAIL PROTECTED] wrote: [snip] My script send me via 3883 port (VRPN) data, but only once. I need listening this port countinously. So I need  make some loop to print data from 3883

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 6:39 pm, Dave Parker [EMAIL PROTECTED] wrote: I've read that one of the design goals of Python was to create an easy- to-use English-like language.  That's also one of the design goals of Flaming Thunder athttp://www.flamingthunder.com/ , which has proven easy enough for even

Popen pipe hang

2008-05-12 Thread schickb
I'm trying to pipe data that starts life in an array('B') object through several processes. The code below is a simplified example. The data makes it through, but the wait() always hangs. Is there a better way to indicate src.stdin has reach EOF? from subprocess import Popen, PIPE from array

Sparse Matrix Multiplications

2008-05-12 Thread dingo_1980
I was trying to create a sparse matrix using scipy.sparse (10 X 10) with just the first row and first column filled with ones. Lets call this matrix Asp. This is how I created Asp from scipy import sparse Asp = scipy.lil_matrix(10,10) for i in range(10): Asp[i,0] = i

Re: Python and Flaming Thunder

2008-05-12 Thread Dave Parker
On May 12, 6:32 pm, [EMAIL PROTECTED] wrote: Can you render some furniture for me... to try to see some human posture to lowest energy levels. Not yet; Flaming Thunder doesn't have built-in graphics yet. But we're incorporating the graphics from www.dpgraph.com , so when that's finished, then

Re: Python and Flaming Thunder

2008-05-12 Thread Dave Parker
On May 12, 6:32 pm, [EMAIL PROTECTED] wrote: Can you render some furniture for me... to try to see some human posture to lowest energy levels. I couldn't find any furniture created using DPGraph, but the math art gallery at http://www.dpgraph.com/math-art.html has a sailboat, an F15, Tux (the

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 7:59 pm, Dave Parker [EMAIL PROTECTED] wrote: On May 12, 6:32 pm, [EMAIL PROTECTED] wrote: Can you render some furniture for me... to try to see some human posture to lowest energy levels. I couldn't find any furniture created using DPGraph, but the math art gallery

Re: question about python statements

2008-05-12 Thread George Sakkis
On May 12, 7:35 pm, Terry Reedy [EMAIL PROTECTED] wrote: Ohad Frand [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I am looking for a way to programmically get a list of all python | existing statements that I cannot access by __builtins__ or locals() | (like

Re: Learning Python for no reason

2008-05-12 Thread castironpi
Anyway, Chuck's post doesn't question any of the competencies of computer science. Is it safe to name-call silly, or have -I- by disdesign misinterpreted? On May 12, 6:41 pm, Chuckk Hubbard [EMAIL PROTECTED] wrote: I'm another one pretty early in his programming education, but here's my take.

Re: Python and Flaming Thunder

2008-05-12 Thread Dave Parker
On May 12, 7:12 pm, [EMAIL PROTECTED] wrote: Mine's been always messing up the color wheel. Messing up in what way? Are you using the colors to visualize something? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Flaming Thunder

2008-05-12 Thread castironpi
On May 12, 8:18 pm, Dave Parker [EMAIL PROTECTED] wrote: On May 12, 7:12 pm, [EMAIL PROTECTED] wrote: Mine's been always messing up the color wheel. Messing up in what way?  Are you using the colors to visualize something? In a manner of speaking. I'm a first-time-live Information

Re: PyGame, window is not closing, tut not helping

2008-05-12 Thread JL
If the game runs normally without IDLE, then, to run it from IDLE, add pygame.quit() at the end of the script: if __name__ == __main__: MainWindow = PyManMain() MainWindow.MainLoop() pygame.quit() ... and just before the sys.exit(): def MainLoop(self): This is the Main

Re: Python and Flaming Thunder

2008-05-12 Thread Dave Parker
On May 12, 7:20 pm, [EMAIL PROTECTED] wrote:  Yes, I am trying to visualize something. If it is related to making furniture comfortable for humans, have you considered painting the furniture with thermochromic paint ( http://en.wikipedia.org/wiki/Thermochromism )? It changes color in response to

Re: Is using range() in for loops really Pythonic?

2008-05-12 Thread George Sakkis
On May 12, 7:03 pm, Ben Finney [EMAIL PROTECTED] wrote: Carl Banks [EMAIL PROTECTED] writes: IMHO, whether a varibale is used or not has got to be one of the least important things of all (in no small part because it's easily discernable from nearby code). I couldn't disagree more. If

how to get information of a running prog in python

2008-05-12 Thread Jimmy
Well, i know it may be a little non-python thing, however, I can think of no place better to post this question :) can anyone tell me, in python, how to obtain some information of a running program? paticularly, if i am playing some music in audacious or other media player, how can i get the the

Re: Popen pipe hang

2008-05-12 Thread Jean-Paul Calderone
On Mon, 12 May 2008 17:35:44 -0700 (PDT), schickb [EMAIL PROTECTED] wrote: I'm trying to pipe data that starts life in an array('B') object through several processes. The code below is a simplified example. The data makes it through, but the wait() always hangs. Is there a better way to indicate

Re: how to get information of a running prog in python

2008-05-12 Thread Dan Upton
On Mon, May 12, 2008 at 10:19 PM, Jimmy [EMAIL PROTECTED] wrote: Well, i know it may be a little non-python thing, however, I can think of no place better to post this question :) can anyone tell me, in python, how to obtain some information of a running program? paticularly, if i am

Re: question about python statements

2008-05-12 Thread Terry Reedy
George Sakkis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On May 12, 7:35 pm, Terry Reedy [EMAIL PROTECTED] wrote: Ohad Frand [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | I am looking for a way to programmically get a list of all python | existing statements

Re: frameword vs application server?

2008-05-12 Thread walterbyrd
On May 12, 8:34 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: As mentioned above - in some aspects, that is not really needed. But if you want more of an app-server, have a look at ZOPE, Kamaelia and maybe even twisted. Thanks. Kamaelia reminds me of SOA - loosely coupled software services

Re: anonymous assignment

2008-05-12 Thread Scott David Daniels
Yves Dorfsman wrote: ... Sorry this was a typo (again :-), I meant: d = time.local() y = d[0] d = d[2] Then: y, d = list(time.localtime())[:4:2] --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread alex23
[EMAIL PROTECTED] wrote: I just can't believe someone applying for a programmer position cannot provide a sensible anwser in 5 or less minutes. Try taking a look at the level of discourse in the Google App Engine group. It's pretty clear that some - let's say developers rather than programmers

Re: Learning Python for no reason

2008-05-12 Thread alex23
On May 13, 5:50 am, JustMe [EMAIL PROTECTED] wrote: I'm in the same boat. My work seems fixated with .Net but IMHO I think they would be better off going with Python. Still, who am I to stand in the way of hundreds of .Net programmers. You could always be the hero who teaches them IronPython

Re: how to get information of a running prog in python

2008-05-12 Thread Jimmy
On May 13, 10:36 am, Dan Upton [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 10:19 PM, Jimmy [EMAIL PROTECTED] wrote: Well, i know it may be a little non-python thing, however, I can think of no place better to post this question :) can anyone tell me, in python, how to obtain some

Re: how to get information of a running prog in python

2008-05-12 Thread Ivan Illarionov
On Mon, 12 May 2008 19:19:05 -0700, Jimmy wrote: Well, i know it may be a little non-python thing, however, I can think of no place better to post this question :) can anyone tell me, in python, how to obtain some information of a running program? paticularly, if i am playing some music in

Re: anonymous assignment

2008-05-12 Thread Yves Dorfsman
Gabriel Genellina wrote: Uses Python 2.6! ;) No need of 2.6 - the above code works since Python 2.2 at least: Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import time t=time.localtime() type(t) type

Re: how to get information of a running prog in python

2008-05-12 Thread Dan Upton
On Mon, May 12, 2008 at 11:02 PM, Jimmy [EMAIL PROTECTED] wrote: On May 13, 10:36 am, Dan Upton [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 10:19 PM, Jimmy [EMAIL PROTECTED] wrote: Well, i know it may be a little non-python thing, however, I can think of no place better to post

Re: anonymous assignment

2008-05-12 Thread Yves Dorfsman
Ben Finney wrote: y, _, d, _, _, _, _, _, _ = time.localtime() But you still have have a variable that's using memory for nothing. No, you have one extra unused name binding. The values that you don't want to use have *already* been allocated by the time the above statement is executed.

Re: anonymous assignment

2008-05-12 Thread Yves Dorfsman
Scott David Daniels wrote: Yves Dorfsman wrote: ... Sorry this was a typo (again :-), I meant: d = time.local() y = d[0] d = d[2] Then: y, d = list(time.localtime())[:4:2] What is this ? Could you point me to a document on this syntax ? I've tried it, it works, but I don't

Re: anonymous assignment

2008-05-12 Thread Yves Dorfsman
Marc 'BlackJack' Rintsch wrote: y, _, d, _, _, _, _, _, _ = time.localtime() But you still have have a variable that's using memory for nothing. I find this unsatisfactory... Get over it… Than what's the point of wanting a better language if every time we run in something that looks

Re: how to get information of a running prog in python

2008-05-12 Thread George Sakkis
On May 12, 11:02 pm, Jimmy [EMAIL PROTECTED] wrote: On May 13, 10:36 am, Dan Upton [EMAIL PROTECTED] wrote: On Mon, May 12, 2008 at 10:19 PM, Jimmy [EMAIL PROTECTED] wrote: Well, i know it may be a little non-python thing, however, I can think  of no place better to post this question

Chinese names in Python source

2008-05-12 Thread [EMAIL PROTECTED]
It's probably not news to anyone here that Python 3 gives us access to the unicode codespace for Python names, not just string literals, meaning our functions and classes, lists and dictionaries, might go outside Latin-1 for their source code representation. I have an example in my blog:

Re: Popen pipe hang

2008-05-12 Thread schickb
On May 12, 7:35 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote: from subprocess import Popen, PIPE from array import array arr = array('B') arr.fromstring(hello\n) src = Popen( [cat], stdin=PIPE, stdout=PIPE) dst = Popen( [cat], stdin=src.stdout) arr.tofile(src.stdin) src.stdin.close()

Re: Learning Python for no reason

2008-05-12 Thread John Salerno
Matthew Woodcraft wrote: I can't tell from what you wrote whether you feel you won't have any reason to do any programming, or whether you already know several other programming languages and you feel you won't have any reason to use Python in particular. Definitely the former. I've loved

Re: Learning Python for no reason

2008-05-12 Thread John Salerno
notbob wrote: On 2008-05-12, John Salerno [EMAIL PROTECTED] wrote: language, I can't help but feel that I will be mostly unable to use what I learn simply because I have no reason to use it. The *process* of learning is enough fun for me, and every now and then I do find a small use for

Re: Learning Python for no reason

2008-05-12 Thread John Salerno
Martin v. Löwis wrote: OTOH: do you plan to do any programming at all, in your life? If yes: consider using Python for every programming task you'll encounter Yeah, I do plan to use it for fun (if I can think of little projects to work on!), and Python is definitely the only language I care

<    1   2   3   >