Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../lib64/python2....
File: user.py
"""Hook to allow user-specified customization code to run.
[0] Fix | Delete
[1] Fix | Delete
As a policy, Python doesn't run user-specified code on startup of
[2] Fix | Delete
Python programs (interactive sessions execute the script specified in
[3] Fix | Delete
the PYTHONSTARTUP environment variable if it exists).
[4] Fix | Delete
[5] Fix | Delete
However, some programs or sites may find it convenient to allow users
[6] Fix | Delete
to have a standard customization file, which gets run when a program
[7] Fix | Delete
requests it. This module implements such a mechanism. A program
[8] Fix | Delete
that wishes to use the mechanism must execute the statement
[9] Fix | Delete
[10] Fix | Delete
import user
[11] Fix | Delete
[12] Fix | Delete
The user module looks for a file .pythonrc.py in the user's home
[13] Fix | Delete
directory and if it can be opened, execfile()s it in its own global
[14] Fix | Delete
namespace. Errors during this phase are not caught; that's up to the
[15] Fix | Delete
program that imports the user module, if it wishes.
[16] Fix | Delete
[17] Fix | Delete
The user's .pythonrc.py could conceivably test for sys.version if it
[18] Fix | Delete
wishes to do different things depending on the Python version.
[19] Fix | Delete
[20] Fix | Delete
"""
[21] Fix | Delete
from warnings import warnpy3k
[22] Fix | Delete
warnpy3k("the user module has been removed in Python 3.0", stacklevel=2)
[23] Fix | Delete
del warnpy3k
[24] Fix | Delete
[25] Fix | Delete
import os
[26] Fix | Delete
[27] Fix | Delete
home = os.curdir # Default
[28] Fix | Delete
if 'HOME' in os.environ:
[29] Fix | Delete
home = os.environ['HOME']
[30] Fix | Delete
elif os.name == 'posix':
[31] Fix | Delete
home = os.path.expanduser("~/")
[32] Fix | Delete
elif os.name == 'nt': # Contributed by Jeff Bauer
[33] Fix | Delete
if 'HOMEPATH' in os.environ:
[34] Fix | Delete
if 'HOMEDRIVE' in os.environ:
[35] Fix | Delete
home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
[36] Fix | Delete
else:
[37] Fix | Delete
home = os.environ['HOMEPATH']
[38] Fix | Delete
[39] Fix | Delete
pythonrc = os.path.join(home, ".pythonrc.py")
[40] Fix | Delete
try:
[41] Fix | Delete
f = open(pythonrc)
[42] Fix | Delete
except IOError:
[43] Fix | Delete
pass
[44] Fix | Delete
else:
[45] Fix | Delete
f.close()
[46] Fix | Delete
execfile(pythonrc)
[47] Fix | Delete
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function