Announcing a feature update (v1.3) of YaMA, the meeting assistant

2008-05-12 Thread Atul
Hi, Yet Another Meeting Assistant (YaMA), will help you with the Agenda, Meeting Invitations, Minutes of a Meeting as well as Action Items. If you are the assigned minute taker at any meeting, this tool is for you. Checkout http://yama.sourceforge.net/ YaMA is written in Python and Tkinter, is

Re: Mathematics in Python are not correct

2008-05-12 Thread Terry Reedy
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 advantageous to have 0**0 | undefined? | (Playing devil's advocate here.) If you regard x**y as exp(y*log(x))

Re: anonymous assignment

2008-05-12 Thread Marc 'BlackJack' Rintsch
On Mon, 12 May 2008 03:40:03 +, Yves Dorfsman wrote: Paul Rubin wrote: You can just use a variable name than you ignore. It's traditional to use _ but it's not a special keyword, it's just a another variable name: y, _, d, _, _, _, _, _, _ = time.localtime() But you still have

Re: Best technology for agent/web server architecture

2008-05-12 Thread Gabriel Genellina
2008/5/8 M.-A. Lemburg [EMAIL PROTECTED]: SOAP would be a good choice if you want to send to data to other servers as well, e.g. Java-based ones. XML-RPC and JSON are better for simple data structures. If you have control over both client and server and don't need to bother with other

hai friends

2008-05-12 Thread chandran . ramu1
hai dear, may all good things come into your life today and always www.goodhistory5.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

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

2008-05-12 Thread Ben Finney
Ivan Illarionov [EMAIL PROTECTED] writes: In such cases, the name 'dummy' is conventionally bound to the items from the iterator, for clarity of purpose [..] If a value isn't used, then I think the most clear name for it is unused. [...] Maybe my brain works differently, but I find

Re: cgitb performance issue

2008-05-12 Thread Gabriel Genellina
En Mon, 05 May 2008 15:56:26 -0300, Ethan Furman [EMAIL PROTECTED] escribió: I tried adding a form to our website for uploading large files. Personally, I dislike the forms that tell you you did something wrong and make you re-enter *all* your data again, so this one cycles and remembers your

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

2008-05-12 Thread Paddy
On May 11, 9:28 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: Hi John, Arnaud; Contrived example: # Print 'hello' 10 times; x is not used for x in xrange(10): print 'hello' I've used Fortran and C and so would tend to use either i,j,k as the unused loop variable above, or, for clarity,

Re: anonymous assignment

2008-05-12 Thread Ben Finney
Yves Dorfsman [EMAIL PROTECTED] writes: Paul Rubin wrote: Yves Dorfsman [EMAIL PROTECTED] writes: import time y, None, d, None, None, None, None = time.localtime() I know you can't assign anything to None, but I'm sure you get what I mean, a special keyword that means I don't care

Re: anonymous assignment

2008-05-12 Thread Arnaud Delobelle
Yves Dorfsman [EMAIL PROTECTED] writes: Is there anyway to tell python I don't care about a value ? Say I want today's year and day, I'd like to do something like: import time y, None, d, None, None, None, None = time.localtime() I know you can't assign anything to None, but I'm sure you

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 11, 11:42 pm, Larry Hale [EMAIL PROTECTED] wrote: THANKS, AGAIN, for the reply! :) Okay, now I -really- feel silly... : So, when I was going to try what you'd suggested, I noticed something peculiar: I hadn't changed anything on my system, but now, when I tried to import magic I

Re: computing with characters

2008-05-12 Thread Gabriel Genellina
En Tue, 06 May 2008 08:16:55 -0300, [EMAIL PROTECTED] escribió: I tend to do , .join(%s % e for e in item) Is there any difference between this and str()? Use the timeit module to measure performance: C:\TEMPpython -m timeit for i in xrange(1): str(i) 10 loops, best of 3: 81.8 msec per

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

2008-05-12 Thread Laszlo Nagy
Banibrata Dutta írta: Hi, 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

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

2008-05-12 Thread Banibrata Dutta
On 5/12/08, Laszlo Nagy [EMAIL PROTECTED] wrote: Banibrata Dutta írta: Hi, 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

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

