Split Script using Import

Asked by Jeff_Vallis

Advise Please
Have a Large Script that I would like to split into multiple scripts (maybe 10) and combine at runtime by using import
before I continue :- will this slow down the runtime
If this practical how could I achieve this - please say if this is a stupid idea - my script currently has 1200 lines :-

Script1
My_Variable = 1
import stuff for Script2
Script2.My_Function
print "Script 2 My_Variable ",My_Variable

Script2
My_Function():
      global - I need to access Script1 - My_Variable
      My_Variable = 2
      print "Script 2 My_Variable ",My_Variable

========= PLEASE ADVISE IF THIS IS NOT A GOOD IDEA ===============

Another Request - could the IDE have a search function - not asking for search and replace - currently pasting code into TextEdit to use search

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.