pyzo icon indicating copy to clipboard operation
pyzo copied to clipboard

Add support for Kivy (gui)

Open almarklein opened this issue 12 years ago • 3 comments

Originally reported by: Anonymous


iep supports a lot of gui toolkits it would be nice if it would also support kivy. http://kivy.org/

Besides that is there any way to get a project using kivy running in iep? I configured it the same way than i did in eclipse but kivy fails to load a dll when i start my project. It seems like i need to set a few variables but i found no way to do that in iep. Screenshot from eclipse: http://i.imgur.com/ovCUcNI.png Error: http://i.imgur.com/ztozvsv.png


  • Bitbucket: https://bitbucket.org/iep-project/iep/issue/232

almarklein avatar Jul 29 '13 15:07 almarklein

Original comment by Almar Klein (Bitbucket: almarklein, GitHub: almarklein):


I don't know much about Kivy, but I'm guessing you would enter a mainloop at some point?

Integration of the event loop is not necessary, but it can make things easier. Without integration that Application windows should pop up and the shell becomes "busy" during that time. With integration enabled, the shell would stay active, enabling you to change things dynamically.

To import you own modules, your PYTHONPATH must be set correctly. In the shell configurations dialog you can specify the directories that Python should look for modules. You can also set it to use the system default. I'm guessing that would do the trick, since other IDE's work fine.

almarklein avatar Jul 30 '13 08:07 almarklein

Original comment by Marc010 (Bitbucket: Marc010, GitHub: Marc010):


I took a look at guiintegration.py but i think that's far to complex for me. I started learning python not even 2 weeks ago. Besides that i'm not even sure why do iep has to "integrate Kivy's mainloop". Eclipse (Pydev) also works with Kivy although it doesn't have any support for it.

I was able to set the variables using a script. Now i have the problem that kivy just quits after it finished loading and the aplication window should pop up. Is this related to the missing integration of Kivy's mainloop?

Another thing is that i can't seem to import my own modules. I'm new to python so there's a chance that this has nothing do to with iep but if i do something like import filename then i get an ImportError. In other IDE's that worked fine. Any hints on that?

almarklein avatar Jul 29 '13 22:07 almarklein

Original comment by Almar Klein (Bitbucket: almarklein, GitHub: almarklein):


IEP does not yet support setting environment vars in the shell config. If you want, you could make a separate feature request for that.

For the time being you could set these variables in your script using os.environ.

What do you mean with this feature request? To fix above problem or to have IEP integrate Kivi's eventloop? The later idea was also mentioned in issue #140. In that case I invite you to dive into iepkernel/guiintegration.py and see if you can make it work, and then create a pull request.

almarklein avatar Jul 29 '13 18:07 almarklein