Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 months ago.
Improve this question
I have a file with the code and I want to run it using exec(file.read()). However when I put the breakpoint in that file then it's not reached. How can I run this file and make the breakpoint work?
That's not the usual way of running Python files, but if you have a breakpoint() in the middle of the file, it should work.
I think you actually want to import the file or run it directly.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
Unable to write file 'c:\Users\himan.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\launcher.vscode\launch.json' (Error: Unable to create folder 'c:\Users\himan.vscode\extensions\ms-python.python-2022.16.1\pythonFiles\lib\python\debugpy\launcher' that already exists but is not a directory)
I tried everything even reinstalling VS Code twice.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
why the python Cmd module command prompt not using multi-line? it's over writing the same line
example image
I am sorry I don't know, hw to answer ques in stackoverflow, but I found it finally
use self.use_rawinput = False this will fix the problem (If you want a given stdin to be used, make sure to set the instance’s use_rawinput attribute to False, otherwise stdin will be ignored.)
https://docs.python.org/2/library/cmd.html
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
How do I write an automated test that can check the vi editor is properly working programmed using Python?
Save your script containing vi command as follows.
cat script.sh
vi abc.txt <<INPUT
i
Line 1
Line 2
^[
ZZ
INPUT
Use the python subprocess.check_call to check the status of execution
subprocess.check_call(["script.sh" , "arg1"])
This will Run the command(script.sh) with arguments(if needed). Waits for command to complete. If the return code was zero then returns,
otherwise raises CalledProcessError Exception.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
What is the python command to run a py-file.?
For example, in my index.py file how would i launch start.py.
In index.py, simply use subprocess:
import subprocess
subprocess.check_output(["python", "start.py"])
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Can someone help me?
I have a project on Node.js(Cappuccino framework), and I must to use with the project my Python script.
How to do this deal?
You did not consult Google before asking. Searching for 'node.js execute python' got me HERE. I'm guessing this is what you want.
I'm guessing because you're not being very clear. Next time be more specific.