Alright so I am making a commandline based implementation of a website search feature. The website has a list of all the links I need in alphabetical order.
Usage would be something like
./find.py LinkThatStartsWithB
So it would navigate to the webpage associated with the letter B.
My questions is what is the most efficient/smartes...
In the past I've done the coding-part of my web-projects mostly by myself. Now, as we are a team working on some project, be it phython or php or ..., is there some simple versioning system to use?
My hoster doesn't seem to support any kind of this sort. On the other hand, I feel it is too early to start renting a whole server in this p...
I have this line that works OK:
c.execute('select cleanseq from cleanseqs WHERE newID="%s"'%name)
But I want to use SQLite parameter substitution instead instead of string substitution (because I see here that this is safer).
This is my (failed) try:
t = (name,)
c.execute('select cleanseq from cleanseqs WHERE newID="?"',t)
But thi...
I need to insert a horizontal bar chart in a web page. The thing I have to do is very similar to a Gantt Chart.
I'd like to use a javascript library for the purpose. I tried jsgantt, but actually it is not very beautiful.
I could evaluate also a server generation of the graph. In case my server side language is Python.
It will be part...
I was writing a python function that looked something like this
def foo(some_list):
for i in range(0, len(some_list)):
bar(some_list[i], i)
so that it was called with
x = [0, 1, 2, 3, ... ]
foo(x)
I had assumed that index access of lists was O(1), but was surprised to find that for large lists this was significantly slowe...
Is there a way to programmatically trace the execution of all python functions/methods? I would like to see what arguments each of them was called with. I really mean all, I'm not interested in a trace decorator.
In Ruby, I could alias the method I wanted and add the extra behaviour there.
...
In a POSIX system, I want to see if a given process (PID 4356, for example) is running. It would be even better if I could get metadata about that process.
...
I'm starting to code in various projects using Python (including Django web development and Panda3D game development). To help me understand whats going on, I would like to basically 'look' inside the Python objects to see how they tick - like their methods and properties. So say I have a Python object, what could would I need to print o...
Right now, I am buffering bytes using strings, StringIO, or cStringIO. But, I often need to remove bytes from the left side of the buffer. A naive approach would rebuild the entire buffer. Is there an optimal way to do this, if left-truncating is a very common operation? Python's garbage collector should actually GC the truncated bytes.
...
I manage the testing for a very large financial pricing system. Recently our HQ have insisted that we verify that every single part of our project has a meaningful test in place. At the very least they want a system which guarantees that when we change something we can spot unintentional changes to other sub-systems. Preferably they want...
I want to know the number of CPUs on the local machine in Python. The result should be user/real as output by time(1) when called with an optimally scaling userspace-only program. I'd be interested in any better ways to solve that problem.
...
How to capitalize words containing non-ASCII characters in Python? Is there a way to tune string's capitalize() method to do that?
...
Hi all!
I'm writing a parser for an internal xml-based metadata format in python. I need to provide different classes for handling different tags. There will be a need for a rather big collection of handlers, so I've envisioned it as a simple plugin system. What I want to do is simply load every class in a package, and register it with m...
People say that the clojure implementation is excellent apart from the limitation of having no tail call optimisation - a limitation of the jvm not the clojure implementation.
http://lambda-the-ultimate.org/node/2547
It has been said that to implement TCO into Python would sacrifice
stack-trace dumps, and
debugging regularity.
h...
I want to create modal dialog but which shouldn't behave in a modal way i.e. control flow should continue
if i do
dlg = wx.Dialog(parent)
dlg.ShowModal()
print "xxx"
dlg.Destroy()
"xxx" will not get printed, but in case of progress dialog
dlg = wx.ProgressDialog.__init__(self,title, title, parent=parent, style=wx.PD_APP_MODAL)...
Hi everyone,
how would you parse a Microsoft OLE compound document using Python?
Edit: Sorry, I forgot to say that I need write support too.. In short, I have an OLE compound file that I have to read, modify a bit and write back to disk (it's a file made with a CAD application)
...
I am trying to create a simple open source utility for windows using Python that can perform user-defined actions on the selected text of the currently active window. The utility should be activated using a pre-defined keyboard shortcut.
Usage is partially outlined in the following example:
The user selects some text using the mouse o...
Could you guys please tell me how I can make the following code more pythonic?
The code is correct. Full disclosure - it's problem 1b in Handout #4 of this machine learning course. I'm supposed to use newton's algorithm on the two data sets for fitting a logistic hypothesis. But they use matlab & I'm using scipy
Eg one question i have...
Using Perl, Python, or Ruby, can I write a program, probably calling Win32 API, to "click" on the screen at scheduled time, like every 1 hour?
Details:
This is for experimentation -- and can the clicking be effective on Flash content as well as any element on screen? It can be nice if the program can record where on screen the click...
iam trying to find a good python client to test stomp over ssl
im using a Fuse Message Broker...........and intend to implement atleast client side authentication later.........
can anyone help me get started
...