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)

2
votes
4answers
413 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 ...
9
votes
1answer
929 views

How does key-based caching work?

I recently read an article on the 37Signals blog and I'm left wondering how it is that they get the cache key. It's all well and good having a cache key that includes the object's timestamp (this ...
1
vote
1answer
334 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, ...
0
votes
1answer
88 views

DDD - Domain Driven Design, which development order should be applied?

1 - Design my entities, ie (in python): class Account: def __init__(name, author): self.name = name self.email = email 2 - Design my repositories: (as interface) class ...
0
votes
1answer
27 views

Making a sldprt to PDB file converter?

I wanted to create a parser that can read a solidworks file and turn it into a protein data bank file. This has already been done in a program called DiamondCAD. ...
0
votes
1answer
173 views

Front-end structure of large scale Django project

Few days ago, I started to work in new company. Before me, all front-end and backend code was written by one man (oh my...). As you know, Django app contains two main directories for front-end: ...
0
votes
1answer
210 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 ...
-2
votes
1answer
189 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 ...
4
votes
0answers
293 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 ...
1
vote
0answers
84 views

Developing code editor with python and gtk

I'd like to start writing a code editor for Python / PHP using python and gtk library but I need some advice before I start: In a general way, how is best to do syntax highlight? I was viewing the ...
1
vote
0answers
85 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 ...
1
vote
0answers
119 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 ...
1
vote
0answers
211 views

Watching file changes/additions/removal, but with an eye on partial transfer

I would like to monitor the filesystem in python, so that my application gets warned of the new file addition, file removal, or file change. Once the file is detected, the application starts ...
1
vote
0answers
98 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 ...
1
vote
0answers
101 views

Inheritance and constricted referencing

Let's say I have BaseA and BaseB classes. BaseB can have to several references of BaseA instances. Now, we have two other classes, DerivedA and DerivedB that respectively inherit from BaseA and BaseB. ...
1
vote
0answers
71 views

Let Cpython stream commands with IPC

I'm no expert in the Cpython internals, and with Cpython I mean the interpreter that is usually found inside applications that offer a python interpreter, the "classic" python interpreter; Now I was ...
1
vote
0answers
327 views

Is there a module for writing low level code on Python?

Can you manipulate bits and memory directly using Python? If yes, wouldn't that be a best option to dealing with performance-critical spots than C bindings?
0
votes
0answers
19 views

Gevent - Make blocking calls non-blocking

I have the blocking code shown below. Is calling monkey.patch_all() enough/optimal to make it non-blocking? Does Gevent handle iterations like these? # front page def front_page(): database = ...
0
votes
0answers
18 views

Is a WeakValueDictionary appropriate for a pubsub manager?

I find I learn best when I have to start from step 0, and since pubsub has not been an intuitive process for me to grok, I decided to make my life difficult and build a pubsub library for Python. ...
0
votes
0answers
15 views

streaming data in memory aggregation

We have a stream of data we're aggregating stats over and putting into a python dictionary (sent from kafka). Every X time interval, We update our database with these aggregated metrics. This ...
0
votes
0answers
27 views

subclass QAbstractTableModel - reuse as much code as possible

in my PyQt application I am heavily using the model/view approach. For every model I create, I do the following: class myModel(QtCore.QAbstractTableModel): def __init__(self, parent = None): ...
0
votes
0answers
47 views

Check some value between each function call

Can you recommend a nice way of checking a particular value between calls to a set of functions? E.g. something like this in Python (might not be terribly 'Pythonic'): self.error_code = 0 # this ...
0
votes
0answers
26 views

Choosing a database for a framework with both asynchronous and synchronous calls

I'm building a framework to work as an all-purpose astronomy pipeline and before I get too far into development I was hoping to run my needs by you all to see if there are any optimizations or ...
0
votes
0answers
27 views

HTTP API that wraps any Python-Scrapy spider

I have to write an HTTP API that wraps any Scrapy spider, it should accept Requests, execute them in Scrapy, and return data extracted by the spider and lets the user reuse the same code to extract ...
0
votes
0answers
32 views

Implementing FUSE for deduplication

I am new to FUSE and using python-fuse for writing a file system for data deduplication. Let's say, I have a directory named "metadata" and in that directory, there is a file foo and a directory ...
0
votes
0answers
113 views

Django web app with websockets

I want to make a web service using Django, but that also has websocket functionality. Having done a bit of reading, this is the tech stack that I'm looking at: --------------------------------- ...
0
votes
0answers
47 views

Distributing Contestant Entries Between Multiple Bins, Is this Knapsack?

I am an algorithm novice and am faced with a rather difficult problem. I working with contest's. There are contestant - individual player entry - contestants can have multiple entries into a ...
0
votes
0answers
84 views

Approach to statically analyze a Python code base

What approach should I use to statically analyze a Python code base? In particular, I am looking for ways to: extract and display the class hierarchy, extract and display class relationships, ...
0
votes
0answers
85 views

Extending user registration in Django site that uses both site admin tables and my own module?

I'm writing a Django site that registers a particular type of user and this is done by the resources that come with the framework, the site administration. The issue: I'd like to create a new model ...
0
votes
0answers
119 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 ...
0
votes
0answers
39 views

Is it possible to write plugins for cPanel in Python?

I'd like to know if it is indeed possible to to write plugins for cPanel in Python. While checking cPanel's site, it mentions both PHP and Perl. Also this question on their forums says it's possible ...
0
votes
0answers
52 views

How to implement a 'before' hook for RequestHandler in the webapp2 with conditional response?

Need to do some authentication checks before deciding what content to display. Ideally, I'd like to have a restrictive base handler, that would implement the "before" hook that could show an ...
0
votes
0answers
117 views

Why does pkg_resources not find bloom in my virtualenv?

I'm trying to hack on the ROS bloom build system (https://github.com/ros-infrastructure/bloom). After I've made some edits, I build it and install it to a virtualenv to test using python setup.py ...
0
votes
0answers
161 views

Plugin based application with TUI

I am wery newb in Python :) Can anyone share example of application whith co using packages "npyscreen" and "yapsy" ? I hope to see a several plugins from several categories. And in TUI(npyscreen ...