PyQt4 / Tkinter in Ren'Py

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
Vladimir_P
Newbie
Posts: 11
Joined: Wed Jun 28, 2017 7:48 am
Contact:

PyQt4 / Tkinter in Ren'Py

#1 Post by Vladimir_P »

Hi, all!
I want to add some modules to working with system GUI.
So, I want include PyQt4 (or Tkinter [I don't known what better :? ]) in BUILT game on Ren'Py, but I don't known how do that.

I hope, you understand what I mean... If not, there is my short question:
How I can include PyQt4 module in Ren'Py?

Sorry for my English... I badly known this language. :mrgreen:

User avatar
trekopedia
Regular
Posts: 25
Joined: Thu Sep 14, 2017 11:38 pm
Location: Toronto, Canada
Contact:

Re: PyQt4 / Tkinter in Ren'Py

#2 Post by trekopedia »

Hi Vladimir,

My understanding is that only pure python modules can be included with a Ren'py game. PyQt4 uses C libraries (I work with PyQt4 in my 'real life' projects). Even tkinter, despite being a part of the official python distribution, includes C libraries so it can't be used either.

My recommendation would be to build your UI entirely from the functionality built into Ren'py -- it is a very robust scripting environment and capable of some pretty advanced functionality (though I am still learning it myself).

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: PyQt4 / Tkinter in Ren'Py

#3 Post by PyTom »

This is correct. Ren'Py takes over the event loop of your program, and so running with an alternate gui system isn't supported. What makes sense is to build a second program, in Python or some other language, and then using the subprocess module to run it. But figuring out how to distribute that second program becomes your problem.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Vladimir_P
Newbie
Posts: 11
Joined: Wed Jun 28, 2017 7:48 am
Contact:

Re: PyQt4 / Tkinter in Ren'Py

#4 Post by Vladimir_P »

Thank you all! :D
I will test the idea of PyTom.

User avatar
Karl_C
Veteran
Posts: 232
Joined: Sun Mar 31, 2013 6:18 am
Contact:

Re: PyQt4 / Tkinter in Ren'Py

#5 Post by Karl_C »

Vladimir_P wrote: Sat Oct 07, 2017 6:54 am I want to add some modules to working with system GUI.
I don't know what you plan to do, but maybe you could use this for inspiration: [INSANE CODING] iios - Desktop Environment using RenPy

Post Reply

Who is online

Users browsing this forum: No registered users