Hello all,
im making some script with python mechanize,
one of problem is it really hard to find which support javascript supported web client
scraping or crawler.
actually i was found some such as python-spidermonkey and pykhtml and so on.
but most of all only support on linux .
i want to make my python script with exe file.
so ...
how should i implement openid in python language using openid API?
...
Using Python I want to replace all URLs in a body of text with links to those URLs, like what Gmail does.
Can this be done in a one liner regular expression?
Edit: by body of text I just meant plain text - no HTML
...
If think my question is pretty obvious and almost every developer working with UserProfile should be able to answer it.
However, I could not find any help on the django documentation or in the Django Book.
When you want to do a UserProfile form in with Django Forms, you'd like to modify the profile fields as well as some User field.
B...
The class below is designed to manipulate a cisco-like device interface, for the purpose of executing commands and updating configuration elements.
As is currently stands, I can instantiate the class, make a call to the ssh_to_aos_expsh function and get back valid output (e.g. get the config when the command is 'show running-config'). ...
Hello.
I need to load large models and other structured binary data on an older CD-based game console as efficiently as possible. What's the best way to do it? The data will be exported from a Python application. This is a pretty elaborate hobby project.
Requierements:
no reliance on fully standard compliant STL - i might use uSTL th...
during preparing data for numpy calculate ,i curious about way to contruct
myarray.shape => (2,18,18)
from
d1.shape => (18,18)
d2.shape => (18,18)
i try to use numpy command
hstack([[d1],[d2]])
but it looks not work!!
...
i 'm just finish labs meeting with my advisor, previous code is written in matlab and it run offline mode not realtime mode, so i decide to convert to python+numpy (in offline version) but after labs meeting, my advisor raise issue about speed of realtime recognition, so i have doubt about speed of python+numpy to do this project. or bet...
In short I'm creating a Flash based multiplayer game and I'm now starting to work on the server-side code. Well I'm the sole developer of the project so I'm seeking a high-level socket library that works well with games to speed up my development time.
I was trying to use the Twisted Framework (for Python) but I'm having some personal ...
How can i get process id of the current process's parent?
In general given a process id how can I get its parent process id?
e.g. os.getpid() can be used to get the proccess id, and os.getppid() for the parent, how do I get grandparent,
My target is linux(ubuntu) so platform specific answers are ok.
...
Hi,
I'm writing an application in Python with Postgresql 8.3 which runs on several machines on a local network.
All machines
1) fetch huge amount of data from the database server ( lets say database gets 100 different queries from a machine with in 2 seconds time) and there are about 10 or 11 machines doing that.
2) After processing ...
I am writing a script that will try encoding bytes into many different encodings in python 2.6. This page http://www.python.org/doc/2.6/library/codecs.html?highlight=cp1250#id3 lists all the encodings that python can encode to. Rather than copy & paste that, is there some way to get a list of available encodings that I can iterate over?
...
Hi guys!
I am working in a small app in the Google App Engine (Python), which uses the Google Data API in order to create a new calendar in a Google account and populate it with some events.
The events that I am using are parsed from another place, and they have the date in the Europe/Stockholm timezone, (I think it is CEST or CET).
T...
I want to start reading the Python source code.
My experience,
I know Python and Java very well. I know some other languages at various levels of proficiency, but neither C/C+/ particularly well. I studied C in college, but have never professionally programmed in it.
My Reasons for reading this code.
Understand how python works unde...
I though it'll be interesting to look at threads and queues, so I've written 2 scripts, one will break a file up and encrypt each chunk in a thread, the other will do it serially. I'm still very new to python and don't really know why the treading script takes so much longer.
Threaded Script:
#!/usr/bin/env python
from Crypto.Cipher ...
I'm using Distribute's pkg_resources.require() in my project to check if prerequisites are installed on the user's machine. One of the prerequisites is wxPython. But when I try pkg_resources.require('wxPython'), I'm getting the DistributionNotFound error, even though it's definitely installed and operable on my machine.
I also tried the...
Every so often on here I see someone's code and what looks to be a 'one-liner', that being a one line statement that performs in the standard way a traditional 'if' statement or 'for' loop works.
I've googled around and can't really find what kind of ones you can perform? Can anyone advise and preferably give some examples?
For example...
My deployment script overwrites the media and source directories which means I have to move the uploads directory out of the media directory, and replace it after the upload has been extracted.
How can I instruct django to upload to /uploads/ instead of /media/?
So far I keep getting django Suspicious Operation errors! :(
I suppose an...
Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like the following:
On model load: SELECT AES_DECRYPT(fieldname, password) FROM tablename
On model save: INSERT INTO tablename VALUES (AES_EN...
Hi, I'm making plots in python and matplotlib, which I found huge and flexible, till now.
The only thing I couldn't find how to do, is to make my plot have multiple grids.
I've looked into the docs, but that's just for line style... I'm thinking on something like two plots each one with a different grid, which will overlap them.
So, for...