Basic Python Questions - Oct. 31, 2013

Chris “Kwpolska” Warrick kwpolska at gmail.com
Thu Oct 31 06:03:01 EDT 2013


On Thu, Oct 31, 2013 at 10:31 AM, E.D.G. <edgrsprj at ix.netcom.com> 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 other programs such
> as XBasic for possible use.
>
> 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.

Depends on what do you want to calculate.  Also, note that Python is
liked by the scientific community to use for calculations.  This might
be a hint.

> 2.  Can Python be used to create CGI programs?  These are the ones that run
> on Internet server computers and process data submitted through Web site
> data entry screens etc.  I know that Perl CGI programs will do that.

Yes.  Although most people in the Python community dislike the
old-style “CGI” and use “web apps” instead.  They are also connected
with a different philosophy, for example we do not store .py files in
/cgi-bin/, we never expose our .py files and put it somewhere else on
the system and let the web server act as a proxy to a WSGI server
(gunicorn/uwsgi).

> 3.  If Python can be used for CGI programming, can it draw charts such as
> .png files that will then display on Web pages at a Web site?

Yes, but you need to install additional libraries for that.

> 4.  How well does Python work for interactive programming.  For example, if
> a Python program is running on a PC and is drawing a chart, can that chart
> be modified by simply pressing a key while the Python program is running.  I
> have Perl and Gnuplot program combinations that can do that.  Their
> interactive speed is not that great.  But it is adequate for my own uses.

Doable, but I cannot give you any information on the speed.

> 5.  Can a running Python program send information to the Windows operating
> system as if it were typed in from the keyboard?  Perl can do that and I
> would imagine that Python probably has that same capability.

Definitely possible, but might take you a bit of work and knowledge of
Windows internals (go ask Google).

-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense



More information about the Python-list mailing list