I need to use a semaphore simulator Sync.py that is written in Pythone and new program (also written in Pythone) is added as parameter.
There is problem with classical syntax of If statement, I do not know how to write there else branch as well as more than one command in if branch. Moreover I must write the command straightforward into one line
if (counter == 1): counter += 1
, it doesn’t work in a new line.
I downloaded the simulator from
http://www.greenteapress.com/thinkpython/swampy/install.html
and for running:
python Sync.py mycode.py
I have already tried lots of brackets and functions, I’ve tried to find a problem directly in Sync.py, but I have not had success. I wrote a mail directly to the authors, but they didn’t answer.
Thank you
laccko