2008-05-12 Thread Banibrata Dutta
Found that SnakeSQL does implement DB2.0 API. However are there such implementations for MySQL ? On 5/12/08, Banibrata Dutta [EMAIL PROTECTED] wrote: On 5/12/08, Laszlo Nagy [EMAIL PROTECTED] wrote: Banibrata Dutta írta: Hi, Again a noob question. Based on this URL

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 11, 11:42 pm, Larry Hale [EMAIL PROTECTED] wrote: THANKS, AGAIN, for the reply! :) Okay, now I -really- feel silly... : So, when I was going to try what you'd suggested, I noticed something peculiar: I hadn't changed anything on my system, but now, when I tried to import magic I

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

2008-05-12 Thread Ivan Illarionov
On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote: [...] That is also regrettably common in Python code. It still suffers from being unnecessarily ambiguous, since there are *also* plenty of loops using 'i', 'j', etc. where the loop counter *is* used. Differentiating these use cases by

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Gabriel Genellina
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 the numbers from 1 to 100. But for multiples of three print Fizz

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 12, 1:34 am, Larry Hale [EMAIL PROTECTED] wrote: The file source (previously linked from http://hupp.org/adam/hg/python-magic/) has the man pages... Err... I meant http://downloads.sourceforge.net/gnuwin32/file-4.21- bin.zip?modtime=1180175868big_mirror=1! :) --

Re: Module python-magic on/for Windows?

2008-05-12 Thread Larry Hale
On May 12, 1:34 am, Larry Hale [EMAIL PROTECTED] wrote: The file source (previously linked from http://hupp.org/adam/hg/python-magic/) has the man pages... Err... I meant http://downloads.sourceforge.net/gnuwin32/file-4.21- bin.zip?modtime=1180175868big_mirror=1! :) --

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

2008-05-12 Thread Roel Schroeven
John Salerno schreef: Ben Finney wrote: John Salerno [EMAIL PROTECTED] writes: num = 33 for x in xrange(10): print num += 1 Which is better done by 'num += 10'. Can you come up with an example that isn't trivially replaced with clearer code? That might make it clearer what your

module global variables

2008-05-12 Thread pistacchio
hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and the Bartender

2008-05-12 Thread Aspersieman
[EMAIL PROTECTED] wrote: Incidentally, now that everyone knows English, writer would like to critique his behavior. I have leaned to the group for approval, at times by disparaging the efforts of others, but other times not. I have expressed negative emotion. Is anyone in earshot getting work

Re: File Creation Not Working In A Thread Class?

2008-05-12 Thread Duncan Booth
bc90021 [EMAIL PROTECTED] wrote: On Sun, 11 May 2008 19:55:31 +, Duncan Booth wrote: 7stud [EMAIL PROTECTED] wrote:                             tempfileName = \proctemp\\                             + self.matrix[c][0] + _other.txt\ It wouldn't

Re: Problem with custom events in wxpython

2008-05-12 Thread Jimmy
On May 11, 11:27 pm, Frank Niessink [EMAIL PROTECTED] wrote: Hi Jimmy, 2008/5/11 Jimmy [EMAIL PROTECTED]: hi, all I'm having a problem with creating custom events in wxpython. I have a class A handling some data processing work and another class B of GUI matter. I need GUI to display

Re: Python doesn't recognize quote types

2008-05-12 Thread Duncan Booth
Dennis Lee Bieber [EMAIL PROTECTED] wrote: The sloppy use of single quote for the apostrophe is unfortunate G True, but that problem is outside of the Python community's control. Given that people do often refer to single quote when they mean apostrophe the error message should be written

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

2008-05-12 Thread Ben Finney
Ivan Illarionov [EMAIL PROTECTED] writes: On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote: [...] That is also regrettably common in Python code. It still suffers from being unnecessarily ambiguous, since there are *also* plenty of loops using 'i', 'j', etc. where the loop counter

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

2008-05-12 Thread Ben Finney
Paddy [EMAIL PROTECTED] writes: I've used Fortran and C and so would tend to use either i,j,k as the unused loop variable above, or, for clarity, call it something descriptive like loop_count, if the loop body would be clearer. The problem with all of these names is that they also have long

Re: source beautifier

2008-05-12 Thread Marco Mariani
Stefan Behnel wrote: http://www.polystyle.com/features/python-beautifier.jsp I've never used it, but the example is quite clear. I tend to believe that running these tools on some average Python code would not even change whitespace. ;) I bet it's idempotent against _your_ code, but not in

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread bockman
On 12 Mag, 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: module global variables

2008-05-12 Thread alex23
On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? thanks module = __import__('module', globals=globals()) I think that's what you're

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? thanks module =

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:10, pistacchio [EMAIL PROTECTED] wrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Arnaud Delobelle
On May 11, 4:36 am, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-05-11, John Machin [EMAIL PROTECTED] wrote: Write a program that prints the numbers from 1 to 100. But for multiples of three print Fizz instead of the number and for the multiples of five print Buzz. For numbers which

Re: threading - race condition?

2008-05-12 Thread Rhamphoryncus
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 comp.lang.python: Coming in late... On May 9, 12:12 am, John

Re: module global variables

2008-05-12 Thread Marco Mariani
pistacchio wrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global variables to act as module's global variables? Are you positively

Import/Create module from buffer

2008-05-12 Thread Gruik
Hi people, I'm currently working on python embedding with C++. My goal is that the C++ part handle files writing/reading so that the Python part only works with buffers. I succeeded in buffer exchanges. The problem is that some of the files I read/write are python files so that, before

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Arnaud Delobelle
On May 12, 9:30 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: [...] # FizzBuzzer in action: fizzbuzz = FizzBuzzer((3, 'Fizz'), (5, 'Buzz')) for val in fizzbuzz[1:21]: ...     print val ... 1 21 1 Ignore this, it's debugging output 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz

Re: anonymous assignment

2008-05-12 Thread Arnaud Delobelle
On May 12, 7:31 am, Arnaud Delobelle [EMAIL PROTECTED] wrote: Yves Dorfsman [EMAIL PROTECTED] writes: Is there anyway to tell python I don't care about a value ? Say I want today's year and day, I'd like to do something like: import time y, None, d, None, None, None, None =

Re: module global variables

2008-05-12 Thread pistacchio
On 12 Mag, 10:47, Marco Mariani [EMAIL PROTECTED] wrote: pistacchio wrote: On 12 Mag, 10:01, alex23 [EMAIL PROTECTED] wrote: On May 12, 5:17 pm, pistacchio [EMAIL PROTECTED] wrote: hi to all! can i load a module passing to it, automatically and as default, all the caller's global

Re: Problem with custom events in wxpython

2008-05-12 Thread Frank Niessink
Hi Jimmy, 2008/5/12 Jimmy [EMAIL PROTECTED]: On May 11, 11:27 pm, Frank Niessink [EMAIL PROTECTED] wrote: 2008/5/11 Jimmy [EMAIL PROTECTED]: I have a class A handling some data processing work and another class B of GUI matter. I need GUI to display information when data in A is

Re: Problem with help() in python/ipython interpreters

2008-05-12 Thread Gabriel Genellina
En Fri, 09 May 2008 20:45:09 -0300, Casey [EMAIL PROTECTED] escribió: I'm running python 2.5.2 on WinXP. I've always used a GUI for interactive development, but I wanted to try out ipython which better supports matplotlib in this mode. Unfortunately, whenever I try to use help() I get the

Re: Best technology for agent/web server architecture

2008-05-12 Thread Irmen de Jong
Gabriel Genellina wrote: 2008/5/8 M.-A. Lemburg [EMAIL PROTECTED]: SOAP would be a good choice if you want to send to data to other servers as well, e.g. Java-based ones. XML-RPC and JSON are better for simple data structures. If you have control over both client and server and don't need to

Re: anonymous assignment

2008-05-12 Thread Michele Simionato
On May 12, 4:28 am, Yves Dorfsman [EMAIL PROTECTED] wrote: there's got to be a better way than: d = time.local() y = d[0] d = d[1] Uses Python 2.6! ;) Python 2.6a3 (r26a3:62861, May 12 2008, 11:41:56) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for

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

2008-05-12 Thread Gabriel Genellina
En Mon, 12 May 2008 03:52:59 -0300, Banibrata Dutta [EMAIL PROTECTED] escribió: Found that SnakeSQL does implement DB2.0 API. However are there such implementations for MySQL ? MySQLdb -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

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

2008-05-12 Thread Ivan Illarionov
On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote: [...] That is also regrettably common in Python code. It still suffers from being unnecessarily ambiguous, since there are *also* plenty of loops using 'i', 'j', etc. where the loop counter *is* used. Differentiating these use cases

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Chris
On May 11, 3:12 am, globalrev [EMAIL PROTECTED] wrote: 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 the numbers from 1 to 100. But for multiples of three print Fizz instead of the number

artificiall, agent, movement

2008-05-12 Thread Iman
hi i'm working on some simulation project . i'm going to simulate traffic of a city. this simulation has cars , passengers , non-movable objects and Traffic signals . i've made cars as intelligent agent . it has thinking method , changing states agents ... the main problem is i have problem to

Re: anonymous assignment

2008-05-12 Thread Gabriel Genellina
En Mon, 12 May 2008 06:45:40 -0300, Michele Simionato [EMAIL PROTECTED] escribió: On May 12, 4:28 am, Yves Dorfsman [EMAIL PROTECTED] wrote: there's got to be a better way than: d = time.local() y = d[0] d = d[1] Uses Python 2.6! ;) Python 2.6a3 (r26a3:62861, May 12 2008, 11:41:56)

Re: Import/Create module from buffer

2008-05-12 Thread Gabriel Genellina
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 handle files writing/reading so that the Python part only works with buffers. I succeeded in buffer exchanges. The problem is that some of

Re: python without while and other explosive statements

2008-05-12 Thread ivo talvet
thanks for the tips, pam limits and http://codepad.org/ are both interesting tracks. Ivo 2008/5/12 Matt Nordhoff [EMAIL PROTECTED]: ivo talvet wrote: Hello, Is it possible to have a python which not handle the execution of while, for, and other loop statements ? I would like to

Re: Import/Create module from buffer

2008-05-12 Thread Gruik
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 handle files writing/reading so that the Python part only works with

Re: Import/Create module from buffer

2008-05-12 Thread Irmen de Jong
Gruik wrote: But before that 1 question: what if I'm in Python ? Following your solution, I did that in Python : def load_buffer(buffer) : compiled_buffer = compile(buffer, module_name, exec) exec(compiled_buffer) It works great except that I can't have a module object and

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Duncan Booth
Ivan Illarionov [EMAIL PROTECTED] wrote: is there a better way than my solution? is mine ok? ['%s%s' % (not i%3 and 'Fizz' or '', not i%5 and 'Buzz' or '') or str(i) for i in xrange(1, 101)] -- Ivan or, more correctly, if you actually need to print:

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread John Machin
Duncan Booth wrote: Ivan Illarionov [EMAIL PROTECTED] wrote: is there a better way than my solution? is mine ok? ['%s%s' % (not i%3 and 'Fizz' or '', not i%5 and 'Buzz' or '') or str(i) for i in xrange(1, 101)] -- Ivan or, more correctly, if you actually need to print:

Re: Module python-magic on/for Windows?

2008-05-12 Thread Michael Torrie
Michael Torrie wrote: In this case I'd try making a folder in the Python25 folder called share and put the contents of the gnuwin32 share/file stuff in there. Should look something like this: c:/python25/share/file/magic.mime.mgc c:/python25/share/file/magic

Re: Module python-magic on/for Windows?

2008-05-12 Thread Michael Torrie
Larry Hale wrote: Alternately, if one wishes to leave/place the magic files elsewhere, do like: test = magic.Magic( magic_file = 'C:\\Program Files\\GnuWin32\ \share\\file\\magic' ) # -- spec where/what the file is NOTE: Even if the magic_file location *is* specified, mime = True

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Arnaud Delobelle
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' % ('' if i%3 else 'Fizz', '' if i%5 else 'Buzz') or i More than a bit clearer, IMO. How about      print ('' if

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

2008-05-12 Thread Robert.Spilleboudt
I am using Snack to process the audio signal of a rc transmitter. Look at http://www.speech.kth.se/snack/ Another audio processing: PortAudio and the Python module PyAudio. Look at http://people.csail.mit.edu/hubert/pyaudio/ Robert Julien wrote: Hi, I would like to pull out the waveform of

Re: anonymous assignment

2008-05-12 Thread Richard G Riley
Yves Dorfsman [EMAIL PROTECTED] writes: D'Arcy J.M. Cain wrote: On Mon, 12 May 2008 02:28:13 GMT Yves Dorfsman [EMAIL PROTECTED] wrote: particular case, there's got to be a better way than: d = time.local() y = d[0] d = d[1] Like this? y, d = time.local()[:2] Sorry this was a

Re: Import/Create module from buffer

2008-05-12 Thread Gruik
On May 12, 1:48 pm, Irmen de Jong [EMAIL PROTECTED] wrote: Gruik wrote: But before that 1 question: what if I'm in Python ? Following your solution, I did that in Python :     def load_buffer(buffer) :         compiled_buffer = compile(buffer, module_name, exec)        

Re: Initializing a subclass with a super object?

2008-05-12 Thread frankdmartinez
On May 11, 3:19 am, Francesco Bochicchio [EMAIL PROTECTED] wrote: But there is not such a thing, in Python. What you have is that A has the same attributes/methods of B plus its own. What you could do is  adding in class A a method like this:   class A(B):      ...      def

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Max Erickson
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' % ('' if i%3 else 'Fizz', '' if i%5 else 'Buzz') or i More than

Re: Now what!?

2008-05-12 Thread Marco Mariani
notbob wrote: frustrated and give up on learning programming, not really caring much for coding, anyway. But, dammit, I'm gonna stick with it this time. I'll learn python if it kills me! No, it won't kill you but make you stronger ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: artificiall, agent, movement

2008-05-12 Thread Gerry
Many city travel surveys collect source destination trip-start data; you might be able to find one of these studies. I think each car in your simulation should have a destination. Then the simulation needs a route-finder, and cars can progress along their routes as traffic permits -- or even

execfile python3k

2008-05-12 Thread Odys
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 how to construct 'file

Re: artificiall, agent, movement

2008-05-12 Thread Paul McGuire
On May 12, 5:37 am, Iman [EMAIL PROTECTED] wrote: is there any sample source code in python or links, docs to help me ?  thanks for your attention . I've used SimPy in the past to implement a factory simulation. The SimPy web site claims that it has been used for traffic simulation, but does

Re: Mathematics in Python are not correct

2008-05-12 Thread Mark Dickinson
On May 12, 2:09 am, Terry Reedy [EMAIL PROTECTED] wrote: Then it seems equally dubious that 0.**y, y0, should be well-defined. It seems to me that lim as x goes to 0. exp(y*log(x)) is equally well defined whether y is 0 or not, even though there is a discontinuity in the limit. Well, there's

Compiling Python using Microsoft Visual C++ 2008

2008-05-12 Thread Colin J. Williams
1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as pcbuild. It would be helpful if the Python Version could be indicated. 2.With 2.6, Python compiles and executes OK but various packages are not compiled, eg sqlite3. 3.Pythonw compiles OK but not sqlite3. 4.Mike Fletcher

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

2008-05-12 Thread Grant Edwards
On 2008-05-12, Ben Finney [EMAIL PROTECTED] wrote: Maybe my brain works differently, but I find both dummy and unused are extremely confusing names for loop counters. The loop begins to look like it doesn't iterate at all if its counter is dummy or unused. If it *counts* it is *used* and

Re: frameword vs application server?

2008-05-12 Thread Diez B. Roggisch
walterbyrd schrieb: Can somebody help me understand the difference? Not just where Python is concerned, but in general? As I understand it, an application server is supposed to be a great help in developing apps, because most of the business logic is already there. It seems to me that, usually

Re: Compiling Python using Microsoft Visual C++ 2008

2008-05-12 Thread Martin v. Löwis
1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as pcbuild. It would be helpful if the Python Version could be indicated. Hover over the link, and it will display the full path, which you can then infer to reason about the specific copy of Python you are using. In any case,

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

2008-05-12 Thread Peter Decker
On Mon, May 12, 2008 at 1:45 AM, Banibrata Dutta [EMAIL PROTECTED] wrote: 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

Removing option from optparse

2008-05-12 Thread GustavoTabares
Hello, I'm trying to figure out if the following is a bug or if I'm using the remove_option in the wrong way. #!/usr/bin/env python import optparse parser = optparse.OptionParser() parser.add_option(--test, help=This is a test option) parser.remove_option('--test') print parser.parse_args()

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

2008-05-12 Thread Grant Edwards
On 2008-05-12, Ben Finney [EMAIL PROTECTED] wrote: I too, agree that requiring a name be bound to the values coming out of the iterator seems wrong. With do something N times, there must be *something* to keep track of which iteration we're up to (or, equivalently, how many iterations remain)

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

2008-05-12 Thread Grant Edwards
On 2008-05-12, Ben Finney [EMAIL PROTECTED] wrote: Paddy [EMAIL PROTECTED] writes: I've used Fortran and C and so would tend to use either i,j,k as the unused loop variable above, or, for clarity, call it something descriptive like loop_count, if the loop body would be clearer. The problem

Re: Removing option from optparse

2008-05-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Hello, I'm trying to figure out if the following is a bug or if I'm using the remove_option in the wrong way. #!/usr/bin/env python import optparse parser = optparse.OptionParser() parser.add_option(--test, help=This is a test option) parser.remove_option('--test')

Discount, Chanel Prada Coach Women's Sandals, LV DG Fendi Versace Sunglasses

2008-05-12 Thread www.globwholesale.com
Discount Coach Sandals, Dior Sandals, Prada Sandals, Chanel Sandals, Versace Sandals, Crocs Sandals, LV Sandals, ( G U C C I ) Sandals, Women's Sandals Men's Slippers From China Brand Sunglasses Wholesale: Discount, Prada Sunglasses Discount, DG Sunglasses Discount, Fendi Sunglasses

Re: Compiling Python using Microsoft Visual C++ 2008

2008-05-12 Thread Colin J. Williams
Martin v. Löwis wrote: 1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as pcbuild. It would be helpful if the Python Version could be indicated. Hover over the link, and it will display the full path, which you can then infer to reason about the specific copy of Python you

buffering choking sys.stdin.readlines() ?

2008-05-12 Thread cshirky
Newbie question: I'm trying to turn a large XML file (~7G compressed) into a YAML file, and my program seems to be buffering the input. IOtest.py is just import sys for line in sys.stdin.readlines(): print line but when I run $ gzcat bigXMLfile.gz | IOtest.py but it hangs then dies.

Re: Write a python blog/website?

2008-05-12 Thread Dotan Cohen
2008/5/9 Sumon Sadhu [EMAIL PROTECTED]: Hey Dotan, My apologies if this post caused offense. Your assertion is right, maybe i should have emailed everyone individually like i've done with the first 45 sites, but it was never my intention to spam. Sumon, I think that you do not understand the

RE: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Delaney, Timothy (Tim)
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, the making, or both? ;) Tim Delaney --

Re: Mathematics in Python are not correct

2008-05-12 Thread Arnaud Delobelle
On 12 May, 15:21, Mark Dickinson [EMAIL PROTECTED] wrote: On May 12, 2:09 am, Terry Reedy [EMAIL PROTECTED] wrote: Then it seems equally dubious that 0.**y, y0, should be well-defined. It seems to me that lim as x goes to 0. exp(y*log(x)) is equally well defined whether y is 0 or not, even

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

2008-05-12 Thread Paddy
On May 12, 3:46 pm, Grant Edwards [EMAIL PROTECTED] wrote: On 2008-05-12, Ben Finney [EMAIL PROTECTED] wrote: Paddy [EMAIL PROTECTED] writes: I've used Fortran and C and so would tend to use either i,j,k as the unused loop variable above, or, for clarity, call it something descriptive

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

2008-05-12 Thread Jean-Paul Calderone
On Mon, 12 May 2008 08:05:39 -0700 (PDT), cshirky [EMAIL PROTECTED] wrote: Newbie question: I'm trying to turn a large XML file (~7G compressed) into a YAML file, and my program seems to be buffering the input. IOtest.py is just import sys for line in sys.stdin.readlines(): print line

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

2008-05-12 Thread Diez B. Roggisch
cshirky schrieb: Newbie question: I'm trying to turn a large XML file (~7G compressed) into a YAML file, and my program seems to be buffering the input. IOtest.py is just import sys for line in sys.stdin.readlines(): print line but when I run $ gzcat bigXMLfile.gz | IOtest.py but

Socket and cycle problem

2008-05-12 Thread petr . poupa
Hello, I am beginner but so I need help. I have small script for receive data from port 3883, but it print only once. import socket HOST = 'localhost' PORT = 3883 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) data = s.recv(2048) s.close() print 'receive data from

