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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -