Re: Same import lines again and again
Well, individual files have to import to their local names spaces, but there are a few ways to edge around that. What you can do in create a dependances script and then import that. So for example lets say you have two scripts, script1 and script2, both have to import a bunch of things. Rather than importing everything to each script, you just import the dependances file, like so:
#dependances.py
import numpy
import os
import sys
#script1
import dependances
#script2
import dependances
This way, your only ever importing a single file.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector