CODING and CROSS PLATFORM

Alex Martelli aleaxit at yahoo.com
Tue Nov 7 10:30:07 CET 2000


"grant" <gsc at ultra.net.au> wrote in message
news:3a078743 at mega.ultra.net.au...
> I have been using computers for 10 years : MAC->WINDOWS->now LINUX
> I am only now beginning to see the light.
> Also I beleive Python is the replacement for Visual Basic which was my
> main language.
>
> I am very interested in the CROSS PLATFORM abilities of Python and am
> about to start a big project with PYTHON

So far, so good.  Python may be less emphatically oriented to
cross-platform work than Tcl (I used to doubt that, but I've
had to accept some arguments to this end that were posed in
this group: Tcl does work much harder to 'equalize' functionality
on different platforms), but surely has it all over VB in this
regard -- and it's a stronger language than either, _per se_.
So, I consider it an excellent choice for your stated goal.


> What is in your opinion the best way to develope high performance front
> ends LIKE Visual Basic Forms/compiled which is then EASILY cross platform
> compiled to use in windows and also
> in Linux windows. I am very interested in the best Linux GUI that complies
> with windows in terms of Objects like Listboxs / Buttons / Picturebox's.

wxWindows (and wxPython) is my candidate for this role.  wxWindows is
a GUI-and-other-crossplatform-stuff framework, main/original author
Julian Smart, coded in C++; I've seen it work excellently on Linux
and Win32, and I'm told it's now just as good on Mac and BeOs (but I
have no first hand experience of either of those, sorry).  wxPython
makes available in Python terms just about everything in wxWindows
that would be available if you were coding in C++.

Tkinter (Python's interface to Tk) is the more-classical "competitor"
to wxPython (Python's interface to wxWindows), and there are other
possibilities too.  But, if I were you, I'd have a look at the wx
stuff first.  (All of these toolkits are free and open-source...).


> I want to use python as a scripting tool for a highly functional database
> creation application.
>
> 1st question is what are the best compilers to create fast backend PYTHON
> objects in for windows/linux.

I'm not sure I understand your question.  Do you mean _Python_ "compilers"?
The Python 2 distribution includes its own bytecode compiler (generating
compiled bytecode files, .pyc normally or .pyo with optimization).  Or
do you mean C/C++ compilers for writing special interface-with-Python
modules?  In that case, Microsoft Visual C++ is probably best (apart from
the cost) for Windows, gcc for Linux (you can also use Borland's free bcc,
or, I think, gcc's version mingw32, to make modules-for-Python on Windows,
but it's not as handy/speedy as using MSVC++ for the purpose).

> 2nd Question  is what are the best tools/compilers to create windows and
GUI
> front end objects so I don't have to RECODE for both platforms.

See above -- wxWindows/wxPython.

> I was wondering is there a C++ toolkits/libraries that are helpful
> in getting the GUI objects ported easily.

Yes, that's exactly wxWindows' job.  Tk is coded in C (not C++), but
that surely doesn't diminish ease-of-porting, by the way.

> I was also wondering where I can get good examples of python code as I
> have been spoilt for to long by the huge VB community.

The wxPython distribution comes with lots of demo/example code (making
up a bit for the documentation, which is basically in form of glosses
and comments on the C++ oriented wxWindows docs...) for creating and
handling many sorts of GUI elements.

The .py modules in the Python distribution (both the library sources
and the demos/examples) tend to be very good and instructive examples
of Python coding for general-programming low-level tasks; it's good
to get intimately acquainted with them, as you'll be using those nice
library modules a lot in your applications, as well as learning tricks
and techniques from them seen-as-examples.

The Gadfly module implements a whole relational database management
system (SQL-based) in Python.  You probably don't want to do any such
thing (though you might *use* that module:-), but it's definitely
very instructive in an abstract sort of way.

The Vaults of Parnassus are an unending repository of code and links
to all sorts of things Pythonish -- including lots of good examples.


Alex






More information about the Python-list mailing list