Invoke debugger while running program in python? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
How to step into running a python program (in my case code which is already deployed to production), this issue is as follows, we are facing a specific functional issue, where one particular flow(lets call it Update to database flow) is resulting in an undesirable outcome.
We have 2 weeks deployment scheduled, only on critical cases, we have different schedules to be maintained.
i was looking for any specific modules(which could be handled through code) that cann be used for both python 2.x and python 3.x versions.
NOTE
This question was asked keeping in mind that the solution would/can be used in any running python code keeping 2.x and 3.x in mind, hence, was not very specific on one aspect of the code, as debugging is a common approach.

You can debug by adding breakpoints in the code.
for python3.7+:
breakpoint()
for python3.6 and below:
import pdb; pdb.set_trace()

Related

Launching python from idle, or better IDE options [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have been using IDLE to program in python for the time being, and it is starting to get tedious to launch it from terminal. I have looked online to try to find a solution for this but haven't found out how to launch it in a typical Mac like way from spotlight (I have already tried putting it into the applications folder).
I am also open to any other suggestions for any better IDE's that work the same way as IDLE, with its own built in compiler.
Try Visual Studio Code, it comes with everything you need for Python development, including a feature to launch and test your program from the application.
It's free and open source, you can pick it up here :)
I prefer Pycharm IDE. It is a JetBrain Product
https://www.jetbrains.com/pycharm/

Is there a python 3.x debugger like gdb [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am wondering if there is a python debugger as powerful as gdb, for example at setting breakpoints, stepping into functions, and the like. I have been working with gdb in c and assembly and it has been excellent. SO is there a python debugger like so?
Yes, pdb might be what you are looking for.
There are many resources for how to use it. See this post for some resources: Getting started with the Python Debugger pdb.

Python compiler written in Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am looking for open source implementations of python compilers written purely in Java, preferably those that support Python 3. I started with jython but it only supports Python 2.7. Thanks!
I don't believe such a thing exists yet. If it does its in pre-alpha and probably isn't stable or well documented. Jython is probably still your best bet, and apparently support for Python 3 is coming to Jython but the timetable is still unclear. See this stack overflow question for more on the subject.
However one advantage of Jython is that you can use any Java classes as if they were Python modules. What features were you planning on using that are only supported by Python 3? Because it is entirely possible (and actually very likely) that you can reproduce those features using Python 2.7, Java or a combo of the two.

Python - Make a GUI for an existing script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I use a certain Python script often, and it is quite laborious to constantly enter the arguments I want. I am not an expert in Python, and it is not my script. I do know a few languages though such as C and Java, so if I need to learn Python so be it. What is the easiest way? Here is the script: https://github.com/michthom/MIDI-to-CNC.
Since you say you know Java, why not write a Java program that provides the GUI, and then runs the python script? I'm pretty sure Java can run external programs

Is there any working memory profiler for Python3 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
In Python 2 there's a couple of tools but everything seems to be old and out-of-dated.
I've found PySizer and Heapy but everything seems to be Python2 oriented and would take a lot of effort to port.
objgraph is interesting but still not a fully working profiler
Which tool are using ?
Pympler is a Python memory profiler that is compatible with both Python 2.x and Python3.x.
objgraph is compatible with Python 3
memprof works for Python3:
http://jmdana.github.io/memprof/
It will log and plot the memory footprint of all your variables.

Categories

Resources