Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Photo
- - - - -

Python Include How To


1 reply to this topic

#1 manuleka

manuleka

    Way Out Of Control - You need a life :)

  • Members
  • 1,603 posts
  • Gender:Male
  • Location:myComputer
  • myCENTs:41.72

Posted 11 August 2012 - 11:18 AM

in php, i can easily call functions created on other files by just adding the file as include

i have 3 python files - file1,file2,file3

file1 is main and when executed it will only initiate a function which will only require scripts on file2 OR file3

how can i include (or any other ways of importing) file2 and file3 on file1?

#2 manuleka

manuleka

    Way Out Of Control - You need a life :)

  • Members
  • 1,603 posts
  • Gender:Male
  • Location:myComputer
  • myCENTs:41.72

Posted 22 August 2012 - 09:05 PM

in php, i can easily call functions created on other files by just adding the file as include

i have 3 python files - file1,file2,file3

file1 is main and when executed it will only initiate a function which will only require scripts on file2 OR file3

how can i include (or any other ways of importing) file2 and file3 on file1?


import did the trick :) this reminds me of CSS and xHtml



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users