Re: [Tutor] Py script conversion to .dll or .exe

2011-02-14 Thread tee chwee liong
any major differences using Iron Python vs Python 2.6.6? tq From: waynejwer...@gmail.com Date: Mon, 14 Feb 2011 23:58:44 -0600 Subject: Re: [Tutor] Py script conversion to .dll or .exe To: tc...@hotmail.com CC: tutor@python.org On Mon, Feb 14, 2011 at 11:40 PM, tee chwee liong wrote: hi a

Re: [Tutor] Py script conversion to .dll or .exe

2011-02-14 Thread Wayne Werner
On Mon, Feb 14, 2011 at 11:40 PM, tee chwee liong wrote: > hi all, > > pls advise on: > >1. Can Python 2.6.6 scripts be converted to .dll and read by C sharp? >2. Can Python 2.6.6 scripts be converted to .exe and read by C sharp? > > Anything is possible. Of course, the easiest way to d

[Tutor] Py script conversion to .dll or .exe

2011-02-14 Thread tee chwee liong
hi all, pls advise on: Can Python 2.6.6 scripts be converted to .dll and read by C sharp? Can Python 2.6.6 scripts be converted to .exe and read by C sharp? thanks tcl ___ Tutor maillist - Tutor@python.

Re: [Tutor] Tutor Digest, Vol 84, Issue 56

2011-02-14 Thread bob gailer
On 2/14/2011 4:59 PM, Daniel Otero wrote: Did you want something? If so state clearly and delete all non-relevant messages. Did you notice: When replying, please edit your Subject line so it is more specific than "Re: Contents of Tutor digest..." -- Bob Gailer 919-636-4239 Chapel Hill NC __

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Steven D'Aprano
Walter Prins wrote: 2011/2/14 Rafael Durán Castañeda Could we consider sorted as an high order function? sorted_list = sorted(list_strings, key = str.lower) No because sorted() returns a list as a result. A higher order function produces another function as a result, or takes one or more

Re: [Tutor] Tutor Digest, Vol 84, Issue 56

2011-02-14 Thread Daniel Otero
>Could we consider sorted as an high order function? > >sorted_list = sorted(list_strings, key = str.lower) > >2011/2/14 Steven D'Aprano > >> Steven D'Aprano wrote: >> >> An example might help. Back in the old days, before Python had a sum() >>> function,

Re: [Tutor] GUI + python program

2011-02-14 Thread Patrick Sabin
You have a lot of options: GUI: Any major gui toolkit will do the job. It's probobly easiest to stick with tkinter. HTML Template: Use a template language, e.g. mako or django templates Pdf Templates: Reportlab is an option. File Access: Of course you could just open a file and write to it, b

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Alan Gauld
"Rafael Durán Castañeda" wrote Could we consider sorted as an high order function? sorted_list = sorted(list_strings, key = str.lower) Yes, there are lots of them All the GUI building functions in Tkinter that take command arguments are higher order functions too. And many functions in pro

[Tutor] GUI + python program

2011-02-14 Thread Mitch Seymour
Hello, I am trying to design a program and GUI that will allow the user to select from a series of options and, depending on which options are selected in the GUI, information will then be placed in a html or pdf template. Here's an example. Option A Option B Option C If Option A, insert _

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Walter Prins
2011/2/14 Rafael Durán Castañeda > In the example I gave: > > > sorted_list = sorted(list_strings, key = str.lower) > > sorted takes str.lower as a parameter, doesn't it? So, it should be a high > order function > My apologies! Yes, you are of course quite correct! :) Walter __

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Walter Prins
2011/2/14 Rafael Durán Castañeda > Could we consider sorted as an high order function? > > sorted_list = sorted(list_strings, key = str.lower) > > No because sorted() returns a list as a result. A higher order function produces another function as a result, or takes one or more functions as a p

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Rafael Durán Castañeda
In the example I gave: sorted_list = sorted(list_strings, key = str.lower) sorted takes str.lower as a parameter, doesn't it? So, it should be a high order function El 14 de febrero de 2011 21:06, Walter Prins escribió: > > > 2011/2/14 Rafael Durán Castañeda > > Could we consider sorted as an

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Rafael Durán Castañeda
Could we consider sorted as an high order function? sorted_list = sorted(list_strings, key = str.lower) 2011/2/14 Steven D'Aprano > Steven D'Aprano wrote: > > An example might help. Back in the old days, before Python had a sum() >> function, the easiest way to add up a list of numbers was to

Re: [Tutor] How to run another python script?

2011-02-14 Thread Karim
Better way is to not have BBB but simply to use Exception (pseudo-code): try: ... catch IOError, e: print("Error encountered in generating zip file:", e) else: import os os.remove('') Regards Karim On 02/14/2011 05:04 PM, Karim wrote: On 02/14/2011 04:51 PM, Dan Lee wrote:

Re: [Tutor] How to run another python script?

2011-02-14 Thread Karim
On 02/14/2011 04:51 PM, Dan Lee wrote: Hi. I just knew what python is. Now I'm about to write backup script.Now I got 2 scripts. AAA : generate zip file BBB : delete old file. AAA is done. Now I'm going to code BBB file. and I will fix AAA to call BBB to delete dump file at the end. One poss

Re: [Tutor] How to group data?

2011-02-14 Thread tee chwee liong
thanks everyone for the advice. my code looks very messy... needs more practise. From: waynejwer...@gmail.com Date: Mon, 14 Feb 2011 05:15:26 -0600 Subject: Re: [Tutor] How to group data? To: tc...@hotmail.com CC: da...@ieee.org; tutor@python.org On Sun, Feb 13, 2011 at 6:03 PM, tee chwee l

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Steven D'Aprano
Steven D'Aprano wrote: An example might help. Back in the old days, before Python had a sum() function, the easiest way to add up a list of numbers was to use reduce and a small function to add two numbers: def add(x, y): return x+y total = filter(add, [2, 4, 5, 9, 1]) Arh! Of cour

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Steven D'Aprano
Carla Jenkins wrote: Hello everyone: I am new to Python and am looking for higher-order function programming examples. The programming codes do not feature the corresponding equation so I am lost. Please help me. The first thing you need to understand is the difference between *code* and *da

Re: [Tutor] How to group data?

2011-02-14 Thread Wayne Werner
On Sun, Feb 13, 2011 at 6:03 PM, tee chwee liong wrote: > > How about some clues as to what you're trying to accomplish? This code > > is surprisingly verbose, and probably totally wrong. Anyway, each time > > you pop an item from the list, all the following ones change their > > index. So presu

Re: [Tutor] Higher-Order Function Examples

2011-02-14 Thread Alan Gauld
"Carla Jenkins" wrote I am new to Python and am looking for higher-order function programming examples. This sounds like homework, if not I apologize, but as such I can only gicve you some pointers As with all concept type stuff wikipedia is a good place to start. Just search for "higher

Re: [Tutor] How to group data?

2011-02-14 Thread Steven D'Aprano
tee chwee liong wrote: modified the code to be but it didnt print out anything: That is because your list of values is empty. You have to collect the values, like your previous code did. *Then* process them. In the code below, you try to process values before you have any. from __future_