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!

Replying to Python Include How To


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

manuleka

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

manuleka

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?

Review the complete topic (launches new window)