In order to use external modules on Saagie platform it is possible to import required module within your package.
For example to use polyglot module:
# Module import import pygogo as gogo import statistics # Use of module def compute_mean(data): gogo.Gogo('stdout', low_hdlr=hdlr).logger.debug(statistics.mean(data)) # Script if __name__ == '__main__': hdlr = gogo.handlers.stdout_hdlr() compute_mean([1, 2, 7, 9, 5]) |
Please note that whenever there is more than one python file into the zip archive, there have to be a __main__.py
file which will be used as an entry point.
python {file} |