Debugging Python with compiled extensions [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 7 years ago.
Improve this question
I use Python with compiled Cython and Fortran extensions (wrapped using modern Fortran's iso_c_binding module and Cython) for number crunching.
So far, I do not have a convenient debugging strategy. I use pudb for the Python part. Although I might be able to use gdb on the Cython&Fortran parts of the project, I find myself to be using console text output (print()!) instead.
I'd like to know if there are tools that make the different levels of code transparent for debugging, i.e. I'm looking for a "one-tool-debugs-it-all" solution that doesn't care whether it steps Python, Cython or Fortran code.
I'd prefer tools that allow user-friendly interaction, such as the aforementioned pudb. Does such a jack of all trades debugging tool exist? Is the Python mode of GDB the best I can get?

You can use the Cython debugger which extends gdb with new commands that begin cy. These let you step through Cython code, set breakpoints, inspect locals etc. and still work just like the py commands from GDB's Python mode when you happen to be in a Python frame. There's no Fortran support unfortunately.

You can try free PTVS + trial Intel Fortran + mixed mode debugging
see also
http://pytools.codeplex.com/wikipage?title=Mixed-mode%20debugging
http://pytools.codeplex.com/workitem/1974

Related

Is there a DLL I can use to interpret Python? [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 7 years ago.
Improve this question
So I was thinking it would be awfully convenient to have a Python interpreter DLL, and to what I know, the interpreter is a DLL, but I don't know how to use it/if it can be used that way.
I want to execute python files from Gamemaker Studio through a DLL, (Python 2.7, preferably.) and if I knew the functions of the DLL, I could make the proper GML scripts to do it.
Any help is greatly appreciated.
It is called embedding the Python interpreter. Read the section on extending and embedding the Python interpreter of the Python documentation.
You might consider some other interpreter, in particular Lua, which is free software, widely used in games, and rumored to be faster, or GUILE (also faster, and with a much more powerful and expressive language, Scheme; read also SICP)

Python GUI html+css package [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 7 years ago.
Improve this question
I want create python GUI application. I want use html+css for drawing controls (buttons, comboboxes and other) because I already have source code for them. Ultimately I want have executable file (generated with PyInstaller or with other 'py to exe' packages).
I don't want use packages which represent webserver because I am going to use my application on WinPE which has many of limitations and problems.
What package I can use for it?
There may be a better way to do this, but there are multiple GUI packages in Python which have web browser objects (or can be used to make them).
Here's an example from PySide:
https://deptinfo-ensip.univ-poitiers.fr/ENS/pyside-docs/PySide/QtWebKit/
You can also search for examples on tkinter (Pythons standard GUI package), pyqt will be similar to pyside.
pygtk also has possibilities.
You can use these packages to build a primitive (or not if you put a lot of time into it) browser which you pipe your templates into based on user input.
How about TideSDK? http://www.tidesdk.org/
Supports Python, PHP, and Ruby and is pretty popular choice.

IDE for Python 2.7 and OpenCV [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 7 years ago.
Improve this question
at the moment i am using the IDLE of python, but I am really missing the "basic" IDE features like Code Cempletion and Suggestion of used variables. IS there an IDE that supports these and works with OpenCV?
I'm pretty new to both, so I am sorry if I lack knowledge.
Generally every IDE for Python should work with OpenCV (it's just a wrapper for C++ lib, not something more complicated). Here you have a big list with comparision of features. Right now i'm using Sublime Text, because i'm working on quite small project and i don't need "big" IDE like Eclipse.
Important note about Sublime - if you often need to test something in console, consider installing SublimeREPL plugin - it allows you to run Python (or almost any other language or shell) in Sublime tab, so you can use it with all editor features (e.g. code completition)

Python development in Windows [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've been writing and using short Python scripts (~100 lines) for various tasks in Ubuntu using the Geany text editor, which I like for it's simplicity (setup, F5 to run, etc.) and syntax highlighting.
I would like to know if there is a similar application for Windows. Because what I've found so far requires downloading 3 different applications or using a big IDE like eclipse.
You can use the Geany build for Windows
You can still use Geany to run Python in windows.
But if you need to debug, auto-complete and beautiful IDE, I suggest that you head for pycharm.
Microsoft's Python Tools for Windows now works as a plugin for Visual Studio Express (and not just the paid version of Visual Studio) so you get nice free solution that has everything you need with a pretty simple install. It can be found at: http://pytools.codeplex.com/
Any good programmer's text editor will do. I personally use SublimeText 3, but I've used Eclipse + PyDev before to great success, and the usual suspects (emacs, vim, Notepad++) will work just fine too.

Python Function Reference [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 5 years ago.
Improve this question
There're tons of apps/widgets for PHP function reference and even for Ruby but I'm shocked to find there is nothing available for a popular language like Python (besides the official online documentation ofcourse).
Is there really not a single handy reference widget/app available for Python? I have 'Pocket Reference' book, but a dashboard widget would be so handy!
Python libraries have (or should have) built in documentation through docstrings. Also, python code is (mostly) very readable, and reading the source (.py or even .c) is actually the preferred way for many developers to get the information they're looking for, especially since some corner cases may not even be documented.
I've caught myself looking through the source now and then, as if it's a natural step in looking up functionality, either because I'm curious how they solve the problem, or because I reckon it's faster than googling obscure problems and reading SO questions.
So it's (often) not very pretty at all, but it's possible that the pydoc command line tool, or pydoc in webserver mode, could help you here. Here's an article on pydoc to help you get started
The interactive interpreter is a fantastic reference tool. dir(<identifier) lists all the attributes of a module, class, or function help(<identifier>) gives you help about same.
pydoc at the command line is another great tool. It does for Python what man gives you for commands, plus it even includes a web server you can start up to see the documentation in your browser.
I develop on Mac OS.
I have all the Python documentation directly available through a desktop app.
The app is called Safari. I bookmark http://docs.python.org/index.html
It's available as a desktop app.

Categories