Skip to content

Instantly share code, notes, and snippets.

@berkdemir
Last active January 3, 2022 10:30
Show Gist options
  • Save berkdemir/c427b2acabe216a20292b54e4a132681 to your computer and use it in GitHub Desktop.
Save berkdemir/c427b2acabe216a20292b54e4a132681 to your computer and use it in GitHub Desktop.
from plxscripting.easy import *
localhostport_i = 10000
password = "123456"
s_i, g_i = new_server("localhost", localhostport_i, password=password)
line_list = [g_i.Line_142_Line_153_1, g_i.Line_142_Line_152_1, g_i.Line_151_1]
# line_list is the list of lines that are to be activated.
# Activate only after the first 4 phases. (Including Initial Phase)
g_i.activate(line_list, g_i.Phases[4:])
# Longer Version
'''
for i, j in enumerate(g_i.Phases[4:]):
# Activate only after the first 4 phases. (Including Initial Phase)
g_i.activate(line_list, j)
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment