Re: Basic Python Questions - Oct. 31, 2013

2013-11-12 Thread Chris Angelico
On Tue, Nov 12, 2013 at 9:21 PM, E.D.G. wrote: > The point is, when people want to make some computer program available > for use by others around the world they might want to circulate a version of > their program that has such a simple format that anyone can understand it. > And for actual

Re: Basic Python Questions - Oct. 31, 2013

2013-11-12 Thread E.D.G.
"E.D.G." wrote in message news:yo-dnwfmi7_7d-jpnz2dnuvz_hqdn...@earthlink.com... Posted by E.D.G. on November 12, 2013 The following is part of a note that I just posted to the Perl Newsgroup. But it is actually intended for all computer programmers who are circulating free download s

Re: Basic Python Questions - Oct. 31, 2013

2013-11-10 Thread sigtool
On Q4, you could try Waterloo Graphics . Its LGPLv3 and, although Java-based, runs in Python via Py4J. It has built-in mouse interactivity/GUI editors etc that will all be active when used from Python. It is Java Swing-based, so e.g. data points can be drawn as s

Re: Basic Python Questions - Oct. 31, 2013

2013-11-07 Thread 88888 Dihedral
On Tuesday, November 5, 2013 1:22:05 PM UTC+8, E.D.G. wrote: > "Jim Gibson" wrote in message > > news:031120131018099327%jimsgib...@gmail.com... > > > > > One way to generate plot within a CGI program is this: > > > >To start off with, I am not a CGI expert. Also, I have several

Re: Basic Python Questions - Oct. 31, 2013

2013-11-04 Thread E.D.G.
"Jim Gibson" wrote in message news:031120131018099327%jimsgib...@gmail.com... One way to generate plot within a CGI program is this: To start off with, I am not a CGI expert. Also, I have several degrees in the physical sciences and many years of doing computer programming. But the

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread rusi
On Monday, November 4, 2013 12:28:24 AM UTC+5:30, Mark Lawrence wrote: > On 03/11/2013 18:28, rusi wrote: > > Which means take something like the pairwise function and code it > > up in python and julia -- its hardly 10 lines of code. And see > > what comparative performance you get. > Solely on

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Grant Edwards
On 2013-11-03, Jim Gibson wrote: > In article , E.D.G. > wrote: > >>My main, complex programs won't be run at Web sites. They will >> instead continue to be available as downloadable exe programs. The CGI (or >> whatever) programming work would involve relatively simple programs. But >

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Mark Lawrence
On 03/11/2013 18:28, rusi wrote: Which means take something like the pairwise function and code it up in python and julia -- its hardly 10 lines of code. And see what comparative performance you get. Solely on the grounds that you've mentioned julia how about this http://blog.leahhanson.u

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread rusi
On Sunday, November 3, 2013 1:13:13 PM UTC+5:30, Steven D'Aprano wrote: > On Sun, 03 Nov 2013 01:02:24 -0500, E.D.G. wrote: > [...] > > Since Perl has a calculation speed > > limit that is probably not easy to get around, before too long another > > language will be selected for initially doing ce

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Jim Gibson
In article , E.D.G. wrote: >My main, complex programs won't be run at Web sites. They will > instead continue to be available as downloadable exe programs. The CGI (or > whatever) programming work would involve relatively simple programs. But > they would need to be able to generate c

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Mark Lawrence
On 03/11/2013 09:47, E.D.G. wrote: "Steven D'Aprano" wrote in message news:5275fe91$0$29972$c3e8da3$54964...@news.astraweb.com... http://jakevdp.github.io/blog/2013/06/15/numba-vs-cython-take-2/ http://technicaldiscovery.blogspot.com.au/2011/06/speeding-up-python-numpy-cython-and.html

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread E.D.G.
"Steven D'Aprano" wrote in message news:5275fe91$0$29972$c3e8da3$54964...@news.astraweb.com... http://jakevdp.github.io/blog/2013/06/15/numba-vs-cython-take-2/ http://technicaldiscovery.blogspot.com.au/2011/06/speeding-up-python-numpy-cython-and.html It appears that Python can do what

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread Steven D'Aprano
On Sun, 03 Nov 2013 01:02:24 -0500, E.D.G. wrote: [...] > Since Perl has a calculation speed > limit that is probably not easy to get around, before too long another > language will be selected for initially doing certain things such as > performing calculations and plotting charts. And the existi

Re: Basic Python Questions - Oct. 31, 2013

2013-11-03 Thread rusi
On Sunday, November 3, 2013 11:15:48 AM UTC+5:30, E.D.G. wrote: > "rusi" wrote: > >>Not sure what will… you may look at Julia: http://julialang.org/ >That program language speed comparison table looks quite interesting. > And I asked some of the other people that I work with to take a l

Re: Basic Python Questions - Oct. 31, 2013

2013-11-02 Thread E.D.G.
"William Ray Wing" wrote in message news:mailman.1934.1383320554.18130.python-l...@python.org... If you look here: http://wiki.wxpython.org/MatplotlibFourierDemo A suggestion that I would like to add is that when people make "Demo" programs like that available they might want to cre

Re: Basic Python Questions - Oct. 31, 2013

2013-11-02 Thread E.D.G.
"Mark Lawrence" wrote in message news:mailman.1873.1383227352.18130.python-l...@python.org... https://pypi.python.org/pypi/pywinauto/0.3.9 or http://stackoverflow.com/questions/1823762/sendkeys-for-python-3-1-on-windows Python "SendKey" looks like it probably works about the same as the Perl

Re: Basic Python Questions - Oct. 31, 2013

2013-11-02 Thread E.D.G.
"E.D.G." wrote in message news:udgdnadga6n9vu_pnz2dnuvz_umdn...@earthlink.com... Thanks for all of the comments. I have been away from my Internet connection for several days and could not respond to them when they were first posted here. The comments have all been considered. A

Re: Basic Python Questions - Oct. 31, 2013

2013-11-02 Thread E.D.G.
"rusi" wrote in message news:1e63687b-4269-42d9-8700-e3a8dcc57...@googlegroups.com... Not sure what will… you may look at Julia: http://julialang.org/ That program language speed comparison table looks quite interesting. And I asked some of the other people that I work with to take a

Re: Basic Python Questions - Oct. 31, 2013

2013-11-01 Thread William Ray Wing
On Nov 1, 2013, at 2:08 PM, Ethan Furman wrote: > On 11/01/2013 08:42 AM, William Ray Wing wrote: >> >> Granted, this performance is based on pulling in libraries. It imports >> numpy, mathplotlib, and wx to handle the fast array calculations, the >> plotting, and the GUI respectively, but th

Re: Basic Python Questions - Oct. 31, 2013

2013-11-01 Thread Ethan Furman
On 11/01/2013 08:42 AM, William Ray Wing wrote: Granted, this performance is based on pulling in libraries. It imports numpy, mathplotlib, and wx to handle the fast array calculations, the plotting, and the GUI respectively, but those are exactly the sorts of "batteries included" libraries t

Re: Basic Python Questions - Oct. 31, 2013

