New to Python; what about #include, extern and function prototypes

Bo Jacobsen bo at systemhouse.dk
Sun Mar 7 07:31:27 EST 2004


> In article <Fkx2c.105588$jf4.6345669 at news000.worldonline.dk> (Sun, 07 Mar
> 2004 05:14:20 +0100), Bo Jacobsen wrote:
>
> > I'm new to Python, and it looks as if there is no
> > C like "#include and extern" or function protypes.
>
> That's right.
>
> > No shell like ".
> > ../filename"
>
> I don't understand this part.
>
> > Is there any way to implement them ?
>
> I don't know.  I've been a C programmer for almost exactly 20 years:
Neither
> "extern" nor function prototypes are necessary in Python.
>
> > PS: For me, "import module" is no replacement for include.
>
> "import" and "#include" do not have exactly the same meaning but they
> accomplish more or less the same result.
>
> What is it you're trying to do that requires these C/C++ features?

I'm looking for a future replacement for bash and I have a number of large
shell scripts that need to be translated to a language that are better at
handling
more complicated datatypes.
I'm been looking at perl and python, and I really like the strict syntax,
handling
of function parameters etc. Without include and function prototyping though,
will probably have the effect that large source files, with a lot of
function
definitions at the top, will be generated. Not god.

Perl on the other hand has it all, including very productive features as
built-in
regular expressions, file scanning etc. but I dont like all the
type-characters and
the "lose" syntax.


. ./filename
Is the shell "include/execute" command.

Bo





More information about the Python-list mailing list