Start and run hub.
Here is a basic script to just start and run ADCH++ from a python script. I would like to add that im not that skilled with programming so there might be some stuff that i have got mixed up.
First of all i would like to mention that i had issues when importing pyadchpp.py, i had to edit the line where it imports _pyadchpp.dll
From:
Code: Select all
import _pyadchpp
Code: Select all
try:
import _pyadchpp
except:
import imp, os
_pyadchpp=imp.load_dynamic('_pyadchpp', '_pyadchpp.dll')
del imp, os
Basic script:
Code: Select all
#!/usr/bin/python
#import python adchpp module
import pyadchpp
#import os module
import os
import time
def run():
#initialize the hubsoft with the complete path to your config directory containing adchpp.xml
pyadchpp.initialize(os.getcwd()+'\config\\')
pyadchpp.startup()
#create a loop so the program doesnt exit
while 1:
time.sleep(0.1)
if __name__== '__main__':
run()