Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94541 > unrolled thread
| Started by | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| First post | 2015-07-25 04:39 -0500 |
| Last post | 2015-07-29 00:43 -0700 |
| Articles | 20 on this page of 42 — 13 participants |
Back to article view | Back to comp.lang.python
Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-25 04:39 -0500
Python Questions - July 25, 2015 tandrewjohnson@outlook.com - 2015-07-25 04:36 -0700
Python Questions - July 25, 2015 tandrewjohnson@outlook.com - 2015-07-25 04:39 -0700
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-25 08:16 -0500
Re: Python Questions - July 25, 2015 Laura Creighton <lac@openend.se> - 2015-07-25 15:59 +0200
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 12:49 -0500
Re: Python Questions - July 25, 2015 Laura Creighton <lac@openend.se> - 2015-07-26 20:38 +0200
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 13:48 -0500
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-26 13:49 +0100
Re: Python Questions - July 25, 2015 Chris Angelico <rosuav@gmail.com> - 2015-07-26 23:07 +1000
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-26 15:30 +0100
Re: Python Questions - July 25, 2015 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-26 14:19 +0100
Re: Python Questions - July 25, 2015 Steven D'Aprano <steve@pearwood.info> - 2015-07-27 00:22 +1000
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-26 15:58 +0100
Re: Python Questions - July 25, 2015 Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-07-27 23:14 +0000
Re: Python Questions - July 25, 2015 Terry Reedy <tjreedy@udel.edu> - 2015-07-28 04:50 -0400
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-28 10:46 +0100
Re: Python Questions - July 25, 2015 Chris Angelico <rosuav@gmail.com> - 2015-07-28 20:17 +1000
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-28 11:44 +0100
Re: Python Questions - July 25, 2015 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-28 13:47 +0100
Re: Python Questions - July 25, 2015 Steven D'Aprano <steve@pearwood.info> - 2015-07-29 02:02 +1000
Re: Python Questions - July 25, 2015 Steven D'Aprano <steve@pearwood.info> - 2015-07-29 02:12 +1000
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-28 17:45 +0100
Re: Python Questions - July 25, 2015 Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-07-28 18:46 +0000
Re: Python Questions - July 25, 2015 Laura Creighton <lac@openend.se> - 2015-07-29 18:13 +0200
Re: Python Questions - July 25, 2015 BartC <bc@freeuk.com> - 2015-07-29 17:50 +0100
Re: Python Questions - July 25, 2015 wxjmfauth@gmail.com - 2015-07-28 07:09 -0700
Re: Python Questions - July 25, 2015 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-28 13:58 +0100
Re: Python Questions - July 25, 2015 Laura Creighton <lac@openend.se> - 2015-07-25 15:30 +0200
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-25 08:45 -0500
Re: Python Questions - July 25, 2015 tjohnson <tandrewjohnson@outlook.com> - 2015-07-25 15:16 -0700
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 14:17 -0500
Re: Python Questions - July 25, 2015 mm0fmf <none@mailinator.com> - 2015-07-26 22:15 +0100
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 17:08 -0500
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 17:32 -0500
Re: Python Questions - July 25, 2015 Ned Batchelder <ned@nedbatchelder.com> - 2015-07-26 16:12 -0700
Re: Python Questions - July 25, 2015 "E.D.G." <edgrsprj@ix.netcom.com> - 2015-07-26 18:58 -0500
Re: Python Questions - July 25, 2015 Laura Creighton <lac@openend.se> - 2015-07-27 11:15 +0200
Re: Python Questions - July 25, 2015 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-07-27 01:18 +0100
Re: Python Questions - July 25, 2015 mm0fmf <none@mailinator.com> - 2015-07-27 17:46 +0100
Re: Python Questions - July 25, 2015 tjohnson <tandrewjohnson@outlook.com> - 2015-07-27 03:24 -0700
Re: Python Questions - July 25, 2015 wxjmfauth@gmail.com - 2015-07-29 00:43 -0700
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2015-07-29 02:02 +1000 |
| Message-ID | <55b7a798$0$1636$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #94689 |
On Tue, 28 Jul 2015 08:44 pm, BartC wrote: > No, I asked for how to install numpy, and was told to install Anaconda. > I didn't know it was so big. It's like asking where to buy a pint of > milk, and inadvertently buying the whole store! Which does, after all, > come with the milk I wanted... Bart, you can't blame us for your failure to do your own investigation before clicking Download. Don't you read the instructions? Anaconda installs a full-featured scientific Python stack, not just numpy. The *very first paragraph* of the download page says: "It includes over 195 of the most popular Python packages for science, math, engineering, data analysis." http://continuum.io/downloads If the installer is 300MB or so, what were you expecting the full installation to be? Further down on that same page, it describes Miniconda, which is a bare-bones installation of Python + the conda package manager only, so you can pick and choose which of those 195 packages are installed. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve@pearwood.info> |
|---|---|
| Date | 2015-07-29 02:12 +1000 |
| Message-ID | <55b7a9f5$0$1668$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #94687 |
On Tue, 28 Jul 2015 07:46 pm, BartC wrote: > (I'm still reeling from the size of that Anaconda download. Apparently > it contains a whole bunch of stuff, nothing to do with numpy, that I > don't need. But one of the listed packages was 'libffi', which is > puzzling. This library lets a C-like language call functions with > runtime-determined argument types. How would that be used in Python?) https://en.wikipedia.org/wiki/Libffi -- Steven
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2015-07-28 17:45 +0100 |
| Message-ID | <jkOtx.42040$Ec3.13257@fx24.am4> |
| In reply to | #94701 |
On 28/07/2015 17:12, Steven D'Aprano wrote: > On Tue, 28 Jul 2015 07:46 pm, BartC wrote: > >> (I'm still reeling from the size of that Anaconda download. Apparently >> it contains a whole bunch of stuff, nothing to do with numpy, that I >> don't need. But one of the listed packages was 'libffi', which is >> puzzling. This library lets a C-like language call functions with >> runtime-determined argument types. How would that be used in Python?) > > https://en.wikipedia.org/wiki/Libffi Yes, I know (I was looking at it myself a few days ago for another project). But while it might be used for implementing some of Python's internals, I was wondering what it was doing in a user-level set of libraries, given that it's mostly a bunch of C code. Perhaps they were just padding the list to make it look more impressive. -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | Rob Gaddi <rgaddi@technologyhighland.invalid> |
|---|---|
| Date | 2015-07-28 18:46 +0000 |
| Message-ID | <mp8im6$knj$3@dont-email.me> |
| In reply to | #94702 |
On Tue, 28 Jul 2015 17:45:00 +0100, BartC wrote: > On 28/07/2015 17:12, Steven D'Aprano wrote: >> On Tue, 28 Jul 2015 07:46 pm, BartC wrote: >> >>> (I'm still reeling from the size of that Anaconda download. Apparently >>> it contains a whole bunch of stuff, nothing to do with numpy, that I >>> don't need. But one of the listed packages was 'libffi', which is >>> puzzling. This library lets a C-like language call functions with >>> runtime-determined argument types. How would that be used in Python?) >> >> https://en.wikipedia.org/wiki/Libffi > > Yes, I know (I was looking at it myself a few days ago for another > project). But while it might be used for implementing some of Python's > internals, I was wondering what it was doing in a user-level set of > libraries, given that it's mostly a bunch of C code. > > Perhaps they were just padding the list to make it look more impressive. It underpins the ctypes implementation, which is neither here nor there. If I remember right, numpy does dynamic loading of one of a couple different (FORTRAN?) algebra libraries depending on which ones it can find installed. That would be a pretty clear use case for libffi. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-07-29 18:13 +0200 |
| Message-ID | <mailman.1073.1438186424.3674.python-list@python.org> |
| In reply to | #94702 |
In a message of Tue, 28 Jul 2015 17:45:00 +0100, BartC writes: >On 28/07/2015 17:12, Steven D'Aprano wrote: >> On Tue, 28 Jul 2015 07:46 pm, BartC wrote: >> >>> (I'm still reeling from the size of that Anaconda download. Apparently >>> it contains a whole bunch of stuff, nothing to do with numpy, that I >>> don't need. But one of the listed packages was 'libffi', which is >>> puzzling. This library lets a C-like language call functions with >>> runtime-determined argument types. How would that be used in Python?) >> >> https://en.wikipedia.org/wiki/Libffi > >Yes, I know (I was looking at it myself a few days ago for another >project). But while it might be used for implementing some of Python's >internals, I was wondering what it was doing in a user-level set of >libraries, given that it's mostly a bunch of C code. > >Perhaps they were just padding the list to make it look more impressive. People who use numpy also want to load up their c extensions a whole lot. If you have a hunk of C code (a library, ususually) and you want to call it from your python code, and play with its objects just like they were python objects, this is one of the most common ways to do this. Laura
[toc] | [prev] | [next] | [standalone]
| From | BartC <bc@freeuk.com> |
|---|---|
| Date | 2015-07-29 17:50 +0100 |
| Message-ID | <Av7ux.44257$Ec3.34720@fx24.am4> |
| In reply to | #94740 |
On 29/07/2015 17:13, Laura Creighton wrote: > In a message of Tue, 28 Jul 2015 17:45:00 +0100, BartC writes: >> On 28/07/2015 17:12, Steven D'Aprano wrote: >>> https://en.wikipedia.org/wiki/Libffi >> >> Yes, I know (I was looking at it myself a few days ago for another >> project). But while it might be used for implementing some of Python's >> internals, I was wondering what it was doing in a user-level set of >> libraries, given that it's mostly a bunch of C code. >> >> Perhaps they were just padding the list to make it look more impressive. > > People who use numpy also want to load up their c extensions a > whole lot. If you have a hunk of C code (a library, ususually) and > you want to call it from your python code, and play with its > objects just like they were python objects, this is one of the > most common ways to do this. If it's in the form where you start by writing along the lines of: import libffi then it must be something very different to what I looked at. (Which seemed to consists of lots of C files, headers and ASM modules, for dozens of different targets and compilers.) I would also expect a foreign-function interface to be built-in, or to have all the details taken care of by an add-on, so that the very low level libffi wouldn't figure at all. -- Bartc
[toc] | [prev] | [next] | [standalone]
| From | wxjmfauth@gmail.com |
|---|---|
| Date | 2015-07-28 07:09 -0700 |
| Message-ID | <0ee54fc1-4457-4804-a53d-66f4118a9181@googlegroups.com> |
| In reply to | #94685 |
Le mardi 28 juillet 2015 10:51:23 UTC+2, Terry Reedy a écrit : > On 7/27/2015 7:14 PM, Rob Gaddi wrote: > > On Sun, 26 Jul 2015 13:49:57 +0100, BartC wrote: > >> How do you actually install Numpy in Windows? > > I believe 'pip install numpy' works > > > As I recall you noodle around with it for a few hours making things that > > look like progress but turn out to be rabbit holes. > > To me, this is nonsense. If the above does not work, go to > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > One of the above worked for me a year ago. 10 minutes max. > > -- > Terry Jan Reedy All this stuff became and is becoming a huge and unsuable mess. You should not believe, you should know.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-07-28 13:58 +0100 |
| Message-ID | <mailman.1047.1438088301.3674.python-list@python.org> |
| In reply to | #94680 |
On 28/07/2015 09:50, Terry Reedy wrote: > On 7/27/2015 7:14 PM, Rob Gaddi wrote: >> On Sun, 26 Jul 2015 13:49:57 +0100, BartC wrote: >>> How do you actually install Numpy in Windows? > > I believe 'pip install numpy' works > >> As I recall you noodle around with it for a few hours making things that >> look like progress but turn out to be rabbit holes. > > To me, this is nonsense. If the above does not work, go to > http://www.lfd.uci.edu/~gohlke/pythonlibs/ > > One of the above worked for me a year ago. 10 minutes max. > You are able to use pip to go directly to sites to get files, which is extremely useful if you don't have Visual Studio and hence need to bypass the files directly available from pypi. I've used the following successfuly to get the Phoenix (Python 3) version of wxPython. pip install --trusted-host wxPython.org -U --pre -f http://wxPython.org/Phoenix/snapshot-builds/ wxPython_Phoenix So in theory you should be able to go straight to pythonlibs although I've not tried it myself. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-07-25 15:30 +0200 |
| Message-ID | <mailman.977.1437831069.3674.python-list@python.org> |
| In reply to | #94541 |
I can answer some of these.
In a message of Sat, 25 Jul 2015 04:39:43 -0500, "E.D.G." writes:
> At the moment our Perl programs use Windows "Pipes" plus files in an
>interactive mode to send data to Gnuplot so that the data can be plotted.
>That actually produces good results. But it is a complex and inefficient
>process. So part of the conversion process involves learning how to have
>Python or some other program plot data in the same interactive mode.
check out
matplotlib http://matplotlib.org/
mayavi http://docs.enthought.com/mayavi/mayavi/
bokeh http://bokeh.pydata.org/en/latest/
seaborn: http://stanford.edu/~mwaskom/software/seaborn/
There are others.
It sounds to me as if bokeh or mayavi animations are what you will
be most interested in, but we can discuss this more.
>1. The initial version of Python being used has to be a free download that
>is easy to understand. And it has to be compatible with Windows.
>
> Where can the best free download version of Python be obtained?
>
> Is the ActiveState version the best one for people who are not Python
>experts?
For you, I think not. Your use case sounds like you are seriously on
the 'scientific python' end of things. So you would be most interested
in installing either the Enthought Scientific Python Collection (Canopy)
https://store.enthought.com/
Or the Anaconda Scientific Python Suite:
https://store.continuum.io/cshop/anaconda/
Enthought has been the leader in Scientific Python for many, many years.
Anaconda is the new kid on the block. I cannot state which is better --
Anaconda is what we are using here at Chalmers University for the most
part.
They both duplicate the same functionality, for the most part, but
the conda package manager that comes with Anaconda is really terrific.
They bundle in all sorts of graphics and visualisation things. This
is where you should start your looking.
>2. Graphics - This is likely a fairly complicated question.
>
> What are some of the graphics options available with Python?
see Anaconda and Enthought for a good start. If they don't do what
you want, come back and discuss this more, we have plenty more
options.
>3. Fast Calculations
>
> It is my expectation that Python by itself does not do calculations
>very fast when compared to a language such as Fortran.
For the C version of Python, yes. There are many options for speeding
up your python, but for your purposes numpy -- which is integrated into
both the Enthought and Anaconda distribuitions is likely to be the
most useful. You can also integrate with Fortran libraries should
you want to here.
>4. What is the code for opening a Windows "Pipe" between a running Python
>program and some other program such as another Python or Perl program that
>can work with pipes?
No, clue, I don't know very much at all about Windows.
>5. We would want Python to check for a key press now and then without
>actually waiting until a key is pressed. What would be the command for
>that? It is likely something like Get_Key
Python knows _nothing_ about keys, keyboard input and the like.
Capturing that stuff is the function of the graphical user interface
program you use. Python has many of these. They all do it slightly
differently but you won't have any problems whatever one you pick.
>6. What is Python's version of the DOS level "System" command that many
>programs use as in:
>
>system "open notepad.exe"
Again, not a windows person but I am pretty sure you are looking for the
subprocess module:
For Python 2
https://docs.python.org/2/library/subprocess.html#module-subprocess
For Python 3
https://docs.python.org/3.5/library/subprocess.html#module-subprocess
>7. What is Python's version of the SendKey command that many programs use to
>send information to an active Windows program as in:
>
>SendKey("Message to be printed on the Notepad screen")
>
>or
>
>SendKey(Right Arrow Key)
We don't have one. You have to talk to your GUI toolkit for this.
>8. What commands does Python use to send to, and retrieve information from,
>the Windows clipboard?
I don't know, again, I think you have to talk to your GUI toolkit.
So, if I were you I would go check out the Enthought and Anaconda links
and see if you like what they have to offer. What Gui toolkit you should
use is partly a matter of personal preference, but often a matter of
what kit works best with whatever visualisation tool you choose.
In terms of the talking to people who heavily use the graphics toolkits
mentioned, well, this list isn't a bad place to look for people but
The scientific Python mailing list may get be a better place.
http://www.scipy.org/scipylib/mailing-lists.html
Anaconda also has a google group
https://groups.google.com/a/continuum.io/forum/#!forum/anaconda
And, of course, the various visualisers have their own mailing lists
and forums which may be of use.
Hope this helps,
come back with any more questions
Laura Creighton
[toc] | [prev] | [next] | [standalone]
| From | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| Date | 2015-07-25 08:45 -0500 |
| Message-ID | <l-CdndNp2vR_Dy7InZ2dnUU7-dmdnZ2d@earthlink.com> |
| In reply to | #94549 |
"Laura Creighton" <lac@openend.se> wrote in message
news:mailman.977.1437831069.3674.python-list@python.org...
>I can answer some of these.
Posted by E.D.G. July 25, 2015
Thanks for all of the comments. My retired professional programming
colleague is now going to have plenty of projects to work on. I myself am
neither retired nor a professional programmer and usually rely on him to do
the programming language exploration work.
Most of those "system," "Pipe", and "SendKey" type commands usually
refer to programs that are going to be running in a Windows environment.
And many or most of the experienced programmers who are using Perl, Python,
or Fortran appear to me to be using UNIX or Linux. So they might not be
familiar with some Windows related commands such as "system." It took me a
long, long time to learn how to get the Perl versions of those commands to
work.
Regards,
E.D.G.
[toc] | [prev] | [next] | [standalone]
| From | tjohnson <tandrewjohnson@outlook.com> |
|---|---|
| Date | 2015-07-25 15:16 -0700 |
| Message-ID | <36504953-b446-4ec5-a3ff-8ba4fc746a99@googlegroups.com> |
| In reply to | #94541 |
On Saturday, July 25, 2015 at 5:40:02 AM UTC-4, E.D.G. wrote:
> Posted by E.D.G. July 25, 2015
>
> This posting involves general interest matters and some specific
> questions regarding Python code usage. Any help would be appreciated.
>
> 1. Program conversion effort
> 2. Specific code questions
>
>
> 1. PROGRAM CONVERSION EFFORT
>
> An effort is underway by several people including myself to convert a
> complex Perl language program to some other language such as Python so that,
> among other things, the program's numerous calculations will run faster.
>
> Perl with the PDL module would probably work. But we could not get
> the needed type of support for the PDL module. We also looked at Julia and
> several versions of Basic. But they also did not appear to presently have
> the type of support that is needed.
>
> Fortran was tried. It is great for calculation speed and the Fortran
> users were quite helpful. But we could not get certain important questions
> answered regarding using Fortran to create Windows "Pipes" to other running
> programs etc.
>
> We are presently checking to see if Python has the needed features
> and adequate support from Python newsgroups or forums.
>
> At the moment our Perl programs use Windows "Pipes" plus files in an
> interactive mode to send data to Gnuplot so that the data can be plotted.
> That actually produces good results. But it is a complex and inefficient
> process. So part of the conversion process involves learning how to have
> Python or some other program plot data in the same interactive mode.
>
> In this case "interactive" means that when a chart is being displayed
> on the computer screen for example, a key such as a Right Arrow Key can be
> pressed. My main Perl program checks for key presses perhaps 10 times a
> second and if it detects one it sends the appropriate information to Gnuplot
> through a "Pipe" so that Gnuplot will open some data file and use its
> contents to draw a new chart. That redrawing process on a moderately fast
> computer occurs so rapidly the transition cannot even be seen.
>
> The Perl program does not simply wait for a key to be pressed because
> it is at times processing data in the background.
>
> It has been my experience that sending large amounts of data from one
> program to another using a Windows pipe doesn't work very well. So files
> are presently being used for bulk data transfers.
>
>
> 2. SPECIFIC CODE QUESTIONS
>
> It will likely take some time to get all of these questions
> completely answered, especially the ones involving graphics.
>
>
> 1. The initial version of Python being used has to be a free download that
> is easy to understand. And it has to be compatible with Windows.
>
> Where can the best free download version of Python be obtained?
>
> Is the ActiveState version the best one for people who are not Python
> experts?
>
> I always found it quite easy to install ActiveState versions of Perl.
>
>
> 2. Graphics - This is likely a fairly complicated question.
>
> What are some of the graphics options available with Python?
>
> Does it have its own internal graphics routines? Perl does not as
> far as I can tell. And we never had time to explore Fortran's graphics
> capabilities.
>
> I am aware of the existence of Matlab. But as stated, everything
> involved with this present effort has to be a free download so that
> programmers around the world can easily and inexpensively generate program
> subroutines etc.
>
>
> 3. Fast Calculations
>
> It is my expectation that Python by itself does not do calculations
> very fast when compared to a language such as Fortran.
>
> So, what options are available for increasing the speed of Python
> calculations?
>
> Python could call a Fortran program to do the calculations just as
> Perl could. But we would like to avoid having to use more than one language
> with this effort.
>
>
> 4. What is the code for opening a Windows "Pipe" between a running Python
> program and some other program such as another Python or Perl program that
> can work with pipes?
>
> Three examples are needed if possible, one for just sending, one for
> just receiving, and one that allows both sending and receiving. I know how
> to open Windows pipes using Perl.
>
>
> 5. We would want Python to check for a key press now and then without
> actually waiting until a key is pressed. What would be the command for
> that? It is likely something like Get_Key
>
>
> 6. What is Python's version of the DOS level "System" command that many
> programs use as in:
>
> system "open notepad.exe"
>
>
> 7. What is Python's version of the SendKey command that many programs use to
> send information to an active Windows program as in:
>
> SendKey("Message to be printed on the Notepad screen")
>
> or
>
> SendKey(Right Arrow Key)
>
>
> 8. What commands does Python use to send to, and retrieve information from,
> the Windows clipboard?
>
>
> Regards, and thanks again for any assistance with this.
>
> E.D.G.
It looks like Laura has answered most of your questions pretty well. I'm sorry that I forgot about your questions until now. I was busy because the hard drive on my primary PC failed last night.
The only thing I can think of right now to add is that regarding #8, you can also use the PyWin32 module on Windows for clipboard access. If your code needs to be cross-platform, this isn't an option, but if not, you might find it to be very useful. It might also have capabilities for #3 and #7, but I don't have it installed anymore, so I'm not sure.
[toc] | [prev] | [next] | [standalone]
| From | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| Date | 2015-07-26 14:17 -0500 |
| Message-ID | <ks2dnVPporT-ryjInZ2dnUU7-W2dnZ2d@earthlink.com> |
| In reply to | #94541 |
"E.D.G." <edgrsprj@ix.netcom.com> wrote in message
news:jf6dnQiMOZ_GxC7InZ2dnUU7-S2dnZ2d@earthlink.com...
Posted by E.D.G. July 26, 2015
These are some additional comments related to my original post.
The effort I have been discussing actually involves developing a
totally free version of some language that scientists around the world could
easily install and use.
1. With my own science related Perl programs I provide people with .exe
versions in addition to the .pl versions. And for the .pl versions, at one
of my Web sites there is actually an entire Perl programming language
directory available in a .zip package. So, people can download the file,
unzip it, and then save it as the Perl directory and .pl programs will then
run on that computer. We would like to be able to do the same thing with
Python if we start working with that language. And a response in another
post indicates that this should be possible.
2. Python looks especially attractive because so many people are using it.
And I myself have a friend who is a very experienced professional Python
programmer. On the other hand, there are so many versions of Python that it
might be difficult at first to determine which one to start with.
3. I asked that Python programmer if Python could run on an Internet server
as a CGI program. And the answer was "I have no idea." So, amusingly,
apparently even experienced professional programmers don't know everything
there is to know about a given programming language!
4. I myself know that Perl programs will run on Internet servers as CGI
programs and have written several myself using a development program called
Xampp to create and test them before installing them on the server computer.
5. My retired professional programming colleague has now told me that he
downloaded and installed the ActiveState Windows version of Python with no
difficulties. So, that is encouraging news.
6. He said that he is looking around for a good IDE for Python and found
one called "Eric" that he is checking.
7. With my Perl language programs I have developed a resource that will do
the following. And I imagine that this could also be done with Python.
This resource can't be developed with many and probably most programming
languages.
In part because of limited calculation speeds it can take one of my
important probability calculation Perl programs as much a two hours to run
and create all of the necessary data arrays. Many, many millions of
calculations are involved. And once everything is set, for time limitation
reasons it would be ordinarily be impossible to make any changes to the data
or to the original program code without losing all of the data.
So, I have developed a special Perl program that makes that possible.
And as I said, I am guessing that this approach would also work with Python.
When the Perl program is done with its calculations, instead of
ending it jumps to another Perl program. But all of the data in the arrays
it created remain active in memory. The original program code can then be
changed. The second Perl program is then told that the changes are complete
and that it should return to the first program. Perl then attempt to
recompile the original code. If it is successful it then uses the new code
and does whatever is specified. The previously created arrays are still
active in memory using the same array names etc.
If there was an error in the new code, a Windows screen appears
explaining that there was an error and the compilation ends. But, the data
remain in the active computer memory.
Changes can then be are made to the program code to fix the error.
And, the second Perl program is told to try again. If there are no new
errors the first program recompiles and runs using the already created
arrays etc.
This is a very useful resource for scientists as it lets them create
and test new program code without having to recreate all of the data arrays.
And as I stated, it would probably not be possible to develop such a
resource with most programming languages.
Regards,
E.D.G.
[toc] | [prev] | [next] | [standalone]
| From | mm0fmf <none@mailinator.com> |
|---|---|
| Date | 2015-07-26 22:15 +0100 |
| Message-ID | <J5ctx.20800$IK6.11473@fx46.am4> |
| In reply to | #94645 |
On 26/07/2015 20:17, E.D.G. wrote: > "E.D.G." <edgrsprj@ix.netcom.com> wrote in message > news:jf6dnQiMOZ_GxC7InZ2dnUU7-S2dnZ2d@earthlink.com... > > Posted by E.D.G. July 26, 2015 > > These are some additional comments related to my original post. > > The effort I have been discussing actually involves developing a > totally free version of some language that scientists around the world > could easily install and use. > > > 1. With my own science related Perl programs I provide people with .exe > versions in addition to the .pl versions. And for the .pl versions, at > one of my Web sites there is actually an entire Perl programming > language directory available in a .zip package. So, people can download > the file, unzip it, and then save it as the Perl directory and .pl > programs will then run on that computer. We would like to be able to do > the same thing with Python if we start working with that language. And > a response in another post indicates that this should be possible. > > 2. Python looks especially attractive because so many people are using > it. And I myself have a friend who is a very experienced professional > Python programmer. On the other hand, there are so many versions of > Python that it might be difficult at first to determine which one to > start with. > > 3. I asked that Python programmer if Python could run on an Internet > server as a CGI program. And the answer was "I have no idea." So, > amusingly, apparently even experienced professional programmers don't > know everything there is to know about a given programming language! > > 4. I myself know that Perl programs will run on Internet servers as CGI > programs and have written several myself using a development program > called Xampp to create and test them before installing them on the > server computer. > > 5. My retired professional programming colleague has now told me that > he downloaded and installed the ActiveState Windows version of Python > with no difficulties. So, that is encouraging news. > > 6. He said that he is looking around for a good IDE for Python and > found one called "Eric" that he is checking. > > 7. With my Perl language programs I have developed a resource that will > do the following. And I imagine that this could also be done with > Python. This resource can't be developed with many and probably most > programming languages. > > In part because of limited calculation speeds it can take one of > my important probability calculation Perl programs as much a two hours > to run and create all of the necessary data arrays. Many, many millions > of calculations are involved. And once everything is set, for time > limitation reasons it would be ordinarily be impossible to make any > changes to the data or to the original program code without losing all > of the data. > > So, I have developed a special Perl program that makes that > possible. And as I said, I am guessing that this approach would also > work with Python. > > When the Perl program is done with its calculations, instead of > ending it jumps to another Perl program. But all of the data in the > arrays it created remain active in memory. The original program code > can then be changed. The second Perl program is then told that the > changes are complete and that it should return to the first program. > Perl then attempt to recompile the original code. If it is successful > it then uses the new code and does whatever is specified. The > previously created arrays are still active in memory using the same > array names etc. > > If there was an error in the new code, a Windows screen appears > explaining that there was an error and the compilation ends. But, the > data remain in the active computer memory. > > Changes can then be are made to the program code to fix the > error. And, the second Perl program is told to try again. If there are > no new errors the first program recompiles and runs using the already > created arrays etc. > > This is a very useful resource for scientists as it lets them > create and test new program code without having to recreate all of the > data arrays. And as I stated, it would probably not be possible to > develop such a resource with most programming languages. > > Regards, > > E.D.G. > Am I the only person thinking Troll?
[toc] | [prev] | [next] | [standalone]
| From | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| Date | 2015-07-26 17:08 -0500 |
| Message-ID | <Q5SdnTejbKKjxyjInZ2dnUU7-TednZ2d@earthlink.com> |
| In reply to | #94648 |
"mm0fmf" <none@mailinator.com> wrote in message
news:J5ctx.20800$IK6.11473@fx46.am4...
> Am I the only person thinking Troll?
Posted by E.D.G. July 26, 2015
In my opinion, one of the most important aspects in considering the
selection of a new programming language is the willingness of people posting
notes to the language's newsgroup to be friendly and cooperative. And in
that regard, I have found the Fortran people to be the best. I never
encountered an unfriendly note in that newsgroup. Unfortunately, Fortran
just "ran out of steam" when it came to Windows applications.
As far as I can recall, yours is only the second time I have
encountered a Python newsgroup note that, in my opinion, did not have a
friendly tone to it. And if that appears to be the general case here then
all of the people with whom I work will just dump Python as a language to
consider.
The Perl newsgroup is yet another matter. And we have all largely
decided to abandon Perl as the language of choice because it has seemed to
be so difficult to get any help in that newsgroup.
Regards,
E.D.G.
[toc] | [prev] | [next] | [standalone]
| From | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| Date | 2015-07-26 17:32 -0500 |
| Message-ID | <xaSdnUDKM5NAwijInZ2dnUU7-LOdnZ2d@earthlink.com> |
| In reply to | #94652 |
"E.D.G." <edgrsprj@ix.netcom.com> wrote in message
news:Q5SdnTejbKKjxyjInZ2dnUU7-TednZ2d@earthlink.com...
Posted by E.D.G. July 26, 2015
There is an additional comment for people who are interested in
scientific programming efforts.
Most people are aware that when the U.S. Government tried to get a
Web site running in connection with the Affordable Care Act a while ago, the
government Web site crashed.
One of the major problems with government programming efforts appears
to me to be the fact that people working in different government agencies
are often using different programming languages. And those people don't
communicate with one another. The results are inefficiency.
To demonstrate that the programming effort I am discussing is quite
serious I am providing the following indirect link. This is for a proposed
effort to get as many government scientists etc. as possible connected with
one another and moving in the same direction at the same time.
http://www.freewebs.com/eq-forecasting/DSAT.html
If that type of program does eventually get created then the
government scientists are still going to want some computer language that
they can all work with. And an important question at this time is, "Might
one of the languages of choice be Python?"
Regards,
E.D.G.
[toc] | [prev] | [next] | [standalone]
| From | Ned Batchelder <ned@nedbatchelder.com> |
|---|---|
| Date | 2015-07-26 16:12 -0700 |
| Message-ID | <b68af3d4-6f12-49d6-8c15-f18a95441eda@googlegroups.com> |
| In reply to | #94648 |
On Sunday, July 26, 2015 at 5:15:31 PM UTC-4, mm0fmf wrote: > On 26/07/2015 20:17, E.D.G. wrote: > > "E.D.G." <edgrsprj@ix.netcom.com> wrote in message > > news:jf6dnQiMOZ_GxC7InZ2dnUU7-S2dnZ2d@earthlink.com... > > > > Posted by E.D.G. July 26, 2015 > > > > These are some additional comments related to my original post. > > > > The effort I have been discussing actually involves developing a > > totally free version of some language that scientists around the world > > could easily install and use. > > > > > > 1. With my own science related Perl programs I provide people with .exe > > versions in addition to the .pl versions. And for the .pl versions, at > > one of my Web sites there is actually an entire Perl programming > > language directory available in a .zip package. So, people can download > > the file, unzip it, and then save it as the Perl directory and .pl > > programs will then run on that computer. We would like to be able to do > > the same thing with Python if we start working with that language. And > > a response in another post indicates that this should be possible. > > > > 2. Python looks especially attractive because so many people are using > > it. And I myself have a friend who is a very experienced professional > > Python programmer. On the other hand, there are so many versions of > > Python that it might be difficult at first to determine which one to > > start with. > > > > 3. I asked that Python programmer if Python could run on an Internet > > server as a CGI program. And the answer was "I have no idea." So, > > amusingly, apparently even experienced professional programmers don't > > know everything there is to know about a given programming language! > > > > 4. I myself know that Perl programs will run on Internet servers as CGI > > programs and have written several myself using a development program > > called Xampp to create and test them before installing them on the > > server computer. > > > > 5. My retired professional programming colleague has now told me that > > he downloaded and installed the ActiveState Windows version of Python > > with no difficulties. So, that is encouraging news. > > > > 6. He said that he is looking around for a good IDE for Python and > > found one called "Eric" that he is checking. > > > > 7. With my Perl language programs I have developed a resource that will > > do the following. And I imagine that this could also be done with > > Python. This resource can't be developed with many and probably most > > programming languages. > > > > In part because of limited calculation speeds it can take one of > > my important probability calculation Perl programs as much a two hours > > to run and create all of the necessary data arrays. Many, many millions > > of calculations are involved. And once everything is set, for time > > limitation reasons it would be ordinarily be impossible to make any > > changes to the data or to the original program code without losing all > > of the data. > > > > So, I have developed a special Perl program that makes that > > possible. And as I said, I am guessing that this approach would also > > work with Python. > > > > When the Perl program is done with its calculations, instead of > > ending it jumps to another Perl program. But all of the data in the > > arrays it created remain active in memory. The original program code > > can then be changed. The second Perl program is then told that the > > changes are complete and that it should return to the first program. > > Perl then attempt to recompile the original code. If it is successful > > it then uses the new code and does whatever is specified. The > > previously created arrays are still active in memory using the same > > array names etc. > > > > If there was an error in the new code, a Windows screen appears > > explaining that there was an error and the compilation ends. But, the > > data remain in the active computer memory. > > > > Changes can then be are made to the program code to fix the > > error. And, the second Perl program is told to try again. If there are > > no new errors the first program recompiles and runs using the already > > created arrays etc. > > > > This is a very useful resource for scientists as it lets them > > create and test new program code without having to recreate all of the > > data arrays. And as I stated, it would probably not be possible to > > develop such a resource with most programming languages. > > > > Regards, > > > > E.D.G. > > > > Am I the only person thinking Troll? Yes. --Ned.
[toc] | [prev] | [next] | [standalone]
| From | "E.D.G." <edgrsprj@ix.netcom.com> |
|---|---|
| Date | 2015-07-26 18:58 -0500 |
| Message-ID | <1c6dnRzGjJyP6SjInZ2dnUU7-S-dnZ2d@earthlink.com> |
| In reply to | #94654 |
"Ned Batchelder" <ned@nedbatchelder.com> wrote in message
news:b68af3d4-6f12-49d6-8c15-f18a95441eda@googlegroups.com...
>> Am I the only person thinking Troll?
> Yes.
Posted by E.D.G. July 26, 2015
With some humor intended, thanks for the supportive note.
This is an indirect URL for a potentially important computer program
that I feel needs to be developed. Unfortunately, although Python could be
used to create PC or Mac versions of the program I don't think that those
programs would run on Internet server computers. But I don't yet know
enough about Python to be able to tell if that is the case or not.
http://www.freewebs.com/eq-forecasting/Disaster_Response_System.html
There are two Perl programs that I have developed that I believe many
Python users would like to have available in Python versions. And at some
point I might create a Web page that will discuss them in detail. For the
moment I have just made the decision to combine them into a single program
that would be quite helpful for the scientific community. People don't
actually even need my assistance with developing these types of programs.
Some versions are likely already available for free.
The first program can do things such as automatically go to a Web
site that provides weather information for example, feed information to the
Web page program running at that site, wait for the results, copy them to a
PC or Mac, and start processing the data. It is a tremendously powerful and
versatile program that can save scientists etc. large amounts of time by
helping them automate repetitive tasks that take a lot of time if done
manually. Microsoft at one time had a Windows program available that did
things like that. I seem to remember that it was called "Recorder." My own
Perl version of the program is many times more powerful.
The second program acts as a type of universal communicator for
Windows programs. It would actually work with any operating system.
Running in the background it can start, stop, and interact with any
Windows compatible programs such as other Perl programs, Notepad.exe, Excel,
Fortran, Python undoubtedly, and also execute DOS shell commands etc. With
word processor programs and spreadsheet programs like Excel it makes life
much easier as a person needs to learn how to program in only one language
to get things done instead of all of those individual macro languages.
Regards,
E.D.G.
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-07-27 11:15 +0200 |
| Message-ID | <mailman.1029.1437988555.3674.python-list@python.org> |
| In reply to | #94656 |
In a message of Sun, 26 Jul 2015 18:58:14 -0500, "E.D.G." writes: > This is an indirect URL for a potentially important computer program >that I feel needs to be developed. Unfortunately, although Python could be >used to create PC or Mac versions of the program I don't think that those >programs would run on Internet server computers. But I don't yet know >enough about Python to be able to tell if that is the case or not. Sure they will. That thing about the Affordable Health Care Act you mentioned -- do you know how this got _fixed_? People in this community, notably Alex Gaynor went and turned the lot into a Django Python app. He's now working for the US department of Veteran Affairs, turning more things into Django apps so that veterans can get their claims processed in weeks (they are aiming for days) rather than 6-8 months which was the norm before he got their. His plan is to speed up the US government with Python one agency at a time. There are many techniques you can use to make your Python code fast. I think we are much better off in that regard than the Perl users are. If you need better than CPython performance, you might be able to just use numpy numerical arrays and get the improvement you need. Or you might just stop using CPython, and use PyPy, which is a completely different implementation and which has a JIT that gives rather good performance, often on the order of pure C code. see http://speed.pypy.org/ Or you can use Cython http://cython.org/ to make C extensions out of the part of your python code you would like to run faster. Or maybe there already is a C or Fortran library that already does what you want, you just want to use it in your code. There are techniques for just doing this -- and if the library is well known then chances are somebody else has already made python bindings for it so you can just use it with CPython. I wouldn't worry about speed. If you want to reimplement your webscraping Perl program in Python, I suggest you start with this library http://scrapy.org/ rather than reinventing things from scratch. The scrapy community is very happy to get code with new techniques which they add to the library, and then we all benefit. Laura
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2015-07-27 01:18 +0100 |
| Message-ID | <mailman.1021.1437956325.3674.python-list@python.org> |
| In reply to | #94654 |
On 27/07/2015 00:12, Ned Batchelder wrote: > On Sunday, July 26, 2015 at 5:15:31 PM UTC-4, mm0fmf wrote: >> On 26/07/2015 20:17, E.D.G. wrote: [around 90 lines snipped] >> >> Am I the only person thinking Troll? > > Yes. > > --Ned. > Was it really necessary to resend all of the original for the sake of a seven word question and a one word answer? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | mm0fmf <none@mailinator.com> |
|---|---|
| Date | 2015-07-27 17:46 +0100 |
| Message-ID | <kfttx.13420$ur5.269@fx20.am4> |
| In reply to | #94657 |
On 27/07/2015 01:18, Mark Lawrence wrote: > On 27/07/2015 00:12, Ned Batchelder wrote: >> On Sunday, July 26, 2015 at 5:15:31 PM UTC-4, mm0fmf wrote: >>> On 26/07/2015 20:17, E.D.G. wrote: > > [around 90 lines snipped] > >>> >>> Am I the only person thinking Troll? >> >> Yes. >> >> --Ned. >> > > Was it really necessary to resend all of the original for the sake of a > seven word question and a one word answer? Yes? ;-)
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | comp.lang.python
csiph-web