You Are Here:

Community: Developer Discussion Boards

#1 Old S60 3rd Edition SDK for Symbian OS - 2009-04-26, 14:14

Join Date: Apr 2009
Posts: 1
astralblizzard
Offline
Registered User
Hi there,

I've been searching for a solution to this problem all over the internet. And unless I'm asking the wrong questions I'm not getting the right answers. It seems silly really...

I've written two python scripts in two modules: one module is DrawIt.py and the calling module is CallIt.py. In the CallIt.py I try to import the DrawIt.py. I get a "ImportError: No module named DrawIt".

I look in the python installs directory on the emulator, and there they both are. Scratching my head, I try to import ball.py, which comes with the S60 emulator and I can't import that into CallIt either. What's going on?

Mind you, I'm very new to python and so there might be something I'm missing. When I run python files in Windows they search certain directories including the residing directory for imported modules. Is there something I'm not doing? Do I need to insert these files into a specific directory (and how do i do this with the emulator)?
Reply With Quote

#2 Old Re: S60 3rd Edition SDK for Symbian OS - 2009-04-26, 14:19

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Hi,

You have to tell Python where to look for your modules:
Code:
import sys

#Let's assume DrawIt.py is in C:\Data
sys.path.append("C:\\Data")

#Now you can import it
import DrawIt
You can also create a directory called Lib, put it in the Python folder and put your modules in it, but I recommend the sys.path.append method from above.
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
Icons in s60 drizzt6 Mobile Java General 5 2009-03-06 10:32
OpenGL ES on S60 3rd Edition SDK Emulator specjones Symbian Tools & SDKs 7 2008-09-30 11:22
S60 3rd Edition SDK maintenance release Java SDK andresnokia Mobile Java Tools & SDKs 7 2008-06-23 20:07
Does S60 3rd Edition SDK FP2 supports RTP through CRtpAPI on emulator? nidhigupta Symbian Tools & SDKs 1 2008-05-01 09:08
S60 3RD EDITION SDK FOR SYMBIAN OS install problems on a raid system rolfstenholm Symbian Tools & SDKs 2 2007-02-22 16:25

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