dsl - How do I import python scripts that have a custom extension instead of default .py? -
this question has answer here:
i have 'test engine' (which big python script defines lot of functions) can run multiple 'test suites' (which python scripts, uses functions test-engine define custom tests).
it intended test-cases should written non-programmers pedagogic reasons want enforce give scripts .tcs
extension instead of .py
extension.
when doubleclick main-application, test engine find .tcs
files in same directory using glob()
, import
of them execute statements sequentially.
thanks alex thornton pointing out solution.
imp.load_source("importname","script.extension")
Comments
Post a Comment