views:

1230

answers:

26

What do you use Python every day for?

If you don't use Python every day, please include any answers with your usage on a non-daily basis.

+2  A: 

All sorts of things.

From generating code for a major C++ project (>2,000 SLOC) to monitoring database servers.

Rob Wells
+4  A: 

Antigravity.

On a more serious note, I use Python for writing scripts to automate tedious tasks (because Batch is terrible). I also sometimes use it for prototyping small parts of my applications because Python is very close to pseudocode.

musicfreak
HEY!!! Don't throw out BATCH!!! Sure, it lacks some things, but you can make your own cmd line tools in any language and use those from BATCH! See my post here http://stackoverflow.com/questions/309884/code-golf-number-to-words/311436#311436 to see how fun and powerful it can be. :P
Paulius Maruška
Yes, I know, and my command line tools are written in Python. I know Batch *CAN* do a lot, but it's such a terrible language (IMO) I don't *want* to ever use it except for simple things like running a series of Python scripts and whatnot. I don't know why I got a downvote for that.
musicfreak
+3  A: 

It's the scripting system used by ESRI for geoprocessing tasks. We use it to maintain our GIS and to answer geographic questions by our users.

Michael Todd
Good lord, it was time they moved away from Avenue already
Vinko Vrsalovic
Never used Avenue before, but from what I understand, you're right. Python is a nice little scripting language.
Michael Todd
Wow, ESRI. The last time I thought of them, they were still using Henco's INFO. That was, um, a while ago.
Robert Rossney
+11  A: 

Everything.

Seriously. Mostly parsing and automation of frequent tasks in scientific programming. I also use Python to control software deployment, web programming (with Django), data plotting (with Matplotlib). There's no task that cannot be handled with Python, simply because Python is such a thin layer over C, and with C you can do everything.

So, what I don't use Python for ?

Mostly for one-time activities. If I want to inspect a dataset quickly, I use gnuplot, but Matplotlib is much better, and I normally write a small Python script to draw the final plot. I use Bash as a glue language when process invocation and piping is needed. With Python this is tedious.

Stefano Borini
+1  A: 

I do a lot of data analysis with MATLAB, which has fairly slow text processing capabilities for very large text files, and I find Python to be an excellent pre-processor for extracting the 3 or 4 columns of data out of the 50 that are contained in a file.

It would take 5 minutes or so for MATLAB to parse a 100k line data file, but with Python I can get the same result in less than 2 seconds.

Michael Morris
How are you parsing this data with MATLAB? Have you tried the textscan function (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/textscan.html)?I used MATLAB previously to parse some 70-80 MB text files, and the textscan function parsed them in about 9-10 seconds each.
Hosam Aly
It's quick on my computer, but when the other people I work with want to use the data in Excel or MATLAB it is usually quicker and easier to import it via the 'Import External Data' (Excel) or using uiimport (MATLAB).The guys I work with are not necessarily MATLAB-savvy, so it's easier for them to import a 'simplified' version of the text files we use.
Michael Morris
Fine, but making the statement "MATLAB has fairly slow text processing capabilities" is not fair, and it conveys an incorrect message to new people thinking about learning MATLAB.
Hosam Aly
+2  A: 

If I'm coding a project in C/C++/Obj-C, I sometimes used Python to prototype complex algorithms. Then I translate them to the specific language.

Marco Mustapic
+2  A: 

To escape the horrors of writing text processing or task automation tools in C++ (since my real job requires me to work at a low level most of the time, we see almost everything from a C++ programmer's perspective). Python is like duct tape made out of code.

Whatever
+1  A: 

A good portion of my secular work is done in Python. Both our buildsystem and our product are written using substantial amounts of python.

I also use it to make building various projects easier.

I use it to automate database unit tests, generate code for other languages that require a lot of boilerplate.

I have an IRC bot that facilitates my use of my secular job's bug tracking system, written in Python.

I use it to write scripts that batch can't handle without contortions, and that are platform-portable between Unix and Windows.

Christopher
+2  A: 

I use and have used it for quite a few things:

  1. Monitoring and Controlling Networks (pysnmp rocks)
  2. A Few Internal and Customer Portal Web Applications (zope, python and PIL)
  3. General Task Automation including a. MS Office COM scripting b. Selenium Scripting
  4. System Admin Audits - WMI scripting
  5. Transforming Data into Configurations (OPC address space and the like)
  6. Transforming Data into SQL or or other code
  7. Data Collection (polling remote telemetry)
  8. Prototyping/Clarity
CMB
A: 

I am lucky enough to work on a quite a big project, where most of development is done in Python. Although I am not directly related to most of the development, just only cooperate with my colleagues and performing code reviews is already fun enough for my day :-)

Roberto Liffredo
+1  A: 

First of all, my daily work. That can be anything from writing small system admin scripts over creating nice QT based graphical tools to running a Django application. It's also possible to use it as a very advanced calculator (usually in ipython or some other nice interactive shell) or script all kinds of applications with it. The fascinating thing is, how easy and fast a solution (or at least prototype) can be created.

The other main category I use it was for teaching programming. If you want to have someone understand some concepts of OOP or the like, Python does the least to get between a newcomer and a task. Also, it's a nice point of entry before starting other languages.

