| Reply | « Previous Thread | Next Thread » |
|
hey
i did a script which is split into 3 files 2 files each contains functions i wanted to split between them and 1 is the main script to run which imports the other 2 files. in the emulator i saw i cant put the scripts inside a subdir and i had to put all in the main python dir. on the phone it will be the same? all the script files have to get mixed with others ? or how i can make all my scripts into some subdir of my own. and when making a package how to make an icon for the main script only to appear as installed app. thx, roi |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Online
Forum Nokia Champion
|
|
You can put some scripts in a separate folder so as not to mix them with the others. Here's how:
Let's say you place scripts s1.py and s2.py in a folder called mydir. Write this at the beginning of your main script: import sys sys.path.append('C:\\Python\\mydir') ,or the path where you want to put mydir. Then, just import the scripts: import s1, s2 |
|
thx
but its not dynamic.. i mean if i make a package of the scripts and some will choose to install to phone memory and some to a storage card. |
|
Quote:
There are two scenarios you have with modules. If you need to use the modules in several applications, you need to install them under a location accessible by those applications. Publicly available Python modules are installed under \resource (in either drive, C: or E:). Ensymble command simplesis is useful in this case. If, on the other hand, you only need to access the modules from your application (or don't mind having separate copies for each application), you can simply pack them all in the main SIS file. Ensymble command py2sis is all you need in this case. Ensymble provides you a default Python icon when using the py2sis command. You can provide your own SVG-T file (made in InkScape, for example) and use the --icon option. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Obfuscate python code | bercobeute | Python | 20 | 2008-02-26 21:06 |
| File corrupted - with signed sis | annehj | Carbide.c++ IDE and plug-ins | 4 | 2007-12-10 14:44 |
| Help needed with a 3gp file... | joedoe_1981 | Streaming and Video | 0 | 2007-07-18 19:58 |
| Series 60 SDK Appwizard on windows xp | moonjoor | Symbian Tools & SDKs | 15 | 2003-12-24 11:22 |
| changing script language in asp file for internet toolkit | a211135 | General Browsing | 0 | 2002-10-30 21:04 |