| 251 | | # URLs to the National Weather Service data for Minnesota. |
| 252 | | iwin_url = 'http://iwin.nws.noaa.gov/iwin/' |
| 253 | | watch_url = '/watches.html' |
| 254 | | warn_url = '/allwarnings.html' |
| 255 | | urls = [] |
| 256 | | |
| 257 | | # Load user configuration file |
| 258 | | states = [] |
| 259 | | cities = [] |
| 260 | | counties = [] |
| 261 | | device_id = '' |
| 262 | | notification_system = '' |
| 263 | | email_address = '' |
| 264 | | smtp_server = '' |
| 265 | | smtp_port = 0 |
| 266 | | smtp_user = '' |
| 267 | | smtp_pass = '' |
| 268 | | alert_level = 2 |
| 269 | | debug_level = 0 |
| 270 | | devices = {} |
| 271 | | |
| 272 | | # Try to open user configuration file |
| 273 | | try: |
| 274 | | conf_f = open(config_file, 'r') |
| 275 | | config_contents = conf_f.readlines() |
| 276 | | conf_f.close() |
| 277 | | |
| 278 | | # Parse config file data |
| 279 | | for i in range(len(config_contents)): |
| 280 | | chk_comment = string.count(config_contents[i][0:1], '#') |
| 281 | | chk_states = string.count(string.lower(config_contents[i]), 'states: ') |
| 282 | | chk_cities = string.count(string.lower(config_contents[i]), 'cities: ') |
| 283 | | chk_counties = string.count(string.lower(config_contents[i]), 'counties: ') |
| 284 | | chk_device = string.count(string.lower(config_contents[i]), 'device: ') |
| 285 | | chk_email = string.count(string.lower(config_contents[i]), 'email: ') |
| 286 | | chk_smtp = string.count(string.lower(config_contents[i]), 'smtp: ') |
| 287 | | chk_smtpport = string.count(string.lower(config_contents[i]), 'smtp_port: ') |
| 288 | | chk_smtpuser = string.count(string.lower(config_contents[i]), 'smtp_user: ') |
| 289 | | chk_smtppass = string.count(string.lower(config_contents[i]), 'smtp_pass: ') |
| 290 | | chk_alert = string.count(string.lower(config_contents[i]), 'alert: ') |
| 291 | | chk_debug = string.count(string.lower(config_contents[i]), 'debug: ') |
| 292 | | |
| 293 | | if chk_comment: |
| 294 | | continue |
| 295 | | if chk_states: |
| 296 | | xstates = string.split(config_contents[i][7:], ',') |
| 297 | | for j in range(len(xstates)): |
| 298 | | states.append(string.strip(xstates[j])) |
| 299 | | if chk_counties: |
| 300 | | xcounties = string.split(config_contents[i][9:], ',') |
| 301 | | for j in range(len(xcounties)): |
| 302 | | counties.append(string.strip(xcounties[j])) |
| 303 | | if chk_cities: |
| 304 | | xcities = string.split(config_contents[i][7:], ',') |
| 305 | | for j in range(len(xcities)): |
| 306 | | cities.append(string.strip(xcities[j])) |
| 307 | | if chk_device: |
| 308 | | device_info = string.split(string.strip(config_contents[i][7:])) |
| 309 | | devices[device_info[0]] = device_info[1] |
| 310 | | if chk_email: |
| 311 | | email_address = string.strip(config_contents[i][6:]) |
| 312 | | if chk_smtp: |
| 313 | | smtp_server = string.strip(config_contents[i][5:]) |
| 314 | | if chk_smtpport: |
| 315 | | smtp_port = string.strip(config_contents[i][10:]) |
| | 258 | class config: |
| | 259 | def __init__(self): |
| | 260 | self.states = [] |
| | 261 | self.cities = [] |
| | 262 | self.counties = [] |
| | 263 | self.device_id = '' |
| | 264 | self.notification_system = '' |
| | 265 | self.email_address = '' |
| | 266 | self.smtp_server = '' |
| | 267 | self.smtp_port = 0 |
| | 268 | self.smtp_user = '' |
| | 269 | self.smtp_pass = '' |
| | 270 | self.alert_level = 2 |
| | 271 | self.debug_level = 0 |
| | 272 | self.devices = {} |
| | 273 | self.configfile = '' |
| | 274 | self.home_dir = '' |
| | 275 | |
| | 276 | # Program configuration information |
| | 277 | if os.name == 'posix': |
| | 278 | self.home_dir = os.environ.get('HOME') |
| | 279 | self.config_dir = self.home_dir + '/.' + APPNAME |
| | 280 | elif os.name == 'os2': |
| | 281 | self.home_dir = os.environ.get('HOME') |
| | 282 | config_dir = self.home_dir + '/' + APPNAME |
| | 283 | elif os.name == 'nt': |
| | 284 | self.home_dir = os.environ.get('USERPROFILE') # NT/2K/XP |
| | 285 | if self.home_dir == None: |
| | 286 | self.home_dir = os.environ.get('WINDIR') # 95/98/ME |
| | 287 | self.config_dir = self.home_dir + '/Application Data/' + APPNAME |
| | 288 | |
| | 289 | if not os.path.exists(self.config_dir): |
| | 290 | os.mkdir(self.config_dir) |
| | 291 | |
| | 292 | self.config_file = os.path.normpath(self.config_dir + '/' + APPNAME + '.conf') |
| | 293 | self.log_file = os.path.normpath(self.config_dir + '/' + APPNAME + '.log') |
| | 294 | self.state_file = os.path.normpath(self.config_dir + '/' + APPNAME + '.state') |
| | 295 | |
| | 296 | self.open() |
| | 297 | |
| | 298 | def loaderror(self,text): |
| | 299 | print '*ERROR* - ' + text |
| | 300 | print 'You may want to remove the file' + self.config_file |
| | 301 | print 'and then rerun ' + APPNAME + '.py to regenerate it.' |
| | 302 | |
| | 303 | def open(self): |
| | 304 | if os.path.exists(self.config_file): |
| | 305 | print "here" |
| | 306 | self.load() |
| 317 | | smtp_port = "25" # default SMTP port |
| 318 | | if chk_smtpuser: |
| 319 | | smtp_user = string.strip(config_contents[i][10:]) |
| 320 | | if chk_smtppass: |
| 321 | | smtp_pass = string.strip(config_contents[i][10:]) |
| 322 | | if chk_alert: |
| 323 | | alert_level = int(string.strip(config_contents[i][6:])) |
| 324 | | if chk_debug: |
| 325 | | debug_level = int(string.strip(config_contents[i][6:])) |
| 326 | | |
| 327 | | # Validate configuration file. Lecture user if missing directives. |
| 328 | | error_string = '' |
| 329 | | if not devices: |
| 330 | | error_string = 'No notification device specified.' |
| 331 | | elif not states: |
| 332 | | error_string = 'State or states not specified.' |
| 333 | | elif not counties: |
| 334 | | error_string = 'Counties not specified.' |
| 335 | | |
| 336 | | # if string.lower(notification_system) == 'smtp': |
| 337 | | elif not email_address: |
| 338 | | error_string = 'Return e-mail address not specified.' |
| 339 | | elif not smtp_server: |
| 340 | | error_string = 'SMTP gateway not specified.' |
| 341 | | |
| 342 | | if error_string: |
| 343 | | print '*ERROR* - ' + error_string |
| 344 | | print 'You may want to remove the file' + config_file |
| 345 | | print 'and then rerun StormSiren.py to regenerate it.' |
| 346 | | sys.exit(1) |
| 347 | | |
| 348 | | # If config file doesn't exist, build one for them! |
| 349 | | except IOError: |
| | 308 | self.create() |
| | 309 | |
| | 310 | def load(self): |
| | 311 | # Try to open user configuration file |
| | 312 | try: |
| | 313 | conf_f = open(self.config_file, 'r') |
| | 314 | config_contents = conf_f.readlines() |
| | 315 | conf_f.close() |
| | 316 | |
| | 317 | # Parse config file data |
| | 318 | for i in range(len(config_contents)): |
| | 319 | chk_comment = string.count(config_contents[i][0:1], '#') |
| | 320 | chk_states = string.count(string.lower(config_contents[i]), 'states: ') |
| | 321 | chk_cities = string.count(string.lower(config_contents[i]), 'cities: ') |
| | 322 | chk_counties = string.count(string.lower(config_contents[i]), 'counties: ') |
| | 323 | chk_device = string.count(string.lower(config_contents[i]), 'device: ') |
| | 324 | chk_email = string.count(string.lower(config_contents[i]), 'email: ') |
| | 325 | chk_smtp = string.count(string.lower(config_contents[i]), 'smtp: ') |
| | 326 | chk_smtpport = string.count(string.lower(config_contents[i]), 'smtp_port: ') |
| | 327 | chk_smtpuser = string.count(string.lower(config_contents[i]), 'smtp_user: ') |
| | 328 | chk_smtppass = string.count(string.lower(config_contents[i]), 'smtp_pass: ') |
| | 329 | chk_alert = string.count(string.lower(config_contents[i]), 'alert: ') |
| | 330 | chk_debug = string.count(string.lower(config_contents[i]), 'debug: ') |
| | 331 | |
| | 332 | if chk_comment: |
| | 333 | continue |
| | 334 | if chk_states: |
| | 335 | xstates = string.split(config_contents[i][7:], ',') |
| | 336 | for j in range(len(xstates)): |
| | 337 | self.states.append(string.strip(xstates[j])) |
| | 338 | if chk_counties: |
| | 339 | xcounties = string.split(config_contents[i][9:], ',') |
| | 340 | for j in range(len(xcounties)): |
| | 341 | self.counties.append(string.strip(xcounties[j])) |
| | 342 | if chk_cities: |
| | 343 | xcities = string.split(config_contents[i][7:], ',') |
| | 344 | for j in range(len(xcities)): |
| | 345 | self.cities.append(string.strip(xcities[j])) |
| | 346 | if chk_device: |
| | 347 | device_info = string.split(string.strip(config_contents[i][7:])) |
| | 348 | self.devices[device_info[0]] = device_info[1] |
| | 349 | if chk_email: |
| | 350 | self.email_address = string.strip(config_contents[i][6:]) |
| | 351 | if chk_smtp: |
| | 352 | self.smtp_server = string.strip(config_contents[i][5:]) |
| | 353 | if chk_smtpport: |
| | 354 | self.smtp_port = string.strip(config_contents[i][10:]) |
| | 355 | else: |
| | 356 | self.smtp_port = "25" # default SMTP port |
| | 357 | if chk_smtpuser: |
| | 358 | self.smtp_user = string.strip(config_contents[i][10:]) |
| | 359 | if chk_smtppass: |
| | 360 | self.smtp_pass = string.strip(config_contents[i][10:]) |
| | 361 | if chk_alert: |
| | 362 | self.alert_level = int(string.strip(config_contents[i][6:])) |
| | 363 | if chk_debug: |
| | 364 | self.debug_level = int(string.strip(config_contents[i][6:])) |
| | 365 | |
| | 366 | # Validate configuration file. Lecture user if missing directives. |
| | 367 | error_string = '' |
| | 368 | if not self.devices: |
| | 369 | error_string = 'No notification device specified.' |
| | 370 | elif not self.states: |
| | 371 | error_string = 'State or states not specified.' |
| | 372 | elif not self.counties: |
| | 373 | error_string = 'Counties not specified.' |
| | 374 | |
| | 375 | # if string.lower(notification_system) == 'smtp': |
| | 376 | elif not self.email_address: |
| | 377 | error_string = 'Return e-mail address not specified.' |
| | 378 | elif not self.smtp_server: |
| | 379 | error_string = 'SMTP gateway not specified.' |
| | 380 | |
| | 381 | if error_string: |
| | 382 | loaderror(error_string) |
| | 383 | sys.exit(1) |
| | 384 | |
| | 385 | except IOError: |
| | 386 | loaderror('') |
| | 387 | sys.exit(1) |
| | 388 | |
| | 389 | def create(self): |
| | 390 | # If config file doesn't exist, build one for them! |
| | 391 | print interactive_copyright |
| | 392 | print """ |
| | 393 | Welcome to the StormSiren configuration wizard. |
| | 394 | |
| | 395 | This program scans the severe weather bulletins issued by the National Weather |
| | 396 | Weather Service and sends alerts in the form of text messages to your pager, |
| | 397 | wireless phone and/or electronic mailbox. |
| | 398 | """ |
| | 399 | |
| | 400 | device_selection = 4 |
| | 401 | while device_selection: |
| | 402 | print "Select a Notification Method." |
| | 403 | print "1. Mobile Phone/Pager with an e-mail address" |
| | 404 | print "2. Regular Internet E-Mail address" |
| | 405 | print "3. MythTv IP address" |
| | 406 | print "Enter the number of the notification method to use. Enter a " |
| | 407 | print "zero (0) if you are all done entering devices." |
| | 408 | print "Method? ", |
| | 409 | |
| | 410 | try: |
| | 411 | device_selection = int(raw_input()) |
| | 412 | print " " |
| | 413 | except ValueError: |
| | 414 | print "\nSorry, that response didn't make sense.\n" |
| | 415 | device_selection = 4 |
| | 416 | continue |
| | 417 | |
| | 418 | if device_selection == 0: |
| | 419 | break |
| | 420 | elif device_selection == 1: |
| | 421 | notification_system = 'sms' |
| | 422 | print "What is the e-mail address of your phone/pager? " |
| | 423 | elif device_selection == 2: |
| | 424 | notification_system = 'email' |
| | 425 | print "What is your e-mail address? " |
| | 426 | elif device_selection == 3: |
| | 427 | notification_system = 'mythtv' |
| | 428 | print "What is your MythTv\'s IP address? " |
| | 429 | else: |
| | 430 | print "\nI don't recognize that option, please try again." |
| | 431 | device_selection = 4 |
| | 432 | continue |
| | 433 | device_id = raw_input() |
| | 434 | self.devices[device_id] = notification_system |
| | 435 | print " " |
| | 436 | |
| | 437 | print "What state do you live in or wish to monitor? You can enter multiple " |
| | 438 | print "states, separated by commas. Please use the two letter postal " |
| | 439 | print "abbrevion." |
| | 440 | print "States? ", |
| | 441 | self.states = raw_input() |
| | 442 | print "\nOn which counties would you like to be alerted regarding severe " |
| | 443 | print "weather watches and warnings? You can enter multiple counties, " |
| | 444 | print "separated by commas." |
| | 445 | print "Counties? ", |
| | 446 | self.counties = raw_input() |
| | 447 | print "\nYou can also opt to have specific cities appear in the alert if " |
| | 448 | print "those cities are listed in the NWS bulletins. Enter multiple cities " |
| | 449 | print "by separating them by commas." |
| | 450 | print "Cities? ", |
| | 451 | self.cities = raw_input() |
| | 452 | print "\nWhat is your e-mail address? This is needed for setting the " |
| | 453 | print "originator address for the message?" |
| | 454 | print "E-Mail? ", |
| | 455 | self.email = raw_input() |
| | 456 | print "\nWhat SMTP server do you use for outbound mail? " |
| | 457 | print "SMTP server? ", |
| | 458 | self.smtp = raw_input() |
| | 459 | print "\nWhat is the port number used by your SMTP server? [default 25]" |
| | 460 | print "SMTP port? ", |
| | 461 | a_port = raw_input() |
| | 462 | if a_port: |
| | 463 | self.smtp_port = a_port |
| | 464 | else: |
| | 465 | self.smtp_port = "25" |
| | 466 | print "\nAUTHENTICATED SMTP OPTION - ONLY REQUIRED IF YOUR ISP/MAIL SERVER" |
| | 467 | print "REQUIRES AUTHENTICATION FOR SENDING OUTBOUND E-MAIL" |
| | 468 | print "*** Note that your outbound SMTP password will be stored in the " |
| | 469 | print "StormSiren configuration file. It is not recommended that you run" |
| | 470 | print "StormSiren using authenticated SMTP on a public/shared computer" |
| | 471 | print "Does your ISP require authentication for sending outbound mail? [y/n]" |
| | 472 | a_auth = string.lower(string.strip(raw_input())) |
| | 473 | if a_auth == "y": |
| | 474 | print "\nWhat is your outbound e-mail username? " |
| | 475 | self.smtp_user = raw_input() |
| | 476 | print "\nWhat is your outbound e-mail password? " |
| | 477 | self.smtp_pass = raw_input() |
| | 478 | print "\nWhat types of alerts would you like to receive? " |
| | 479 | print "1. Warnings only (imminent severe weather threat)" |
| | 480 | print "2. Warnings and watches (approaching or potential threat)" |
| | 481 | print "3. Advisories and warnings and watches" |
| | 482 | print "4. Statements and Advisories and warnings and watches" |
| | 483 | print "5. Forecasts and Statements and Advisories and warnings and watches" |
| | 484 | print "Alert Level? ", |
| | 485 | alert_level = raw_input() |
| | 486 | print "\nWould you like any debugging information written to the screen " |
| | 487 | print "or to a logfile? " |
| | 488 | print "0. No logging" |
| | 489 | print "1. Write to " + self.log_file |
| | 490 | print "2. Write to computer screen (stdout)" |
| | 491 | print "Debug Level? ", |
| | 492 | debug_level = raw_input() |
| | 493 | print "\nThanks. Writing configuration file to " + self.config_file |
| | 494 | conf_f = open(self.config_file, 'w') |
| | 495 | conf_f.write("# Autogenerated Storm configuration file\n") |
| | 496 | conf_f.write("STATES: " + str(self.states) + "\n") |
| | 497 | conf_f.write("COUNTIES: " + str(self.counties) + "\n") |
| | 498 | conf_f.write("CITIES: " + str(self.cities) + "\n") |
| | 499 | conf_f.write("EMAIL: " + self.email + "\n") |
| | 500 | conf_f.write("SMTP: " + self.smtp + "\n") |
| | 501 | conf_f.write("SMTP_PORT: " + self.smtp_port + "\n") |
| | 502 | if smtp_user: |
| | 503 | conf_f.write("SMTP_USER: " + self.smtp_user + "\n") |
| | 504 | conf_f.write("SMTP_PASS: " + self.smtp_pass + "\n") |
| | 505 | devkeys = self.devices.keys() |
| | 506 | for i in range(len(devkeys)): |
| | 507 | conf_f.write("device: " + devkeys[i] + " " + self.devices[devkeys[i]] + "\n") |
| | 508 | conf_f.write("ALERT: " + self.alert_level + "\n") |
| | 509 | conf_f.write("DEBUG: " + self.debug_level + "\n") |
| | 510 | conf_f.close() |
| | 511 | sys.exit() |
| | 512 | |
| | 513 | #MAIN |
| | 514 | conf = config() |
| | 515 | |
| | 516 | # Initialize Alarm Info |
| | 517 | if conf.debug_level >= 2: |
| 351 | | print """ |
| 352 | | Welcome to the StormSiren configuration wizard. |
| 353 | | |
| 354 | | This program scans the severe weather bulletins issued by the National Weather |
| 355 | | Weather Service and sends alerts in the form of text messages to your pager, |
| 356 | | wireless phone and/or electronic mailbox. |
| 357 | | """ |
| 358 | | |
| 359 | | device_selection = 4 |
| 360 | | while device_selection: |
| 361 | | print "Select a Notification Method." |
| 362 | | print "1. Mobile Phone/Pager with an e-mail address" |
| 363 | | print "2. Regular Internet E-Mail address" |
| 364 | | print "3. MythTv IP address" |
| 365 | | print "Enter the number of the notification method to use. Enter a " |
| 366 | | print "zero (0) if you are all done entering devices." |
| 367 | | print "Method? ", |
| 368 | | |
| 369 | | try: |
| 370 | | device_selection = int(raw_input()) |
| 371 | | print " " |
| 372 | | except ValueError: |
| 373 | | print "\nSorry, that response didn't make sense.\n" |
| 374 | | device_selection = 4 |
| 375 | | continue |
| 376 | | |
| 377 | | if device_selection == 0: |
| 378 | | break |
| 379 | | elif device_selection == 1: |
| 380 | | notification_system = 'sms' |
| 381 | | print "What is the e-mail address of your phone/pager? " |
| 382 | | elif device_selection == 2: |
| 383 | | notification_system = 'email' |
| 384 | | print "What is your e-mail address? " |
| 385 | | elif device_selection == 3: |
| 386 | | notification_system = 'mythtv' |
| 387 | | print "What is your MythTv\'s IP address? " |
| 388 | | else: |
| 389 | | print "\nI don't recognize that option, please try again." |
| 390 | | device_selection = 4 |
| 391 | | continue |
| 392 | | device_id = raw_input() |
| 393 | | devices[device_id] = notification_system |
| 394 | | print " " |
| 395 | | |
| 396 | | print "What state do you live in or wish to monitor? You can enter multiple " |
| 397 | | print "states, separated by commas. Please use the two letter postal " |
| 398 | | print "abbrevion." |
| 399 | | print "States? ", |
| 400 | | states = raw_input() |
| 401 | | print "\nOn which counties would you like to be alerted regarding severe " |
| 402 | | print "weather watches and warnings? You can enter multiple counties, " |
| 403 | | print "separated by commas." |
| 404 | | print "Counties? ", |
| 405 | | counties = raw_input() |
| 406 | | print "\nYou can also opt to have specific cities appear in the alert if " |
| 407 | | print "those cities are listed in the NWS bulletins. Enter multiple cities " |
| 408 | | print "by separating them by commas." |
| 409 | | print "Cities? ", |
| 410 | | cities = raw_input() |
| 411 | | print "\nWhat is your e-mail address? This is needed for setting the " |
| 412 | | print "originator address for the message?" |
| 413 | | print "E-Mail? ", |
| 414 | | email = raw_input() |
| 415 | | print "\nWhat SMTP server do you use for outbound mail? " |
| 416 | | print "SMTP server? ", |
| 417 | | smtp = raw_input() |
| 418 | | print "\nWhat is the port number used by your SMTP server? [default 25]" |
| 419 | | print "SMTP port? ", |
| 420 | | a_port = raw_input() |
| 421 | | if a_port: |
| 422 | | smtp_port = a_port |
| 423 | | else: |
| 424 | | smtp_port = "25" |
| 425 | | print "\nAUTHENTICATED SMTP OPTION - ONLY REQUIRED IF YOUR ISP/MAIL SERVER" |
| 426 | | print "REQUIRES AUTHENTICATION FOR SENDING OUTBOUND E-MAIL" |
| 427 | | print "*** Note that your outbound SMTP password will be stored in the " |
| 428 | | print "StormSiren configuration file. It is not recommended that you run" |
| 429 | | print "StormSiren using authenticated SMTP on a public/shared computer" |
| 430 | | print "Does your ISP require authentication for sending outbound mail? [y/n]" |
| 431 | | a_auth = string.lower(string.strip(raw_input())) |
| 432 | | if a_auth == "y": |
| 433 | | print "\nWhat is your outbound e-mail username? " |
| 434 | | smtp_user = raw_input() |
| 435 | | print "\nWhat is your outbound e-mail password? " |
| 436 | | smtp_pass = raw_input() |
| 437 | | print "\nWhat types of alerts would you like to receive? " |
| 438 | | print "1. Warnings only (imminent severe weather threat)" |
| 439 | | print "2. Warnings and watches (approaching or potential threat)" |
| 440 | | print "Alert Level? ", |
| 441 | | alert_level = raw_input() |
| 442 | | print "\nWould you like any debugging information written to the screen " |
| 443 | | print "or to a logfile? " |
| 444 | | print "0. No logging" |
| 445 | | print "1. Write to " + log_file |
| 446 | | print "2. Write to computer screen (stdout)" |
| 447 | | print "Debug Level? ", |
| 448 | | debug_level = raw_input() |
| 449 | | print "\nThanks. Writing configuration file to " + config_file |
| 450 | | conf_f = open(config_file, 'w') |
| 451 | | conf_f.write("# Autogenerated Storm configuration file\n") |
| 452 | | conf_f.write("STATES: " + str(states) + "\n") |
| 453 | | conf_f.write("COUNTIES: " + str(counties) + "\n") |
| 454 | | conf_f.write("CITIES: " + str(cities) + "\n") |
| 455 | | conf_f.write("EMAIL: " + email + "\n") |
| 456 | | conf_f.write("SMTP: " + smtp + "\n") |
| 457 | | conf_f.write("SMTP_PORT: " + smtp_port + "\n") |
| 458 | | if smtp_user: |
| 459 | | conf_f.write("SMTP_USER: " + smtp_user + "\n") |
| 460 | | conf_f.write("SMTP_PASS: " + smtp_pass + "\n") |
| 461 | | devkeys = devices.keys() |
| 462 | | for i in range(len(devkeys)): |
| 463 | | conf_f.write("device: " + devkeys[i] + " " + devices[devkeys[i]] + "\n") |
| 464 | | conf_f.write("ALERT: " + alert_level + "\n") |
| 465 | | conf_f.write("DEBUG: " + debug_level + "\n") |
| 466 | | conf_f.close() |
| 467 | | sys.exit() |
| 468 | | |
| 469 | | # Initialize Alarm Info |
| 470 | | if debug_level >= 2: |
| 471 | | print interactive_copyright |
| | 519 | |