How to use 'export pythonpath' in Python

Every line of 'export pythonpath' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
27def export_py():
28 global proto_path
29 global protoc_path
31 # protoc 生成py时,必须将当前目录改到proto所在目录,参数中路径必须用相对路径
32 os.chdir(proto_path)
34 for file in os.listdir(proto_path):
35 if file[-6:] == ".proto" and os.path.isfile(os.path.join(proto_path,file)):
36 cmd = "{0} --python_out={1} {2}".format(protoc_path,"./../output/python",file)
37 os.system(cmd)
39 pass

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

Related snippets