Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main(cfgfile: str = None, SASHome: str = None, java: str = None):
if os.name != 'nt':
print('This function will only run on Windows and create a saspy config file for an IOM Local connection')
return
saspydir = ac.__file__.replace('sascfg.py', '')
if not cfgfile:
cfgfile = saspydir+'sascfg_personal.py'
# if the file already exists, don't replace it.
if os.path.exists(cfgfile):
print("CFGFILE ALREADY EXISTS: " + cfgfile)
return
# handles users who could have different versions
if not SASHome:
SASHome = "C:\\Program Files\\SASHome"
if not java:
java = 'java'