Python is a dynamic, high-level language. Its design focuses on clear syntax, an intuitive approach to object-oriented programming, and making the right way to do things obvious. Python supports modules, exceptions, had an extensive standard module library. Python can also be embedded in other ...

learn more… | top users | synonyms

1
vote
1answer
173 views

Portability: Python's C/C++ libraries/extensions vs JRuby's Java libraries

I've had some discussion with colleagues who chose to go with JRuby along the following line of argumentation: JRuby can make use of anything that is available in Java, ergo such programs are more ...
0
votes
1answer
33 views

How to create different paths for users to take through the pages in my site?

I have a website where users are directed to go through a sequence of pages to perform a sequence of work tasks (transcribe a paragraph, answer a survey, interact with another user, etc). For short, ...
2
votes
1answer
391 views

XMPP— openfire, PHP and python web service

I am planning to integrate real time notifications into a web application that I am currently working on. I have decided to go with XMPP for this and selected openfire server which I thought to be ...
3
votes
1answer
125 views

caching on multiple servers

Because we need to keep response times low, we get tons of requests, and we need to basically process ALMOST the same data (which I'll refer to as X) each request (the inputs are different though, so ...
13
votes
8answers
2k views

I feel stuck in the center of Python, How to get past beginner

I really apologize if this doesn't follow the S.O rules but I need a little help, I personally still classify myself as a beginner in python, Yet I've wrote a very small and VERY SURE impractical ...
1
vote
0answers
65 views

What's the best way to create a static utility class in python? Is using metaclasses code smell?

Ok so I need to create a bunch of utility classes in python. Normally I would just use a simple module for this but I need to be able to inherit in order to share common code between them. The common ...
-1
votes
0answers
55 views

Which 3rd party library should every Python developer be familar with? [closed]

Besides numpy, which 3rd party library should every Python developer be familiar with? I know the standard library is rich, but I would like to know what is out there. I used numpy only because it ...
-2
votes
1answer
68 views

Separating signal chunks, better algorithm desired

This is my current challenge. I am looking for a good algorithm. http://i.stack.imgur.com/Q6b9z.gif from 0 to about 1480 you have values below 100. My goal is to separate those two big areas of ...
4
votes
4answers
208 views

Returning a boolean when success or failure is the sole concern

I often find myself returning a boolean from a method, that's used in multiple locations, in order to contain all the logic around that method in a single place. All the (internal) calling method ...
2
votes
1answer
51 views

Approaches to isolating tests that require a database? [duplicate]

Suppose I have component A,B,C that all put some data into a database. Each component depends on data in the database inserted by the previous component. How do I test these modules in isolation? I ...
0
votes
0answers
54 views

Books on Python equivalent to 'The design and evolution of C++', 'ruminations on C++', etc [closed]

If one wants to master C++ there are a host of books worth reading - Modern C++ Design, The Design and Evolution of C++, Ruminations on C++, Exceptional C++ and so on - are there equivalent books for ...
-3
votes
4answers
309 views

speed/performance of image processing python vs java vs c [closed]

I have a project in which I take a handful of images and coordinates, and combine them all into a single image based on those coordinates. (so not really image processing, just image ...
1
vote
2answers
248 views

Notify players every x seconds in a multiplayer game

I'm working on a realtime multiplayer game using Django and gevent-socketio, I'm facing some issues: I need to send an update of the game state to connected players every X seconds (~4 seconds), so ...
1
vote
2answers
713 views

Why do people consider Python a weak language? [closed]

I've been using Python for a little while now and I am enjoying it, but a few of my friends are telling me to start using a language like C# or Java instead and give these reasons: Python is a ...
9
votes
5answers
2k views

Moving to Python (SciPy and NumPy) for Scientific Computing [duplicate]

Just read a presentation about using Python for Scientific Computing. I am currently using MATLAB (student license FTW, which will expire when I graduate soon). So I was wondering how matured SciPy ...
2
votes
1answer
67 views

How to create in Python Tkinter a widget that would act like a choice tree?

I would like to know if there is such widget in tk (or in any different standard Python 3 module), or how to create it: Of course it doesn't have to look like this, but it should offer same ...
23
votes
8answers
2k views

Is the algorithm more important than the programming language?

During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...
-1
votes
0answers
183 views

Is there a reputation that C# and Java is for work while Ruby or Python is for fun? Why? [closed]

I heard this several times online or from colleagues. Many people use C# or Java at work-related project, but prefers Ruby or Python for fun or hobby-oriented projects. For example, in his blog post, ...
0
votes
1answer
94 views

Pros and cons of the following Parsing methods?

I'm thinking of making a Python-JavaScript converter/compile. I've been wondering about the pros and cons of the following methods to parse the Pythonic code, into JavaScript equivalent. Working ...
0
votes
0answers
7 views

Problem with matrices in Python [migrated]

I was writing a programm in Python (2.5.4), and I realized that my code was not working because of something very unusual. I am going to give an example: A = [[0]*2]*2 When I print A, I get: [[0, ...
1
vote
1answer
479 views

I don't understand value iteration

In class I am learning about value iteration and markov decision problems, we are doing through the UC Berkley pac-man project, so I am trying to write the value iterator for it and as I understand ...
0
votes
0answers
4 views

pefile How do I nullify the first 8 bytes of a file? [migrated]

How do I nullify the first 8 bytes of a file? this example does not work: import pefile pe = pefile.pe(In) pe.set_dword_at_rva(0,0) pe.set_dword_at_rva(0,4) pe.write(Out) pe.close() How i can ...
1
vote
2answers
85 views

Python reading from stdin while doing other tasks

I am trying to write a system log parser. It will receive messages from the FreeBsd syslog daemon through stdin. It will use those messages to determine if an ip should be banned or not. The problem ...
3
votes
1answer
80 views

Where should I store the files for python modules I install?

If I download a module for Python (such as alglib) and installing is simply a matter of running python setup.py install Where should I be keeping the files I download, or the files that get created ...
3
votes
1answer
34 views

Accepted best practices for setup.py of a forked project

Context: I was looking to see if there was a tool to do something (in my case I was looking for a proxy that would allow for http log inspection from a python test framework). There turned out to be ...
0
votes
0answers
55 views

Pythonic way to map a function from one module to a method of a global object

I'm writing a naive simulator for testing code which will run on an embedded system. The code being tested will import a bunch of modules, call functions in these modules and receive data on which it ...
0
votes
0answers
59 views

In general, what does an object need to have in order to be an iterator? [migrated]

In general, what does an object need to have in order to be an iterator? Programmatically, what does class need to have in Python to be used as an iterator?
3
votes
2answers
207 views

Getting practicality of PHP from Ruby or Python

I have a rather odd problem. I love the practicality of PHP - specifically that I can fairly safely assume that on any random server I'll have access to the MySQL libraries, and that I can go between ...
5
votes
5answers
513 views

Spoiled by Python convenience- and productivity-wise, spoiled by C++ speed-wise. Now unhappy with both [closed]

I'm currenetly struggling with choosing how to proceed as a programmer. I mainly programmed games and would like to continue. And for about 5 years or so I just used C++ and OpenGL, so I spent a lot ...
-3
votes
0answers
28 views

Python3 Print First File Line [closed]

How can I make Python3 print the first line of a file once I have loaded the file contents? In other words, what is Python3's equivalent to AWK's awk "NR==1"?
-1
votes
0answers
60 views

How to interpolate GPS data correctly? [migrated]

I'm working on a project that involves using linear interpolation to fit lines to lat/lng points. I'm pretty new at scientific programming related stuff, and I was wondering if people could steer me ...
0
votes
0answers
16 views

Storing data on the google app engine with python trouble [migrated]

I am attempting to store data via python on the datastore.. but i am not succeeding. I have looked at the documentation but still cannot manage to get my app working. I have the following code which ...
10
votes
4answers
629 views

Why do some programmers categorize C, Python, C++ differently? - regarding level [duplicate]

I am taking an introductory course on python and the instructor says that python is a high level language and C and C++ are low level languages. It's just damn confusing. I thought that C, C++, ...
-3
votes
0answers
93 views

Which language would be more beneficial to learn for a PHP developer? [closed]

I know PHP and I want to impress myself by learning another language. I'm nowhere near an expert in PHP, but when I started to learn Laravel framework, I was like, "Wow, is this PHP? How cool is ...
0
votes
0answers
7 views

How to change ttk.Treeview column width and weight in Python 3.3 [migrated]

I have created a GUI for my application with Tkinter. I am using also a treeview widget. However I am unable to change its column widths and weights. How to do it properly? Sample: tree = ...
1
vote
1answer
391 views

Why does gmail use java? Is there really a advantage over something like php or python? [closed]

Note: I know that none of you (probably) work for google, so this is a lot more of a conceptual question. So yeah, i discovered that Gmail uses java and that got me thinking, Why? I personally never ...
1
vote
1answer
311 views

Python simulation-scripts architecture

Situation: I've some scripts that simulate user-activity on desktop. Therefore I've defined a few cases (workflows) and implemented them in Python. I've also written some classes for interacting with ...
-1
votes
0answers
41 views

Python: Single Quotes Showing up in my Database [migrated]

I'm doing some python programming, inserting data into a MYSQL database for a project. I've been doing the coding, but noticed an odd artifact; Whenever I insert string data, my database includes the ...
4
votes
1answer
249 views

Is it possible to write a code without class methods, globals, and class variables? [closed]

I'm designing my own programming language for fun, and I'm thinking of making it fully Object-oriented (no statics, no globals, no class variables, no class methods), so I need to find a way to ...
0
votes
0answers
31 views

Python web application frontend for equipment diagnostics and interaction

My goal is to have a Python application that runs a web server which hosts the user interface, and based on interactions from a user in their browser, long running tasks get kicked off and through ...
1
vote
3answers
112 views

Is it better to save output from command in memory and store later or save in a temporary file and then move to final location?

I hope this is not off topic. I have to save output from a command to file, but only if length of this output is positive. I've thought about two solutions: save output to a python variable, check ...
-4
votes
0answers
109 views

Project suggestions for a beginner [closed]

I'm a rather beginner in Python and looking for project ideas. I don't want to reinvent the wheel and I just can't think of any ideas for a project which hasn't been implemented before. Also I want to ...
0
votes
2answers
73 views

What is the convention regarding class names that may already exist in the ORM?

This is a generic question about class names and ORMs, but for context; I'm working on a Flask web app in Python using SQLalchemy. I'm struggling with naming a new class that will contain the ...
-3
votes
0answers
32 views

Video Streaming verification in python [closed]

I have to play a video in different player and verify whether video is streaming or not. please suggest me some module in python
0
votes
3answers
122 views

Architecting Python application consisting of many small scripts

I am building an application which, at the moment, consists of many small Python scripts. Each Python script processes items from one Amazon SQS queue. Emails come into an initial queue and are ...
19
votes
5answers
3k views

Is programming in Python faster than in C, C++ or Java?

There's a widespread belief among programmers that the more dynamic and loosely typed the language, the more productive the programmer will be in it. Guido van Rossum wrote about programming ...
3
votes
1answer
155 views

How to keep unit tests independent?

I've read it at many places that unit tests should be independent. In my case I have a class that does data transformation. These steps must be done sequentially, otherwise they don't make sense. For ...
2
votes
1answer
214 views

Python multiple inheritance or decorators for composable behaviours

I recently discovered (or rather realised how to use) Python's multiple inheritance, and am afraid I'm now using it in cases where it's not a good fit. I want to have some starting data source ...
0
votes
0answers
57 views

data handling with javascript

Python has a very neat package called pandas which allows for quick data transformation; tables, aggregation, that sort of thing. A lot of these types of functionality can also be found in the python ...
-1
votes
0answers
106 views

Developing an online IDE [closed]

Firstly, I am doing this for a large project, and it is 100% necessary for it. I am an experienced programmer with strong knowledge of Python, C, Ruby, Javascript, JQuery, HTML/CSS (but I have no ...

1 2 3 4 5 12