You Are Here:

Community: Developer Discussion Boards

#1 Old Question how to run a part of a script from another script???? - 2008-12-05, 17:04

Join Date: Sep 2008
Posts: 32
Location: India
gnanasenthil654321
Offline
Registered User
hi,i have two scripts say a.py and b.py.now i want to execute A PART OF THE SCRIPT b.py FROM a.py.Is this possible....If so how should the code be........
Reply With Quote

#2 Old Talking Re: how to run a part of a script from another script???? - 2008-12-06, 01:44

Join Date: Aug 2008
Posts: 5
xiaoaiyongheng
Offline
Registered User
If your mobile is 3rd,you can put one of the scripts in "c:\recourse\",then you can "import" it in another script
IF your phone is 1st or 2nd just put is in libs and import it
Reply With Quote

#3 Old Re: how to run a part of a script from another script???? - 2008-12-06, 01:48

Join Date: Aug 2008
Posts: 5
xiaoaiyongheng
Offline
Registered User
For instance,if you want to use b.py in a.py:
---------------------------------------------
import b
Reply With Quote

#4 Old Re: how to run a part of a script from another script???? - 2008-12-06, 03:15

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
Quote:
Originally Posted by xiaoaiyongheng View Post
For instance,if you want to use b.py in a.py:
---------------------------------------------
import b
Yes, but for this to work he need to append the path:

Code:
import sys

sys.path.append("E:\\Python")

import b
BR,

Rafael.
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
How to make my python script run at background? mdzhao Python 5 2007-07-02 17:02
help in run script perthachy Python 6 2007-07-02 04:01
How to run my python script? Gowtham_India Python 2 2007-06-25 11:15
I can't run Python script on my mobile. HELP!!! Nirvana Python 3 2007-05-30 14:04
write perl/python script in your S60 phone kamijawa Python 5 2006-06-03 16:59

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