NEWBIE: Confussed about Python!
Steve Holden
sholden at holdenweb.com
Mon Jan 14 11:17:43 EST 2002
"Max Adams" <RubberDucky703 at hotmail.com> wrote in message
news:glD08.46$Tu1.11667 at news1.cableinet.net...
> Hello, i'm new to python although not new to programming in general - i
have
> programmed in C++/Delphi/VB extensively.
>
> I am looking at python and have been reading some documentation about it
on
> the web site python.org.
> I have a few questions:
>
> 1) Can python run on a web server, and does it provide the same
> functionallity ASP and PHP do?
>
Yes, more and more respectively. Python can run as a simple CGI scripting
language, it can also be installed as a Active Scripting language if you
want to use it in ASP contexts, and it's a full general-purpose scripting
language. With its web-oriented libraries it does everything you can do with
ASP or PHP (and, as I said, more).
> 2) I assume that when code is compiled by the interpreter it compiles to
an
> "a.out" executable under linux and a "program1.exe" under windows - the
> filenames are not important what i am trying to assertane is, is code
> compiled to a executable file format, or does more need to be done with
it.
>
Nope. By default *libraries* that are imported are converted into *.pyc
files, which are coimpiled bytecodes. The interpreter has not facility to
generate machine code.
Various solutions arepossible to allow you to distribute Python programs:
the two best-known are py2exe and Gordon McMillan's installer. Both allow
you to build easy-to-install distributions of Python programs [the problem
they overcome is making sure that the target system contains all necessary
bits of the Python language system].
> 3) How can python be linked to databases such as Ms Access and MySQL?
>
Various driver modules are available conforming to the Python DB API
(currently at version 2.0). Generally there is at least one module for each
of the better-known databases.
There are also DBA-compliant ODBC modules for those database without native
drivers.
Finally, on Windows platforms you can load the win32all extensions and use
ADO to access databases with the necessary drivers.
> 4) What is python commonly used for?
>
Just about everything, from complex object-oriented web frameworks to
scientific computing, stopping at all stations en route!
>
> I really appreciate your input on this.
>
> Sorry if these are elementary questions - hey we all have to start
> somewhere!
>
Well, www.python.org would be your best starting-point. Lots of useful links
from there. Welcome to Python!
regards
Steve
--
http://www.holdenweb.com/
More information about the Python-list
mailing list