Python is a commonly used computer language in computer languages and has very powerful functions. Do you know how to set environment variables in Python? If you want to know the specific content, you can click the following article to learn about it.
How to Set environment variables in Python
Find the PATH in the system variable, double-click the PATH, and add "; C: \ Python25" (do not quote) at the end. Next, run-> cmd and enter python in the command line window to run the command.
Input
- print "Hello World!"
The following results should be returned:
- >>> print "Hello World!"
- Hello World!
In the command line window, enter python in the Python article to set the classification of environment variables: Python Programming
- #!/usr/bin/python
- #FileName:setDbgServerBridge.py
- import os
- path=os.environ["HOME"] + "/lib"
- if os.path.exists(path)==False :
- os.makedirs(path)
- else:
- print "exists"
- dstFile=path + "/libeclipse_ct_debug_core_
utility_DbgServerBridge.so"
- srcFile="./libeclipse_ct_debug_core_
utility_DbgServerBridge.so"
- commandLine = "cp ./libeclipse_ct_debug_
core_utility_DbgServerBridge.so " + dstFile
- os.system(commandLine)
- os.environ["LD_LIBRARY_PATH"]=path
The above describes how to set environment variables in Python.