New user questions ... be gentle

François Pinard pinard at iro.umontreal.ca
Sun Aug 20 09:41:28 EDT 2000


[bushi]

> Looking through some of the messages here, it seems that most of the
> folks contributing have a very good grasp on Python.  Please don't bite
> too hard if these questions seem very obvious.  I'm just getting started
> with this program.

Surely no problem.  You'll soon be just another folk who has a very good
grasp on Python, and help others in turn.  So the members of this group
have every reason to get you on their side! :-)

> I use pointers and linked lists a lot in the other languages.  I have
> seen some references that hint to a way to do this but it isn't very
> clear.

Python is nothing but references, which are not far from pointers.
Maybe you could show us a few of the problems you have for which you have
some difficulty in finding Python equivalents.  My guess is that you'll find
out you already have the solution handy, and it is _so_ clear that you do
not realise you are still using pointers, which are obfuscated by comparison.

The same applies for linked lists.  Just use Python ordinary lists: they
probably well do the job on average.  They are internally implemented as
arrays, making efficient to follow the list forward or backward, or jumping
to any list element knowing its numerical position.  If for some reason
(which I invite you to share with us) they are not satisfactory, you might
indeed implement more traditional linking, but it is overkill, usually.

> I may be wrong on this but some scripts look as thought they are
> executable like .exe files.  How is this done?

>From your question, I presume you work on Windows, while my culture is
more on the Unix side.  I'm sure this is quite doable on both platforms.
On Linux, you just mark your script as executable (with `chmod +x FILE')
and ensure it starts with the line `#/usr/bin/env python'.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard




More information about the Python-list mailing list