Acess denied while trying to open file with python [duplicate]
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?
python
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.
add a comment |
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?
python
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
add a comment |
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?
python
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
python
edited Nov 15 '18 at 3:56
Hogstrom
1,4791416
1,4791416
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
I Just user the "import" and It worked.
Thank you all for the Help.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I Just user the "import" and It worked.
Thank you all for the Help.
add a comment |
I Just user the "import" and It worked.
Thank you all for the Help.
add a comment |
I Just user the "import" and It worked.
Thank you all for the Help.
I Just user the "import" and It worked.
Thank you all for the Help.
answered Nov 15 '18 at 16:53
Naze 00Naze 00
1
1
add a comment |
add a comment |
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