1.[代码][Python]代码
#coding=utf-8
import sys
import os
import datetime
import time
class ArgsDealwith:
def arg_environment(self, args):
filepath = ('PYTHON_PATH', 'path')
for i in filepath:
filename = os.environ.get(i,"%s is null." % i)
print '%s:' % i,' ', filename
def arg_en(self, args):
filepath = ('PYTHON_PATH', 'path')
for i in filepath:
filename = os.environ.get(i,"%s is null." % i)
print '%s:' % i, ' ', ' '.join(filename.split(';'))
def arg_file(self, args):
if not args:
print 'Error: file name is null.'
else:
if len(args) == 1 and args[0].lower() == 'python_path':
filename = os.environ.get(args[0], None