I need some help with this question relating to TurtleGraphics in Python:
A small detail of tipsy_turtle() is that when the turtle turns 90 degrees it immediately "jumps" to the new direction. This makes its movement seem jagged. It might look better if the turtle moved smoothly when turning. So, for this question, write a function call...
I was wondering if there's any django module, or in such case any python module, that will allow me to create my own application to manage the creation, administration, etc of GnuPG keys, as well as the ability to sign and encrypt documents through this application?
If there's no such module, how can I do that?
Thank you.
...
I'm building a mobile photo sharing site in Python similar to TwitPic and have been exploring various queues to handle the image processing. I've looked into RabbitMQ and ActiveMQ but I'm thinking that there is a better solution for my use case. I'm looking for something a little more lightweight. I'm open to any suggestions.
...
I have a list L.
I can delete element i by doing:
del L[i]
But what if I have a set of non contiguous indexes to delete?
I=set([i1, i2, i3,...])
Doing:
for i in I:
del L[i]
Won't work.
Any ideas?
...
I open the urls with
site = urllib2.urlopen('http://google.com')
And what I wanna do is connect the same way with a proxy
I got somwhere telling me
site = urllib2.urlopen('http://google.com', proxies={'http':'127.0.0.1'})
but that hadent worked either
I know urllib2 has something like a proxy handler but I cant recall that function
...
I'm new to Python and I'm trying to create a simple GUI using Tkinter. So often in many user interfaces, hitting the tab button will change the focus from one text box to another. Whenever I'm in a text widget, tab only indents the text cursor.
Does anyone know if this is configurable? If not, can PyQt or any other Python UI framewor...
locals is a built in function that returns a dictionary of local values. The documentation says:
Warning
The contents of this dictionary should
not be modified; changes may not
affect the values of local variables
used by the interpreter.
Unfortunately, exec has the same problem in Python 3.0. Is there any way round this...
While looking across the Django documentation, I came across the FormPreview.
The description says this:
Django comes with an optional “form preview” application that helps automate the following workflow:
“Display an HTML form, force a preview, then do something with the submission.”
What is meant by "force a preview"? Wha...
I'm trying to do some of the code golf challenges but they all require the input to be taken from stdin and I don't know how to get that in python.
...
I tried os.__file__ but that returns the name of the file where os resides.
...
Let's say I have a form field for "Name". I want to display an error message if it contains special characters such as $,#,etc. The only acceptable characters should be any alphanumeric, the hyphen "-", and the apostrophe "'". I am not sure how i should search the name for these non-acceptable characters, especially the apostrophe. So...
I'm using Python 2.5 locally and GAE 1.5.
I'm trying to load data which is not is CSV format. Here's a
simplified model which reflects what I get with a more complex real
life issue:
class Thing(db.Model):
name = db.StringProperty()
class ThingLoader(bulkloader.Loader):
elements = [
('name', str)
]
def...
I would like to have a python gui that loads different images from files. I've seen many exmples of loading an image with some code like:
img = wx.Image("1.jpg", wx.BITMAP_TYPE_ANY, -1)
sb = wx.StaticBitmap(rightPanel, -1, wx.BitmapFromImage(img))
sizer.Add(sb)
It seems to be suited for an image that will be there for the entire life ...
Hello,
I am new to python and am having trouble finding the correct syntax to use.
I want to plot some supernovae data onto a hammer projection. The data has coordinates alpha and beta. For each data point there is also a value delta describing a property of the SN.
I would like to create a colour scale that ranges from min. value of de...
I want to write application which paste some text to active window on some keystroke. How can i do this with Python or C++ ?
Update:
Sorry people. I think i don't describe problem clearly. I want to write app, which will work like a daemon and on some global keystroke paste some text to current active application (text editor, browser,...
How can i remove all characters except numbers from string?
...
I have found that when the following is run, python's json module (included since 2.6) converts int dictionary keys to strings.
>>> import json
>>> releases = {1: "foo-v0.1"}
>>> json.dumps(releases)
'{"1": "foo-v0.1"}'
Is there any easy way to preserve the key as an int, without needing to parse the string on dump and load.
I believe...
Hi,
I'm interested in writing a PAM module that would make use of a popular authentication mechanism for Unix logins. Most of my past programming experience has been in Python, and the system I'm interacting with already has a Python API. I googled around and found pam_python, which allows PAM modules to invoke the python intrepreter, t...
How do you emulate Python style generators in your favorite language? I found this one in Scheme. It must be interesting to see other implementations, especially in those languages that don't have first-class continuations.
...
I want to stream a binary data using python. I do not have any idea how to achieve it. I did created python socket program using SOCK_DGRAM. Problem with SOCK_STREAM is that it does not work over internet as our isp dont allow tcp server socket.
I want to transmit screen shots periodically to remote computer.
I have an idea of maintai...