2013-11-01 Thread William Ray Wing
On Oct 31, 2013, at 5:31 AM, "E.D.G." wrote: > Posted by E.D.G. on October 31, 2013 > > The following are several relatively basic questions regarding Python's > capabilities. I am not presently using it myself. At the moment a number of > people including myself are comparing it with o

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Skip Montanaro
> 1. How fast can Python do math calculations compared with other languages > such as Fortran and fast versions of Basic. I would have to believe that it > is much faster than Perl for doing math calculations. As others have indicated, a lot depends on the form of your calculations. There is a c

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread rusi
On Thursday, October 31, 2013 4:08:48 PM UTC+5:30, E.D.G. wrote: > Posted by E.D.G. October 31, 2013 > Hi Chris, >Thanks for the responses. Several of my questions were answered. >The calculation speed question just involves relatively > simple math such as multiplications and di

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
On 2013-10-31 14:49, Chris Angelico wrote: On Fri, Nov 1, 2013 at 1:41 AM, Robert Kern wrote: On 2013-10-31 14:05, Chris Angelico wrote: On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin wrote: "E.D.G." writes: The calculation speed question just involves relatively simple math s

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Alain Ketterlin
Mark Lawrence writes: > On 31/10/2013 13:17, Alain Ketterlin wrote: >> "E.D.G." writes: >> >>>The calculation speed question just involves relatively simple >>> math such as multiplications and divisions and trig calculations such >>> as sin and tan etc. >> >> These are not "simple" comp

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Chris Angelico
On Fri, Nov 1, 2013 at 1:41 AM, Robert Kern wrote: > On 2013-10-31 14:05, Chris Angelico wrote: >> >> On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin >> wrote: >>> >>> "E.D.G." writes: >>> The calculation speed question just involves relatively simple math such as multiplicatio

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Chris Angelico
On Fri, Nov 1, 2013 at 1:18 AM, Alain Ketterlin wrote: > Well, sure, yes, I agree with you and hope they are left to the FP > engine (still, fp ops are often multi-cycle, but that's a minor point). > > But what I meant was: a (bytecode) interpreted program will always be > slower than a compiled p

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Robert Kern
On 2013-10-31 14:05, Chris Angelico wrote: On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin wrote: "E.D.G." writes: The calculation speed question just involves relatively simple math such as multiplications and divisions and trig calculations such as sin and tan etc. These are not

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Alain Ketterlin
Chris Angelico writes: > On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin > wrote: >> "E.D.G." writes: >> >>> The calculation speed question just involves relatively simple >>> math such as multiplications and divisions and trig calculations such >>> as sin and tan etc. >> >> These are no

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Mark Lawrence
On 31/10/2013 13:17, Alain Ketterlin wrote: "E.D.G." writes: The calculation speed question just involves relatively simple math such as multiplications and divisions and trig calculations such as sin and tan etc. These are not "simple" computations. Any compiled language (Fortran, C

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Chris Angelico
On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin wrote: > "E.D.G." writes: > >> The calculation speed question just involves relatively simple >> math such as multiplications and divisions and trig calculations such >> as sin and tan etc. > > These are not "simple" computations. > > Any com

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Mark Lawrence
On 31/10/2013 10:38, E.D.G. wrote: Posted by E.D.G. October 31, 2013 Hi Chris, Thanks for the responses. Several of my questions were answered. The calculation speed question just involves relatively simple math such as multiplications and divisions and trig calculations such as

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Alain Ketterlin
"E.D.G." writes: > The calculation speed question just involves relatively simple > math such as multiplications and divisions and trig calculations such > as sin and tan etc. These are not "simple" computations. Any compiled language (Fortran, C, C++, typically) will probably go much fas

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Roy Smith
In article , "E.D.G." wrote: > 1. How fast can Python do math calculations compared with other languages > such as Fortran and fast versions of Basic. I would have to believe that it > is much faster than Perl for doing math calculations. Getting a handle on Python's execution speed is not

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Chris “Kwpolska” Warrick
On Thu, Oct 31, 2013 at 11:38 AM, E.D.G. wrote: > Posted by E.D.G. October 31, 2013 no need to write that. > > Hi Chris, > > Thanks for the responses. Several of my questions were answered. > > The calculation speed question just involves relatively simple math > such as multiplicati

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread E.D.G.
Posted by E.D.G. October 31, 2013 Hi Chris, Thanks for the responses. Several of my questions were answered. The calculation speed question just involves relatively simple math such as multiplications and divisions and trig calculations such as sin and tan etc. Presently I am usin

Re: Basic Python Questions - Oct. 31, 2013

2013-10-31 Thread Chris “Kwpolska” Warrick
On Thu, Oct 31, 2013 at 10:31 AM, E.D.G. wrote: > Posted by E.D.G. on October 31, 2013 > > The following are several relatively basic questions regarding > Python's capabilities. I am not presently using it myself. At the moment a > number of people including myself are comparing it with o

Re: basic python questions

2006-11-19 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : > [EMAIL PROTECTED] schrieb: > >> I have taken the coments and think I have implemented most. My only > > > Unfortunately, no. > >> question is how to use the enumerator. Here is what I did, I have tried >> a couple of things but was unable to figure out how to get th

Re: basic python questions

2006-11-19 Thread [EMAIL PROTECTED]
I normaly try to be as resourceful as I can. I find that newgroups give a wide range of answers and solutions to problems and you get a lot responses to what is the right way to do things and different point of views about the language that you can't find in help manuals. I also want to thank every

Re: basic python questions

2006-11-19 Thread John Machin
Paddy wrote: > John Machin wrote: > > > > [Aside] How are you going to explain all this to your instructor, who > > may be reading all this right now? > > > > The instructor should be proud! > He has managed to do his very first post to a this newsgroup, about a > homework question, and do it in t

Re: basic python questions

2006-11-19 Thread Paul McGuire
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > >> I am currently going to school at Utah Valley State College, the course >> that I am taking is analysis of programming languages. It's an upper >> division course but our teacher wa

Re: basic python questions

2006-11-18 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > I am currently going to school at Utah Valley State College, the course > that I am taking is analysis of programming languages. It's an upper > division course but our teacher wanted to teach us python as part of what does "upper division" mean in this context ? I

Re: basic python questions

2006-11-18 Thread Paddy
John Machin wrote: > [Aside] How are you going to explain all this to your instructor, who > may be reading all this right now? > The instructor should be proud! He has managed to do his very first post to a this newsgroup, about a homework question, and do it in the right way. that is no mean

Re: basic python questions

2006-11-18 Thread John Machin
[EMAIL PROTECTED] wrote: > So I implemented the exception spcified and in testing it returns: > > DeprecationWarning: raising a string exception is deprecated > > I am not to worried about depreciation warning however, out of > curiosity, what would the better way be to handle this? Is there a way

Re: basic python questions

2006-11-18 Thread [EMAIL PROTECTED]
So I implemented the exception spcified and in testing it returns: DeprecationWarning: raising a string exception is deprecated I am not to worried about depreciation warning however, out of curiosity, what would the better way be to handle this? Is there a way that (web site, help documentation,

Re: basic python questions

2006-11-18 Thread [EMAIL PROTECTED]
So I implemented the exception spcified and in testing it returns: DeprecationWarning: raising a string exception is deprecated I am not to worried about depreciation warning however, out of curiosity, what would the better way be to handle this? Is there a way that (web site, help documentation,

Re: basic python questions

2006-11-18 Thread Mark Peters
[EMAIL PROTECTED] wrote: > dict = {} As a general rule you should avoid variable names which shadow built in types (list, dict, etc.). This can cause unexpected behavior later on. Also, variable names should be more descriptive of their contents. Try word_dict or some such variant -- htt

Re: basic python questions

2006-11-18 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I have taken the coments and think I have implemented most. My only Unfortunately, no. > question is how to use the enumerator. Here is what I did, I have tried > a couple of things but was unable to figure out how to get the line > number. > > def Xref(filename): >

Re: basic python questions

2006-11-18 Thread tom
tom wrote: > [EMAIL PROTECTED] wrote: > >> I have taken the coments and think I have implemented most. My only >> question is how to use the enumerator. Here is what I did, I have tried >> a couple of things but was unable to figure out how to get the line >> number. >> >> >> > Try this

Re: basic python questions

2006-11-18 Thread tom
[EMAIL PROTECTED] wrote: > I have taken the coments and think I have implemented most. My only > question is how to use the enumerator. Here is what I did, I have tried > a couple of things but was unable to figure out how to get the line > number. > > Try this in the interpreter, l = [5,4,3,2,

Re: basic python questions

2006-11-18 Thread [EMAIL PROTECTED]
I have taken the coments and think I have implemented most. My only question is how to use the enumerator. Here is what I did, I have tried a couple of things but was unable to figure out how to get the line number. def Xref(filename): try: fp = open(filename, "r") except:

Re: basic python questions

2006-11-18 Thread [EMAIL PROTECTED]
I am currently going to school at Utah Valley State College, the course that I am taking is analysis of programming languages. It's an upper division course but our teacher wanted to teach us python as part of the course, he spent about 2 - 3 weeks on python which has been good. I currently work wi

Re: basic python questions

2006-11-18 Thread Paul McGuire
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have a simple assignment for school but am unsure where to go. The > assignment is to read in a text file, split out the words and say which > line each word appears in alphabetical order. I have the basic outline > of the program done

Re: basic python questions

2006-11-18 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I have a simple assignment for school but am unsure where to go. The > assignment is to read in a text file, split out the words and say which > line each word appears in alphabetical order. I have the basic outline > of the program done which is: looks like an excellen

Re: basic python questions

2006-11-18 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > def Xref(filename): > try: > fp = open(filename, "r") > lines = fp.readlines() > fp.close() > except: > raise "Couldn't read input file \"%s\"" % filename > dict = {} > for line_num in xrange(len(lin

Re: basic python questions

2006-11-17 Thread Paddy
[EMAIL PROTECTED] wrote: > I have a simple assignment for school but am unsure where to go. The > assignment is to read in a text file, split out the words and say which > line each word appears in alphabetical order. I have the basic outline > of the program done which is: > > def Xref(filename):