You Are Here:

Community: Developer Discussion Boards

#1 Old Some questions on packing the sis and testing on emulator - 2009-03-05, 09:44

Join Date: Jan 2009
Posts: 33
soontobeared
Offline
Registered User
Hi,
My application has multiple python script files.

1.How do I make a sys for it?
I am using this command to make a sis if I got a single file
Code:
python ensymble_python2.5-0.26.py py2sis --appname=MyApplication --vendor=MyName --verbose myapp.py myapp.sis
2.How do I test it on the emulator?
If I got two script files - window.py which contains all my user defined classes and a myapp.py which accesses the user defined classes in window.py, how do I test my myapp.py on the emulator ?
I have tried following the instructions on
HTML Code:
http://discussion.forum.nokia.com/forum/showthread.php?=127199&highlight=multiple+files
http://wiki.forum.nokia.com/index.php/Python_modules
and copied my window.py to \PythonForS60_SDK_3rdEd\sdk_files\epoc32\winscw\c\resource . But running my myapp.py script on the emulator still gives me an error.

Btw, I am working with S60 3rdEdition FP1 and testing the application on N95 8GB.

Thanks&Regards.
Reply With Quote

#2 Old Re: Some questions on packing the sis and testing on emulator - 2009-03-05, 09:53

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
Quote:
Originally Posted by soontobeared View Post
My application has multiple python script files.


1.How do I make a sys for it?
Name your main script default.py and put it in a folder along with your other scripts and use py2sis on that folder. That way it will be made into a sis and the other scripts will be packaged as well.

Quote:
2.How do I test it on the emulator?
If I got two script files - window.py which contains all my user defined classes and a myapp.py which accesses the user defined classes in window.py, how do I test my myapp.py on the emulator ?
I have tried following the instructions on
HTML Code:
http://discussion.forum.nokia.com/forum/showthread.php?=127199&highlight=multiple+files
http://wiki.forum.nokia.com/index.php/Python_modules
and copied my window.py to \PythonForS60_SDK_3rdEd\sdk_files\epoc32\winscw\c\resource . But running my myapp.py script on the emulator still gives me an error.
What error are you getting?
Try putting window.py in c:\python and doing:
Code:
import sys
sys.path.append('c\\python')

import window
Reply With Quote

#3 Old Smile Re: Some questions on packing the sis and testing on emulator - 2009-03-05, 10:01

Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Online
Forum Nokia Champion
Quote:
Originally Posted by soontobeared View Post
Hi,
My application has multiple python script files.

1.How do I make a sys for it?
I am using this command to make a sis if I got a single file
Hello

you need to use the extrasdir option of Py2sis command in ensymble and you can use the extrasdir option something like this.
Code:
myapp/
  default.py
  mymodule1.py
  mymodule2/
    __init__.py
    modulefunc1.py
    modulefunc2.py
  data/
    resource/
      apps/
        mydata.dat
where default.py is your main py script. After the above kind of directory structure you can use exttrsdir option as:
Code:
ensymble.py py2sis --extrasdir=data --verbose myapp
Quote:
Originally Posted by soontobeared View Post
2.How do I test it on the emulator?
If I got two script files - window.py which contains all my user defined classes and a myapp.py which accesses the user defined classes in window.py, how do I test my myapp.py on the emulator ?
i havent tried this on emulator but what you can do is first tell your python to look for the script an then import it something like this:
Code:
import sys
sys.path.append("c:\\Python")
import module
I am not sure will this work but its worth giving a try.

hope this all helps you

enjoy pythoning
Gaba88

EDIT: sorry bogdan was faster then me


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#4 Old Re: Some questions on packing the sis and testing on emulator - 2009-03-05, 18:03

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
You may also want to check this technical solution: SIS installation on the S60 3rd edition emulator


BR,

Rafael.
Reply With Quote

#5 Old Re: Some questions on packing the sis and testing on emulator - 2009-03-06, 02:02

Join Date: Jan 2009
Posts: 33
soontobeared
Offline
Registered User
Thankyou Bogdan, Gaba and Rafael,
I have fixed everything.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Data files in SIS / emulator with Carbide C++ jonmccune Symbian Tools & SDKs 2 2008-06-29 22:36
Can AppTestLite test my sis? truf Installation, Certification and Security 1 2007-08-24 15:02
Creating and installing SIS on emulator pbmau Installation, Certification and Security 2 2007-07-02 09:29
Emulator screen gone... Help needed meihuadao Symbian Tools & SDKs 4 2006-03-22 14:30
BT testing and debugging on emulator tote Bluetooth Technology 2 2002-10-28 10:28

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia