Include a file: Difference between revisions
Content added Content deleted
Line 181: | Line 181: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
Python supports the use of [http://docs.python.org/library/functions.html#execfile execfile] to allow code from arbitrary files to be executed from a program (without using its modules system). |
Python supports the use of [http://docs.python.org/library/functions.html#execfile execfile] to allow code from arbitrary files to be executed from a program (without using its modules system). |
||
<lang Python>import mymodule</lang> |
|||
includes the content of mymodule.py |
|||
Names in this module can be accessed as attributes: |
|||
<lang Python>mymodule.variables</lang> |
|||
=={{header|QBasic}}== |
=={{header|QBasic}}== |