Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
Main Page
Namespaces
Data Structures
Files
File List
Vega strike Python Modules doc
Namespaces
Data Structures
Files
File List
ai
builtin
__future__.py
__phello__.foo.py
aifc.py
anydbm.py
asynchat.py
asyncore.py
atexit.py
audiodev.py
base64.py
BaseHTTPServer.py
Bastion.py
bdb.py
binhex.py
bisect.py
calendar.py
cgi.py
CGIHTTPServer.py
cgitb.py
chunk.py
cmd.py
code.py
codecs.py
codeop.py
colorsys.py
commands.py
compileall.py
ConfigParser.py
Cookie.py
copy.py
copy_reg.py
dbhash.py
difflib.py
dircache.py
dis.py
doctest.py
dospath.py
dumbdbm.py
FCNTL.py
filecmp.py
fileinput.py
fnmatch.py
formatter.py
fpformat.py
ftplib.py
getopt.py
getpass.py
gettext.py
glob.py
gopherlib.py
gzip.py
hmac.py
htmlentitydefs.py
htmllib.py
HTMLParser.py
httplib.py
ihooks.py
imaplib.py
imghdr.py
imputil.py
inspect.py
keyword.py
knee.py
linecache.py
locale.py
macpath.py
macurl2path.py
mailbox.py
mailcap.py
markupbase.py
mhlib.py
mimetools.py
mimetypes.py
MimeWriter.py
mimify.py
multifile.py
mutex.py
netrc.py
nntplib.py
ntpath.py
nturl2path.py
os.py
pdb.py
pickle.py
pipes.py
popen2.py
poplib.py
posixfile.py
posixpath.py
pprint.py
pre.py
profile.py
pstats.py
pty.py
py_compile.py
pyclbr.py
pydoc.py
Queue.py
quopri.py
random.py
re.py
reconvert.py
regex_syntax.py
regsub.py
repr.py
rexec.py
rfc822.py
rlcompleter.py
robotparser.py
sched.py
sgmllib.py
shelve.py
shlex.py
shutil.py
SimpleHTTPServer.py
SimpleXMLRPCServer.py
site.py
smtpd.py
smtplib.py
sndhdr.py
socket.py
SocketServer.py
sre.py
sre_compile.py
sre_constants.py
sre_parse.py
stat.py
statcache.py
statvfs.py
string.py
StringIO.py
stringold.py
sunau.py
sunaudio.py
symbol.py
symtable.py
tabnanny.py
telnetlib.py
tempfile.py
TERMIOS.py
this.py
threading.py
toaiff.py
token.py
tokenize.py
traceback.py
tty.py
types.py
tzparse.py
unittest.py
urllib.py
urllib2.py
urlparse.py
user.py
UserDict.py
UserList.py
UserString.py
uu.py
warnings.py
wave.py
weakref.py
webbrowser.py
whichdb.py
whrandom.py
xdrlib.py
xmllib.py
xmlrpclib.py
zipfile.py
missions
quests
adventure.py
campaign_lib.py
campaigns.py
car_lib.py
client.py
computer.py
custom.py
debug.py
dialog_box.py
difficulty.py
dj.py
dj_lib.py
dynamic_battle.py
dynamic_mission.py
dynamic_news.py
dynamic_news_content.py
dynamic_universe.py
faction_ships.py
faction_xml_gen.py
fg_util.py
fixer_lib.py
generate_dyn_universe.py
go_somewhere_significant.py
go_to_adjacent_systems.py
GUI.py
jump_privateer.py
launch.py
launch_recycle.py
log_faction_ships.py
mission_lib.py
news.py
PickleTools.py
random_encounters.py
save_util.py
seedrandom.py
server.py
server_lib.py
ship_upgrades.py
ShowProgress.py
spawner.py
spectre.py
stardate.py
tail.py
total_jump.py
trading.py
unit.py
universe.py
Vector.py
verify.py
verify_missions.py
vsrandom.py
webpageize.py
wingman.py
wrong_escort.py
XGUI.py
XGUIDebug.py
XGUITypes.py
•
All
Data Structures
Namespaces
Files
Functions
Variables
user.py
Go to the documentation of this file.
1
"""Hook to allow user-specified customization code to run.
2
3
As a policy, Python doesn't run user-specified code on startup of
4
Python programs (interactive sessions execute the script specified in
5
the PYTHONSTARTUP environment variable if it exists).
6
7
However, some programs or sites may find it convenient to allow users
8
to have a standard customization file, which gets run when a program
9
requests it. This module implements such a mechanism. A program
10
that wishes to use the mechanism must execute the statement
11
12
import user
13
14
The user module looks for a file .pythonrc.py in the user's home
15
directory and if it can be opened, execfile()s it in its own global
16
namespace. Errors during this phase are not caught; that's up to the
17
program that imports the user module, if it wishes.
18
19
The user's .pythonrc.py could conceivably test for sys.version if it
20
wishes to do different things depending on the Python version.
21
22
"""
23
24
import
os
25
26
home = os.curdir
# Default
27
if
os.environ.has_key(
'HOME'
):
28
home = os.environ[
'HOME'
]
29
elif
os.name ==
'nt'
:
# Contributed by Jeff Bauer
30
if
os.environ.has_key(
'HOMEPATH'
):
31
if
os.environ.has_key(
'HOMEDRIVE'
):
32
home = os.environ[
'HOMEDRIVE'
] + os.environ[
'HOMEPATH'
]
33
else
:
34
home = os.environ[
'HOMEPATH'
]
35
36
pythonrc = os.path.join(home,
".pythonrc.py"
)
37
try
:
38
f =
open
(pythonrc)
39
except
IOError:
40
pass
41
else
:
42
f.close()
43
execfile(pythonrc)
builtin
user.py
Generated on Mon Feb 17 2014 12:38:43 for Vega strike Python Modules doc by
1.8.4