import os
os.environ['DEBUSSY'] = '1'
os.environ['FSDB'] = '1'
# Open child processes via os.system(), popen() or fork() and execv()
someVariable = int(os.environ['DEBUSSY'])
首先:)阅读书籍是解决问题的 好极了方法; 它是解决问题的创可贴和长期投资的区别。永远不要错过学习的机会。校对: D
您可以使用 选吧将 1解释为一个数字,但是环境变量并不关心这个,它们只是传递字符串:
The argument envp is an array of character pointers to null-
terminated strings. These strings shall constitute the
environment for the new process image. The envp array is
terminated by a null pointer.