qwertyquerty / pypresence

A complete Discord IPC and Rich Presence wrapper library in Python!
https://qwertyquerty.github.io/pypresence/html/index.html
MIT License
653 stars 75 forks source link

SyntaxError: invalid syntax on Python 2.7 #53

Closed Maxwell175 closed 6 years ago

Maxwell175 commented 6 years ago

Error when running the example on python 2.7.

$ python rich-presence.py 
Traceback (most recent call last):
  File "rich-presence.py", line 1, in <module>
    from pypresence import Presence
  File "build/bdist.linux-x86_64/egg/pypresence/__init__.py", line 7, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pypresence-3.2.2-py2.7.egg/pypresence/activity.py", line 12
    def __init__(self, client: Presence, pid: int = os.getpid(),
                             ^
SyntaxError: invalid syntax
qwertyquerty commented 6 years ago

Y I K E S. We do not support python 2. You very much so need to update python versions. We support 3.5-7

Maxwell175 commented 6 years ago

I'm supporting a very old massive game so it will be VERY complicated to upgrade. -_-

Oh well... thanks anyways.

qwertyquerty commented 6 years ago

What game?

Maxwell175 commented 6 years ago

Toontown Fellowship. Its a revival of an old Disney game. It actually uses an old version of the panda3d game engine so first I need to port to a modern version of that (with python 3 support) and only then can I consider porting the actual game to python 3.

All this while not providing any actual new gameplay fixes/features. Although I will probably end up working on updating panda3d anyway since there are some graphical bugs that need to be fixed...

GhostofGoes commented 6 years ago

It is impossible to run this library on 2.7 due to heavy usage of asyncio, and a lack of a drop-in backport to 2.7. Sorry :(

Maxwell175 commented 6 years ago

It's OK. I managed to find another much more basic library that I could backport and make it work to my needs.

qwertyquerty commented 6 years ago

What library? I might look at it to see if we could make a python 2 branch

Maxwell175 commented 6 years ago

https://github.com/k3rn31p4nic/discoIPC - It is very basic and completely synchronous.