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)

0
votes
3answers
174 views

Tips for developing a mobile app with a team [duplicate]

I am currently a high school student, I've been assigned to manage a group in my school to develop a mobile app and the problem is that all of us have no experience in making a project in a team and ...
2
votes
1answer
210 views

Python garbage collection giving me a hard time

Context: I am developing a web application using webapp2 web-framework with python to be hosted on GAE. The web application (web-app from now on), is a chess variant. Being a first timer, I have ...
4
votes
2answers
282 views

Is using static-typing the solution to domain-driven design and decreasing the number of errors?

We are using PHP (a dynamically-typed language) in our project. However, I have found my colleagues asking questions such as ...
4
votes
1answer
336 views

Will loop constructs become obsolete? [closed]

By loop constructs I mean for… and while… constructs with nested statements. Currently I am coding a tool in Python and decided out of curiosity not to use the regular loops - and rely on ...
3
votes
2answers
330 views

What was the need of introducing Python 3 when we already had Python 2 [duplicate]

I am still learning python and I started with Python 3. This question not Python 2 vs 3 or difference between them like print() is a function and not language construct and 3/2 = 1.5 My question is ...
1
vote
2answers
188 views

Using a web framework as python GUI

If I built some useful piece of python code to e.g. scrape a website or to calculate something big, at some point I might want to add a GUI to my project. For this I could use Tk, Qt, Pygame or any ...
2
votes
3answers
277 views

is it really necessary for python to differentiate between tuples, lists, dicts, ordered dicts and sets?

i have been learning python over the past month or so. i like many of the things about the language, but i find the differentiation between tuples, lists, dicts, ordered dicts, and sets to be ...
0
votes
0answers
98 views

How to algorithmically add notes to an existing midi file relative to positions of existing notes in python

I have a midi file that I'd like to algorithmically add notes to relative to other notes that already exist in the midi file using python, or if it's easier using a different language I'm open to that ...
2
votes
3answers
224 views

How should I go about bringing this code under test?

I'm working on an open-source test framework. 90% of my codebase has good test coverage. My main problem area is the command-line entry point. This module began life as a very short script for ...
8
votes
3answers
387 views

When and how should I use exceptions (in Python)?

The Setting I often have trouble determining when and how to use exceptions. Let's consider a simple example: suppose I am scraping a webpage, say "http://www.abevigoda.com/", to determine if Abe ...
1
vote
0answers
149 views

Benefits of using object document mapping (ODM)

I am creating a web app on Flask and was planning to use mongodb. Most of the examples using this stack that I've come across have used an ODM of some kind and was wanting to figure out whether or not ...
4
votes
6answers
1k views

How does rapid prototyping fit into an agile methodology?

I work for a large company, which dictates the use of agile processes. For example, for our projects, we use cloud-based services that are specifically targeted at managing agile development. The ...
2
votes
1answer
206 views

Shuffling algorithm with no “self-mapping”?

To randomly shuffle an array, with no bias towards any particular permutation, there is the Knuth Fischer-Yeats algorithm. In Python: #!/usr/bin/env python import sys from random import randrange ...
-1
votes
1answer
655 views

Packaging PHP/Python files inside android .apk files?

I am developing an android app using HTML5. I want to make it work completely offline. I know that it is possible to package the .html, .css and .js files inside the .apk file itself in the ...
1
vote
1answer
349 views

Web application / Domain model integration using JSON capable DTOs

I'm a bit confused about architectural choices for the web-applications/java/python world. For c/c++ world the available (open source) choices to implement web applications is pretty limited to zero, ...
14
votes
1answer
743 views

How can I tell if I am overusing multi-threading?

I currently feel like I am over-using multi-threading. I have 3 types of data, A, B and C. Each A can be converted to multiple Bs and each B can be converted to multiple Cs. I am only interested in ...
-1
votes
1answer
126 views

Building a regex builder [closed]