Re: do you fail at FizzBuzz? simple prog test

2008-05-12 Thread Paul Hankin
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' % ('' if i%3 else 'Fizz', '' if i%5 else

Re: Mathematics in Python are not correct

2008-05-12 Thread Lou Pecora
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: I am stunned that this simple misunderstanding of mine ended in a mathematical clash of a sort. :) You guys really blew me away wih your mathematical knowledge. And also the 0**0 is a thing I've never thought about trying, until now

Pydev 1.3.17 Released

2008-05-12 Thread Fabio Zadrozny
Hi All, Pydev and Pydev Extensions 1.3.17 have been released Details on Pydev Extensions: http://www.fabioz.com/pydev Details on Pydev: http://pydev.sf.net Details on its development: http://pydev.blogspot.com Release Highlights in Pydev Extensions:

Re: Mathematics in Python are not correct

2008-05-12 Thread Lou Pecora
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 advantageous to have 0**0 | undefined?

Re: Socket and cycle problem

2008-05-12 Thread Jean-Paul Calderone
On Mon, 12 May 2008 08:34:07 -0700 (PDT), [EMAIL PROTECTED] wrote: Hello, I am beginner but so I need help. I have small script for receive data from port 3883, but it print only once. import socket HOST = 'localhost' PORT = 3883 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

