Python Questions - July 25, 2015
jonas at wielicki.name
Sat Jul 25 12:58:51 CEST 2015
-----BEGIN PGP SIGNED MESSAGE-----
These are quite a few questions and I’ll try to answer some of them. I
have cut out the windows specific questions because I cannot answer them
On 25.07.2015 11:39, E.D.G. wrote:
> 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.
Using pipes should be no problem, but for plotting, see below.
> 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.
This may be off topic, but I guess that should in fact be fast.
Otherwise, have you tried using localhost TCP sockets?
> 2. SPECIFIC CODE QUESTIONS
> 2. Graphics - This is likely a fairly complicated question.
> What are some of the graphics options available with Python?
Python comes with support for tk and there are bindings available for
Qt and Gtk, but I think for your special use case, there are better
> 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.
There is a python package called matplotlib . I think it’s
interface is in fact inspired by Matlab and it provides powerful and
interactive plotting capabilities.
> 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.
You are correct.
> So, what options are available for increasing the speed of Python
Numpy and Scipy  are packages which were made just for that.
> 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.
In fact, Numpy and Scipy use compiled Fortran code as far as I know --
but that is of no matter for a python user, they just see the very
comfortable pythonic interface.
> 6. What is Python's version of the DOS level "System" command that
> many programs use as in:
> system "open notepad.exe"
# this blocks until `open` returns
# returns immediately, `open` continues to run in the background
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the Python-list