Set environment variable
(pValue, pFileName)
| 235 | subprocess.Popen(lCommand, shell=True) |
| 236 | |
| 237 | def setenviron(pValue, pFileName): |
| 238 | 'Set environment variable' |
| 239 | lParts = pValue.split('=') |
| 240 | if len(lParts) > 1: |
| 241 | lKey = lParts[0] |
| 242 | lValue = lParts[1] |
| 243 | if lValue.find('{') >= 0: |
| 244 | lValue = Do2.ExpandArg(lValue, pFileName, '') |
| 245 | os.environ[lKey] = lValue |
| 246 | else: |
| 247 | os.environ[pValue] = '' |
| 248 | |
| 249 | #sys.argv.extend( [ 'c:\\source\\python\\projects\\program execution\\pb.py', '#!Inst', 'A', '{p}' ] ) |
| 250 | #sys.argv.extend( [ 'c:\\source\\python\\projects\\program execution\\pb.py', '#!BadI', 'A', '{p}' ] ) |
no test coverage detected