In metaclass, when to use __new__ vs. __init__?

2008-05-12 Thread Matthew Wilson
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, bases, d): and here's __new__: def __new__(meta, classname,

passing *args recursively

2008-05-12 Thread Guillermo
Hi, This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1! # there must be some better way than args[0]? def func1(*args): print args # (1, 2, 3) func2(args)

Re: Socket and cycle problem

2008-05-12 Thread petr . poupa
On 12 Kvě, 17:54, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 12 May 2008 08:34:07 -0700 (PDT), [EMAIL PROTECTED] wrote: Hello, I am beginner but so I need help. I have small script for receive data from port 3883, but it print only once. import socket HOST = 'localhost' PORT =

Re: passing *args recursively

2008-05-12 Thread Jerry Hill
On Mon, May 12, 2008 at 12:19 PM, Guillermo [EMAIL PROTECTED] wrote: def func1(*args): print args # (1, 2, 3) func2(args) change this line to: func2(*args) -- Jerry -- http://mail.python.org/mailman/listinfo/python-list

Re: passing *args recursively

2008-05-12 Thread Matimus
On May 12, 9:19 am, Guillermo [EMAIL PROTECTED] wrote: Hi, This must be very basic, but how'd you pass the same *args several levels deep? def func2(*args) print args # ((1, 2, 3),) # i want this to output (1, 2, 3) as func1! # there must be some better way than args[0]?

Re: Compiling Python using Microsoft Visual C++ 2008

2008-05-12 Thread Christian Heimes
Colin J. Williams schrieb: See PCbuild/readme.txt. I presume that this is PCbuild8.txt No, it's PCbuild/readme.txt in Python 2.6 and 3.0 By the way you can call Tools\buildbot\external.bat from the root directory of the 2.6 and 3.0. It checks out and build the dependencies. The script

Re: Mathematics in Python are not correct

2008-05-12 Thread Mark Dickinson
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 as x - 0 if f(0)=g(0)=0 and g(x)0 in the

Re: Python doesn't recognize quote types

2008-05-12 Thread MRAB
On May 12, 8:31 am, Duncan Booth [EMAIL PROTECTED] wrote: Dennis Lee Bieber [EMAIL PROTECTED] wrote: The sloppy use of single quote for the apostrophe is unfortunate G True, but that problem is outside of the Python community's control. Given that people do often refer to single quote

  1   2   3   >