Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I do scientific computing and am currently using MATLAB. I have however recently started learning Python. I find the MATLAB Central file exchange very helpful and people share a lot of their programs there.
Are there equivalent code repositories and places where people share the programs they have written for the Python community? Especially for engineering and scientific computing.
Since programming in Python revolves around using modules and packages, you might find Python's package index PyPI very useful. It allows you to easily integrate other people's code into your programs.
If you're more interested in finding out how some thing were implemented, then you might want to explore code on github. There is a ton of code out there, so you should be able to profit from it.
In case you're interested in figuring out how to use some library for scientific computing, you can find detailed examples for numpy, scipy, matplotlib and so on.
This might serve you as a good starting point for exploring Python code and examples.
The scipy Cookbook has small pieces of code, but they should only receive general-purpose and good-quality code:
http://wiki.scipy.org/Cookbook
Or the python package index:
https://pypi.python.org/pypi
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I know that PDF files can be viewed using Poppler and various combinations of software and programming languages, such as using Qt 4 or 5 and C or C++.
I've also seen ways to display PDFs from Python using GTK or other libraries that need to be installed on a system. I know to do any direct display, I'll have to use that.
I do not want to create PDF files. I want to be able to take a PDF file and render it, one page at a time, into a graphical format and then display the result of that page.
Is there any way to be able to render a PDF to a graphical format, like JPG, PNG, or BMP without requiring libraries that are likely in native code on whatever system is being used? For instance Poppler is in either C or C++ (I keep forgetting which) and is compiled and installed as binary libraries.
Some background that may help is that I saw a link to Kivy, which would be an easy to use cross-platform GUI toolkit for Python, but I'd need to display PDFs for some projects. I don't mind doing the extra step of having to render it, then displaying the output if it gives me more independence from needing other libraries.
Sorry, but the answer is simply going to be no. PDF rendering is difficult, and not that many libraries do it well enough to be usable.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have tried Ropemacs and Pymacs, but I don't think they are good enough..
I really like the powerful completion in ESS and Slime.
For python, I usually try iPython if I want to try some function experimentally.
Is there such a emacs plugin(tab-completion) for Python?
This post has good tips about Emacs as Python "IDE":
In this post I’ll show how to configure emacs to write Python programs. We want to have not only basics things like syntax highlighting, but also code completion, easy access to Python’s documentation, ability to check for common mistakes, run unit tests, debugging, and a good interactive programming environment.
This setup is based on ipython and python-mode, but it’s also possible to use rope, ropemacs, and the auto complete mode as we can see here. I didn’t have much luck with ropemacs in the past but I’ll try it again in the future.
This is what I use: https://github.com/gabrielelanaro/emacs-for-python/
Easy to install and almost everything you'll ever need if you want to configure emacs as a Python IDE
elpy is the bee's knees! Best solution I've seen.
Have you tried http://code.google.com/p/yasnippet/ ?
Or : http://www.rwdev.eu/articles/emacspyeng
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 already know some Python and got interested in extending Blender using Python scripts. Can anyone suggest me some good tutorials or books to learn this subject further? I'm already looking at Blender documentation, but I would like to learn some more because I'm a newbie when it comes to 3D modeling.
The Blender 2.5 Python 3.1 manual has some good links to both basic internal tutorials for using Python scripts and some tutorials on other sites.
Bear in mind that this is Python 3.1, not 2.x, so you'd have to adjust accordingly.
You'll be using the Blender Python API (not so sure how well it's documented, but you should be fine). I'd familiarize myself with Blender and Python first (if you haven't already), then do some basic tutorials, and finally dive into the API.
Blender 2.65 docs now have a tutorial on how to write an addon, This covers a lot of stuff related to general scripting too - not just addons.
http://www.blender.org/documentation/blender_python_api_current/info_tutorial_addon.html
I found the Blender Wiki very helpful in finding specific functions and procedures built in to Blender. To improve my Blender Python skills, I first decided to program a first person shooter. My first code for Blender was a mouselook script. This gave me most of the basics, and if I needed to, I could probably write a similar script in a matter of minutes now.
Also, a good idea is to look at other people's scripts and follow the logic.
There are many good tutorials for Blender and Python, but not too many for the crossover between them. Really the only way to get round that fact is to surf example scripts and websites. I found the Blender community is very supportive, so if you really get stuck on a small part, just ask.
I'm still a probable noob in the programming matter, but (with the exclusion of the node editor), I know my way around Blender pretty well, so if the worst comes to the worst, email/message me.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
What's the ideal Python version for a beginner to start learning Python? I need to recommend some newbies a programming language to learn and I chose Python. I'm still not sure which version.
It depends what you're going to do with it.
Unicode handling has vastly improved in Python 3. So if you intend to use this for building web pages or some such, Python 3 might be the obvious choice.
On the other hand, many libraries and frameworks still only support Python 2. For example, the numerical processing library numpy, and the web framework Django both only work on Python 2. So if you intend to use any of those, stick with Python 2.
Either way, the differences aren't huge to begin with. I'd say Python 3 is a little easier to pick up (due to its string handling), but that is a good reason to learn Python 2 first. That way, if you run into a piece of Python 2 code (and you will), you'll know what is going on.
Adoption of Python3 has been held up by a few critical 3rd party packages. numpy is a good example of a package that has just barely started working on Python3. Quite a few other packages depend on numpy, so they will hopefully be supporting Python3 very shortly too.
Most of the time it's possible to write code that is compatible with 2.6/2.7/3.1 by using __future__ imports. So learning one does not mean you are not learning the other.
My vote is for 3.1
My reasoning is simple and selfish. The more new python programmers that only use 3.1 there are, the more likely it is that one of them is going to decide that they need some library from 2.6 and port it to 3.1 (learning 2.6 in the process I might add).
After this happens, I can start using 3.1: it looks really cool.
I would suggest Python 2.6; I know it's old, but it's not only the current standard, and there is way more documentation and libraries available for it.
I'll throw my experience into the works:
Right now you should be using 2.6. Switch to 2.7 when 2.7.1 comes out. Switch to 3.1/2 when all the libraries you want are fully supported and stable there.
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.