I am a beginner in programming in general and web development in particular. I am especially bad at regular expressions. Recently I was involved in building a couple of cPanel plugins(Perl-CGI) and ...
3
votes
2answers
188 views

Improving the performance of a db import process

I have a program in Microsoft Access that processes text and also inserts data in MySQL database. This operation takes 30 mins or less to finished. I translated it into VB.NET and it takes 2 hours ...
4
votes
1answer
2k views

Why did Apple remove Python support in Mavericks, aka Mac OS X 10.9? [closed]

In a rather unceremonious way - Apple has removed Python support (at least from the SDK) in 10.9. Python IS still installed on the system in... /System/Library/Frameworks/Python.framework but ...
-2
votes
1answer
144 views

Python scripts link to GUI using an IDE [closed]

I am studying python. Now I can write python scripts(codes) to some extent. I am interested in making GUI to those written programs.I like to do it using an IDE rather than using PyGTK or Tkinter. Can ...
3
votes
1answer
576 views

How Python random shuffle works?

How shuffle from random works in Python? I ask because it works very fast. When I try to write shuffle it works 1 minute for 10^6 element, but Python shuffle does that in 8 sec?
0
votes
1answer
119 views

Naming a predicate: “precondition” or “precondition_is_met”?

In my web app framework, each page can have a precondition that needs to be satisfied before it can be displayed to the user. For example, if user 1 and user 2 are playing a back-and-forth ...
0
votes
3answers
3k views

Browser-based GUI for a python application [closed]

I want to create a web/browser-based GUI for a command-line python application. The goal is to make use of HTML/JS technologies to create this GUI. As the application itself, it needs to run on Linux ...
2
votes
1answer
521 views

Tips for Tail Call Recursion in Python [duplicate]

Ok, Python doesn't have tail call optimization. But for those who think better recursively than "looply", whats the best practices to write code?? 1000 stack calls are enough for many cases, but ...
1
vote
1answer
424 views

Is ZeroMQ a good choice to make a Python app and a C# managed assembly work together?

I have a task that involves talking to a .NET-based API (namely AutoCAD) to retrieve data, send commands, and react to events. I want to separate the API operations and the proper program logic ...
1
vote
2answers
174 views

OO way to gather together data from multiple objects without getters

I'm writing a system that has a number of objects with data in them. For example one object has a user name attribute, another has a date, another shopping cart item etc. I'm making an object that ...
6
votes
3answers
392 views

From an execution perspective is an interpreter the same as the JVM / or the .net Framework

I've recently started two introductory level courses - one using Python, the other Java. I've read the answers to this Question but still have difficulty understanding how each ends up with machine ...
1
vote
1answer
3k views

Why use classes when programming a tkinter gui in python

I program primarily in python and have programmed a couple of GUI's with Tkinter, every tutorial I have ever seen has recommended defining and using a class for the GUI, but my GUI runs flawlessly ...
9
votes
4answers
632 views

Python decorators and Lisp macros

When looking Python decorators someone made the statement, that they are as powerful as Lisp macros (particularly Clojure). Looking at the examples given in PEP 318 it looks to me as if they are just ...
1
vote
1answer
316 views

Why is there an alternative download page of python for China?

On http://python.org there are two download pages, http://python.org/download/ for international users and http://python.org/getit/ for Chinese users. When accessed from a country other than china, ...
10
votes
2answers
1k views

SQLite with two python processes accessing it: one reading, one writing

I'm developing a small system with two components: one polls data from an internet resource and translates it into sql data to persist it locally; the second one reads that sql data from the local ...
2
votes
1answer
157 views

Merge two different API calls into One

I have two different apps in my django project. One is "comment" and an other one is "files". A comment might save some file attached to it. The current way of creating a comment with attachments is ...
0
votes
1answer
179 views

How do I create every permutation [closed]

I have a list of letters, this is just an example list: ['a','b','c','d','e'] How do I compute every combination of the list, the letters cannot repeat. For example. a,b,c,d,e a,c,b,d,e a,c,d,b,e ...
0
votes
1answer
293 views

