Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Importing

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
cfull1
Experienced User
Posts: 124
Joined: Thu Aug 19, 2010 4:52 am

Importing

Post by cfull1 »

Is there a way to import files into a plugin not from that folder?
Like if I installed something and its in python27\Libs.
Is there anyway to import that?
eatmeimadanish
Experienced User
Posts: 118
Joined: Thu Oct 01, 2009 5:11 pm

Re: Importing

Post by eatmeimadanish »

If you are talking about modules inside of Python (IE import MySQLdb) then yes you can. You should probably run the same version of Python thats in EG which is currently 2.6.5. For instance I just imported MySQLdb into EG by droping all of the files into C:\Program Files (x86)\EventGhost\lib26\site-packages that pertained to that module. Now I can access a MySQL database directly from EG.
cfull1
Experienced User
Posts: 124
Joined: Thu Aug 19, 2010 4:52 am

Re: Importing

Post by cfull1 »

Nice! This is what I was looking for thanks. I've got 2.7 installed, not that much different right?
Post Reply