Acess denied while trying to open file with python [duplicate]










-3
















This question already has an answer here:



  • How can I make one python file run another? [duplicate]

    8 answers



I'm in this 1.py file, and I would like to execute the main.py at some point. I tried using:



import os
os.chdir("/storage/emulated/0/qpython/projects3/seila")
os.system("/storage/emulated/0/qpython/projects3/seila/main.py")


But the result indicated that the access was denied.



How can I solve this?










share|improve this question















marked as duplicate by Community Nov 15 '18 at 16:53


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • if you are going to import this 'main.py' instead of using os you can just do import main

    – Haoyang Song
    Nov 15 '18 at 0:18











  • The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

    – vlizana
    Nov 15 '18 at 1:52











  • Please provide more information about your problem and what steps you have performed to solve till now.

    – amulya349
    Nov 15 '18 at 4:58











  • I am using qpython, an Android app

    – Naze 00
    Nov 15 '18 at 13:18















-3
















This question already has an answer here:



  • How can I make one python file run another? [duplicate]

    8 answers



I'm in this 1.py file, and I would like to execute the main.py at some point. I tried using:



import os
os.chdir("/storage/emulated/0/qpython/projects3/seila")
os.system("/storage/emulated/0/qpython/projects3/seila/main.py")


But the result indicated that the access was denied.



How can I solve this?










share|improve this question















marked as duplicate by Community Nov 15 '18 at 16:53


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • if you are going to import this 'main.py' instead of using os you can just do import main

    – Haoyang Song
    Nov 15 '18 at 0:18











  • The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

    – vlizana
    Nov 15 '18 at 1:52











  • Please provide more information about your problem and what steps you have performed to solve till now.

    – amulya349
    Nov 15 '18 at 4:58











  • I am using qpython, an Android app

    – Naze 00
    Nov 15 '18 at 13:18













-3












-3








-3









This question already has an answer here:



  • How can I make one python file run another? [duplicate]

    8 answers



I'm in this 1.py file, and I would like to execute the main.py at some point. I tried using:



import os
os.chdir("/storage/emulated/0/qpython/projects3/seila")
os.system("/storage/emulated/0/qpython/projects3/seila/main.py")


But the result indicated that the access was denied.



How can I solve this?










share|improve this question

















This question already has an answer here:



  • How can I make one python file run another? [duplicate]

    8 answers



I'm in this 1.py file, and I would like to execute the main.py at some point. I tried using:



import os
os.chdir("/storage/emulated/0/qpython/projects3/seila")
os.system("/storage/emulated/0/qpython/projects3/seila/main.py")


But the result indicated that the access was denied.



How can I solve this?





This question already has an answer here:



  • How can I make one python file run another? [duplicate]

    8 answers







python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 3:56









Hogstrom

1,5411416




1,5411416










asked Nov 15 '18 at 0:07









Naze 00Naze 00

1




1




marked as duplicate by Community Nov 15 '18 at 16:53


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Community Nov 15 '18 at 16:53


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • if you are going to import this 'main.py' instead of using os you can just do import main

    – Haoyang Song
    Nov 15 '18 at 0:18











  • The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

    – vlizana
    Nov 15 '18 at 1:52











  • Please provide more information about your problem and what steps you have performed to solve till now.

    – amulya349
    Nov 15 '18 at 4:58











  • I am using qpython, an Android app

    – Naze 00
    Nov 15 '18 at 13:18

















  • if you are going to import this 'main.py' instead of using os you can just do import main

    – Haoyang Song
    Nov 15 '18 at 0:18











  • The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

    – vlizana
    Nov 15 '18 at 1:52











  • Please provide more information about your problem and what steps you have performed to solve till now.

    – amulya349
    Nov 15 '18 at 4:58











  • I am using qpython, an Android app

    – Naze 00
    Nov 15 '18 at 13:18
















if you are going to import this 'main.py' instead of using os you can just do import main

– Haoyang Song
Nov 15 '18 at 0:18





if you are going to import this 'main.py' instead of using os you can just do import main

– Haoyang Song
Nov 15 '18 at 0:18













The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

– vlizana
Nov 15 '18 at 1:52





The path makes it look like the script is in an android device, are you trying to run the script on the device from a computer or something like that? please give as much information as you can about the problem.

– vlizana
Nov 15 '18 at 1:52













Please provide more information about your problem and what steps you have performed to solve till now.

– amulya349
Nov 15 '18 at 4:58





Please provide more information about your problem and what steps you have performed to solve till now.

– amulya349
Nov 15 '18 at 4:58













I am using qpython, an Android app

– Naze 00
Nov 15 '18 at 13:18





I am using qpython, an Android app

– Naze 00
Nov 15 '18 at 13:18












1 Answer
1






active

oldest

votes


















0














I Just user the "import" and It worked.
Thank you all for the Help.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I Just user the "import" and It worked.
    Thank you all for the Help.






    share|improve this answer



























      0














      I Just user the "import" and It worked.
      Thank you all for the Help.






      share|improve this answer

























        0












        0








        0







        I Just user the "import" and It worked.
        Thank you all for the Help.






        share|improve this answer













        I Just user the "import" and It worked.
        Thank you all for the Help.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 16:53









        Naze 00Naze 00

        1




        1















            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3

            Museum of Modern and Contemporary Art of Trento and Rovereto