Sprite Sheets in PyGame?

So, I've been doing some googling, and haven't found a good solution to my problem. My problem is that I'm using PyGame, and I want to use a Sprite Sheet for my player. This is all well and good, and ...
-1
votes
2answers
190 views

Why doesn't Python just establish a format for declaring tab widths?

I've read the flame wars over the use of spaces and tabs. When working with any markup language (when scope isn't very important and when pressing space 4 times is a PITA), I tend to minimize the tab ...
4
votes
1answer
302 views

What kind of problems is an Android beginner likely to encounter in using Scala?

I am a hobbyist programmer who makes and maintains one production system, largely coded in Python, which now has to be ported to Android. I don't know Java at all. However, SL4A in Android makes ...
-1
votes
1answer
150 views

Integrate a Python Project with a Visual Studio C++ Console Application?

I now have a Python project that is in charge of generating the simulation data and visualizing the simulation and processed data. A C++ console application is already available in my Visual Studio. ...
1
vote
2answers
81 views

Suggestions designing an XML polling deamon in python

I'm about to take on a new project for a client designing a server-side python program that will poll a number of XML streams at regular intervals and populate a Postgresql database with results. The ...
2
votes
2answers
1k views

When to use private methods in Python

I have a class, but every method in it should be private (apart form __init__ and __str__). Should I denote every method with a double underscore, or is that deemed bad practice?
-2
votes
1answer
220 views

building a chat bot for an e-commerce site

I was recently talking to a couple of friends who run a modest e-commerce website (Daily visitors: approx. 100,000,). They plan to have an in-site chat module to engage customers. Since the whole ...
1
vote
2answers
327 views

Clarity over Python and Jython

I'm a Java programmer, but I want to program in Jython. I've never coded in Python before, but have been looking through some tutorials and I'm fairly confident I can grasp it. My question is ...
4
votes
1answer
636 views

Objects of different programming languages

Apparently, there are some resemblance between objects in JavaScript and dictionaries in Python. Each language defines an object a little different (and there is some logic that all definitions to be ...
4
votes
1answer
86 views

Clarification of Python Functional document

I'm rereading this http://docs.python.org/2/howto/functional.html document and hit this line, '...Unfortunately, proving programs correct is largely impractical and not relevant to Python software. ...
5
votes
3answers
401 views

Multiple sites with the same codebase in Python

I am trying to run a large amount of sites which share about 90% of their code. They are simply designed to query an API and return the results. They will have a common userbase / database but will be ...
0
votes
2answers
159 views

Python — when should a class have-a rather than be-a?

This is related to "Extends is evil" vs. OCP? but separate because the idea of "implement the interface" doesn't exist in Python. I'm writing a class to pull some data off a webpage. It's ...
7
votes
1answer
2k views

Why did Microsoft abandon IronRuby and IronPython? [closed]

Several years ago, Microsoft announced that Ruby and Python were coming to .net. The projects were called IronRuby and IronPython, respectively. Microsoft said that the projects would be built on ...
0
votes
0answers
161 views

Embed Python into Lua?

I've found a lot of things about embedding Lua into Python, but I was wondering is is possible to embed Python into Lua? I've searched for a while, and couldn't find anything on it, so maybe some of ...
2
votes
1answer
357 views

Python multithreading and utilizing modern processors - what is the downside?

CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome ...
1
vote
2answers
118 views

Listener, logger, plotter - what threading arcitecture to choose for this?

I am constructing a program that does several things. Listens to a port. Every second a string is received When new data is received, it has to be logged. No errors or skipped entries are allowed ...
0
votes
2answers
518 views

Languages implemented in Python?

AFAIK, Scala and Clojure are implemented in Java and Java is implemented in C. I suppose that many or most languages are implemented in C, for instance Perl, Python and SQL. I don't know much about ...