The main things I would NOT use it for are when a program requires massive calculation or depends on real-time requirements, though even in those cases Python might prove valuable for creating a rapid prototype to improve on the algorithms used.

Gerald Senarclens de Grancy
A: 

Internal web applications that handle identity document and visa data collection, processing, and production. Webservices to communicate . Handling fingerprint collection and management, including format conversions. Glue over an facerecognition library to create a distributed in-memory recognition database. And as a general interactive power tool for data transformations and analysis.

As an anecdote on the interactive power of Python, it helped me to quickly trace down an image quality issue of faint stripes appearing on some images. To track down the common denominator I used PIL and numpy to build 2d FFT's of the images and added up the energy in the relevant area of the frequency plot, then created a function that took an image and returned the energy in the interesting frequency band, imported the service client for images, ran over a couple of thousand of them, looked at the distribution using matplotlib and joined together the outliers with related data. Thanks to the Python interactive shell I could do the whole discovery process from problem report to a dataset pointing to the culprit in less than an hour.

Ants Aasma
+1  A: 

Everything I can (alas, the job usually doesn't let me):

  • General text processing
  • CGI (yes, some of us have sites with a limited number of users for which CGI is perfectly adequate)
  • Web scraping
  • System Administration jobs
PTBNL
+1  A: 

I use Python every day for programming. Easiest question I've answered all day. :-)

Jason Baker
+1  A: 

I use Python to earn money, as an independant Python developer. I also use Python to have fun. As an independant Python developer.

Lennart Regebro
A: 

As part of my research & MSc thesis, I've implemented an evaluation engine for a graph query language. Basically, there's a large collection of directed graphs whose nodes are flat typed AVMs (which represent syntax graphs, but that's not that important actually), and the task is to retrieve all graphs that satisfy a set of constraints, which are encoded in a specially designed query language

The project has grown quite a lot over the last years and it involves SQL, XML parsing, parsing a specialized language, constraint solving, graph algorithms, 2D rendering, animation, parallel processing, query optimization and quite a few more things.

I've also used Python for pretty much all my courses at the university (e.g. Machine Learning, Algorithms, Natural Language Parsing), my BA thesis (building weighted Finite State Transducers), several term papers and on different jobs (mostly involving text processing).

Torsten Marek
A: 

I've just run across Python in an application called Iguana. It's an HL7 integration engine to send HL7 messages between disparate systems. The app allows you to write Python scripts to perform database access, message manipulation, etc.

p.campbell
A: 

I use Python for all kinds of personal projects. Day to day I use it for a lot of repetitive tasks. The ability to open up a shell and with a few lines of code rename a directory full of files in a completely custom way is invaluable.

Now if I could just get them to let me use it at work... Trying to accomplish the same in Windows Batch is like trying to pull teeth with a pair of tweezers.

spbogie
A: 

It's not used in projects that I work on daily. However, I use it both at home and at work to quickly write one-off tools to automate simple but tedioys tasks as they appear, mostly dealing with files.

Oh, and it makes a pretty decent calculator!

Pavel Minaev
+1  A: 

I use Python for body massage, I got one from Thailand and it has a real tight grip, I sometimes use it to settle flame wars too, when Java people don't accept that "My Python rules".

Anurag Uniyal
May be they haven't had their coffe yet?
voyager
A: 

Computer vision projects (research), pretty good language for scientific matters I think.

attwad
A: 

I use Python for automated tests with webdriver, pywinauto and some other tools like Modbus test kit for testing Modbus communication. This language is very flexible and there are so many libraries to access any system... I think that it is a good choice for automated tests

I also use it for web development with django

luc
A: 

My primary job is developing a product in C#. It's essentially an application framework, and to make it easily extensible, it's got a scripting component that uses IronPython as its scripting language. I also use Python scripts for building and deploying my weekly releases.

My secondary job involves developing programs that interoperate with what I'll charitably call a legacy system, and while over the years I've built that software in VB and C#, my most recent project is entirely Python-based. Eventually I want to persuade one of my customers to let me build a web-based interface to this system, and when I do there'll be an interesting Django integration project.

I never really intended to develop a timekeeping and billing system in Python, it just sort of happened. I use Python scripts to extract timekeeping entries from my daily notes file and produce invoices.

I was curious about the level of coverage of various topics on Wikipedia, and wrote a Python script to count the words in any Wikipedia article. (Rutherford B. Hayes < Portal (video game) < Abraham Lincoln, in case you were wondering.)

Robert Rossney
A: 

I use it everyday for parsing huge log files looking for odd patterns and things like that. It's also useful for solving problems on Project Euler! It's also fun for trying out algorithms that I read about randomly on Wikipedia!

MattyW
A: 

I use Python + NumPy for prototyping my recognition project. I hope I'll great with realtime gesture recognition too.

vernomcrp
+1  A: 
  • Checkout/Build/Deploy/Test system is on Python (daily)
  • Log analysis / visualization (from time to time)
  • Calculator (daily)
  • Minor system tasks:
    • Compressing uncompressed yet folders (not so often)
    • Scheduled re-installation (daily)
    • Running GUI applications with redirected cout/cerr streams (from time to time)
    • Local build initiation (convenient wrapper around IncrediBuild/dev studio) for multiple projects/configurations (daily)
Konstantin