import os
import sys
from busybee.BusyBException import BusyBException
from Base import Base
from Name import Name
from Value import Value
class SetEnv(Base):
def __init__(self):
Base.__init__(self)
self.nam=Name("")
self.val=Value("")
def setParent(self, parent):
parent.setEnv(self)
def getName(self):
return self.nam
def getValue(self):
return self.val
def setName(self, name):
self.nam = name
def setValue(self, val):
self.val = val
def execute(self):
os.environ[self.nam.getText()]=self.val.getText()
def __str__(self):
return "envvar:" + self.nam.getRawText() + self.val.getRawText()
|