Skip to content
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

How can i import and use python package(standrd and 3rd) in Renpy? #1115

Closed
decemer opened this issue Jan 20, 2017 · 2 comments
Closed

How can i import and use python package(standrd and 3rd) in Renpy? #1115

decemer opened this issue Jan 20, 2017 · 2 comments

Comments

@decemer
Copy link

decemer commented Jan 20, 2017

How can i import and use python package(standrd and 3rd) in Renpy?

for example
init python: import socket
how to store in game file folder?
can it run in PC,IOS,Android?

@renpytom
Copy link
Member

If it's present in Ren'Py, that works. You need it on two lines:

init python:
    import socket

Only do imports in init python blocks. It will work on all platforms, although individual modules may not work on some places. (For example, you need to enable the NETWORK permission on Android to access the internet.)

To include a pure-python module that isn't included with Ren'Py, drop the .py file into the game directory.

@decemer
Copy link
Author

decemer commented Jan 24, 2017

Thanks for the clarification
that is socket client in renpy issue
#1118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants