-
-
Notifications
You must be signed in to change notification settings - Fork 203
Add IS_CE
to constants
#1900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IS_CE
to constants
#1900
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my testing, this worked great. getattr(pygame, "IS_CE", False)
returned True
. I think docs should be added for this feature however, which is the reason for the change request. Probably best to document it in https://github.com/pygame-community/pygame-ce/blob/main/docs/reST/ref/pygame.rst IMO
This also seems to be crashing the CI in the sphinx docs. Perhaps we could just do a:
instead? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with:
import pygame
if getattr(pygame, "IS_CE", False):
print("Running pygame CE")
else:
print("Not running pygame CE")
And it works as it should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Issue: #1845