Smal question

Nick Dumas drakonik at gmail.com
Thu Jul 10 11:04:00 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is easy. Simply create a .py file containing all the methods you
want to share. Put this file in the same directory as the rest of your
project files. In each of your project files that requires one of the
methods, simply "import <name of method file>". Python supports
impromptu module creation, which is great just for circumstances like this.

Hans Müller wrote:
> Hello group,
> 
> I have some scripts sharing some common functions.
> So what I'd like to have is a modern include.
> Of course python does not have (with good reasons) no include statement.
> But I'm too lazy to create a module which has to be installed into the
> interpreter for some functions I need to share in a project.
> Is there any idea to do this ?
> 
> Thanks a lot
> 
> Hans
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkh2JOAACgkQLMI5fndAv9gZiACeP3puvMknR2HQTOXKaNeBtC+h
tyEAn3C6g9E5U5xXE4SQ7u368xdvkRx4
=J6Sv
-----END PGP SIGNATURE-----



More information about the Python-list mailing list