Smal question

H

Hans Müller

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
 
H

Hans Müller

Thanks a lot,

you made my day.

As often in python, it's really simple and useful !

Greetings

Hans
 
B

Bruno Desthuilliers

Hans Müller a écrit :
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.

What do you mean "installed in the interpreter" ?
 
T

Terry Reedy

Bruno said:
Hans Müller a écrit :

What do you mean "installed in the interpreter" ?

He probably meant either compiled into the interpreter or installed in
the interpreter directory, not knowing that one can import from the
project directory, and that the project directory gets added to the
front of sys.path (as '.').
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top