fork download
  1. # Функции. Тут не все, есть и выше немного, но они не важны для моей проблемы.
  2.  
  3. def compare(forum_url):
  4. state1_list, state2_list = [], []
  5. list1 = get_info(forum_url, state1_list)
  6. time.sleep(10)
  7. list2 = get_info(forum_url, state2_list)
  8.  
  9. if list1[2] != list2[2]:
  10. Sg.cprint(list2[2], '\n ')
  11. Sg.cprint(list2[3], '\n ')
  12. else:
  13. Sg.cprint('no new posts \n')
  14.  
  15. state1_list.clear()
  16. state2_list.clear()
  17.  
  18.  
  19. def compare_on_time(forum_url):
  20. schedule.every(1).seconds.do(compare, forum_url)
  21. while True:
  22. schedule.run_pending()
  23.  
  24.  
  25. # Та часть GUI, которую я не могу написать. Второй event должен останавлиать первый.
  26. elif event == 'Follow Sales Ads':
  27. threading.Thread(target=compare_on_time,
  28. args=('https://f...content-available-to-author-only...e.com/c/marketplace/sales-ads/',)).start()
  29. elif event == 'Stop following':
  30.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.7/py_compile.py", line 143, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "./prog.py", line 26
    elif event == 'Follow Sales Ads':
       ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.7/py_compile.py", line 147, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 26
    elif event == 'Follow Sales Ads':
       ^
SyntaxError: invalid syntax

stdout
Standard output is empty