| Reply | « Previous Thread | Next Thread » |
|
I just installed python 2.2.2 into Windows Vista and run "py_compile.compile("C:\\Symbian\\9.1\\S60_3rd_MR\\Epoc32\\winscw\\c\\python\\16puzzle.py")
which created a file named "16puzzle.pyc" I moved the file from PC to E61i and tried to start it up from pyS60 python shell: Quote:
I don't have any external 3rd party libraries, everything is as default and basic as possible. I even have Main class for some reason, even thought it's really easy script. Howabout importing os and sys, shouldn't that be possible, too? Start of script: Quote:
|
|
Well, here's what I did. This is Hello.py:
Code:
import appuifw appuifw.note(u"Hello World!") Code:
import sys
sys.path.append('c:\\Data')
import Hello
|
|
Impressive,
After ten attempts I got this result below. No idea why I got just one step forward with each identical try... Using 1.4.1. Btw (imported) filename may NOT start with (or possibly not even contain) numbers, only alphabets. Weird, but now I know and can avoid it. Btw console output is using a variable-width font, not monospaced. This means that error output with that nice upwards arrow is pointing in wrong location! Wasted some time to figure this out. Quote:
Pre-compiled PYC was supposed to make that possible. Looks like not. If you want to use python even in semi-commercial way, you cannot release plain readable ascii text script file(s). No future doing that. Hmph, guess I'll have to study creation of full-fledged SIS/SISX packages. Not the best use of available time and effort. Thanx for help, --jouni |
|
Erm any ideas of how to do this?
I've read about py_compile but can't find it ![]() |
|
Quote:
Should this help ? http://discussion.forum.nokia.com/fo...36&postcount=2 Best Regards, Croozeus |
|
Quote:
![]() |
|
Quote:
My problem was a missing default.py, which would have loaded and launched the .pyc file. Otherwise everythng was ok, but seems like there is no way around it. I'll continue the experiments, when I manage to get the second last "just one more feature" working ![]() Cheers, --jouni |
|
Sadly I thought this was a phone based app. I'm not brilliant with the PC Python version so any help with the command line etc please?
![]() |
|
Quote:
Install Python 2.2.2 (or 2.2.3) for Windows, start it up, import your script.py, ignore error message and that's about it. Now you should have script.pyc. I don't think you need to find and install py_compile, it just was the first thing I found when searching DiBo. Never got any further, but you do need to write a default.py, which will setup your environment (sys.path) and load the script.pyc. ALso remember to add path(s) to your support files, such as graphics, text, audio etc. Now that I got animation working, I'll just need one more thing before I'll continue this operation. Want to make an installable application, so please report what works or not ![]() Cheers, --jouni |
|
Quote:
![]() |
|
Quote:
Python v2.5 for Windows is not compatible with PyS60, which is based on python v2.2.2. It's documented, but furthermore I can also confirm that v.2.5 generated .pyc files won't work. Tried it, of course ![]() I have installed both 2.2 and 2.5 for Windows, use for different reasons. Cheers, --jouni |
|
Quote:
Didn't know you could have two different versions of Python on your PC - will do thanx again mate ![]() |
|
Installed v2.2.3 and thought I'd done it right but still the same error.
Can you help me please create one? I can't do anything via the idle.pyw etc ![]() |
|
I found this - http://www.lfdm.net/thesis/index.php/2007/04/08/ and finally managed to get my file into a pyc
![]() Sadly I now can't execute (run) another pyc or py file. The pyc says "module doesn't have .run()". Any ideas?
Last edited by Dansco : 2008-06-13 at 20:32.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Compile problems... | malloc | Symbian Tools & SDKs | 4 | 2009-11-17 13:47 |
| Compile error when upgrading from NDS 1.1 to Carbide.vs 2.0.1 | ericcwhung | Symbian Tools & SDKs | 1 | 2006-04-24 08:58 |
| to many include paths cannot compile | brookp | Carbide.c++ IDE and plug-ins | 2 | 2005-05-31 23:27 |
| SDK 7.0 (7710) failed to compile under .NET | Jeepy | Symbian Tools & SDKs | 0 | 2005-02-17 16:46 |
| PLEASE ANSWER: How to compile j2me with NDS? | andreaslorenz | Mobile Java General | 3 | 2003-05-16 14:34 |