Adding custom Python files to Quickly app

Asked by Tan Kah Ping on 2011-05-27

If I write my own Python code in separate files (not generated by Quickly) how do I add it into my Quickly app? Where should I place them?

Question information

English Edit question
Quickly Edit question
No assignee Edit question
Solved by:
Tan Kah Ping
Last query:
Last reply:
Tan Kah Ping (kahping) said : #1

Never mind. I think I just answered my own question.

onlineaddy (onlineaddy) said : #2

Would you mind sharing your answer? :)

Tan Kah Ping (kahping) said : #3

Sure. Here's what I did.

I placed my .py file in a folder that has the same name as my project (eg., a project called foo will have a subfolder called foo in it). It's easy to spot. You'll find .py files generated by Quickly for your About dialog, Preferences dialog, etc...

Then I added the import into the file in bin/. Again, the file uses the same name as your project.

Find the following (or similar lines):

from galleria import (
    AboutGalleriaDialog, PreferencesGalleriaDialog)
from galleria.helpers import get_builder

#Try adding AppIndicator. Will work after "qucikly add indicator"
    from galleria import indicator
    indicator = False

Add your import between "from galleria.helpers import get_builder" and "#Try adding AppIndicator. Will work after "qucikly add indicator" ".

Hope that's clear enough to understand :-)