Traceback (most recent call last):
File "D:\Python25\Lib\site-packages\django\core\servers\basehttp.py", line 280, in run
self.finish_response()
File "D:\Python25\Lib\site-packages\django\core\servers\basehttp.py", line 319, in finish_response
for data in self.result:
File "D:\Python25\Lib\site-packages\django\http\__ini...
hello friends,
I need to validate the textboxes with wx.Textvalidator.
Any please help me to do this?
How can i use wx.FILTER_ALPHA with validators and if the user is giving a wrong input how can i give them a message?
i need to validate all the inputs when clicking on the save button?
can any one provide me a sample code for this?
...
Googling didn't give me great results. Is there any sort of API for Wireshark that abstracts away from the main source code so we can develop programs that interact with it and deal with the data it provides?
edit: I appreciate the suggestions for different ways to receive packets, but I want to implement packet injection into Wiresha...
In one view, I set:
request.session.set_expiry(999)
request.session['test'] = '123'
In another view, I do:
print request.session['test']
and it cannot be found. (error)
It's very simple, I just have 2 views.
It seems that once I leave a view and come back to it...it's gone! Why?
...
Hello every body,
I work on text-to-speech trasforming text, in audio mp3 files, using python 2.5.
I use pyTSS as a python Text-To-Speech module, to transform text in audio .wav files (in pyTTS is not possible to encode in mp3 format directly). So after that, I code these wav files, in mp3 format, using lame command line encoder.
Now,...
params = {'fruit':'orange', 'color':'red', 'size':'5'}
How can I turn that into a string:
fruit=orange&color=red&size=5
...
I'm doing Oauth, and Linkedin needs me to send a "header" request instead of URL request (I have no idea what that means).
This is what someone says on Google:
If the library you are using isn't
using HTTP headers for the
authorization, you're not going to be
able to access protected resources.
Most OAuth libraries have an o...
hi,
I want to extract the data between <tr> tags from an html page. I used the following code.But i didn't get any result. The html between the <tr> tags is in multiple lines
category =re.findall('<tr>(.*?)</tr>',data);
Please suggest a fix for this problem.
...
Hello.
Can I debug PyQt application when is main loop running ?
Pdb, NetBeans, PyDev, all "freeze" when sys.exit(app.exec_()) is executed.
I probably missing something obvious. Or what can be problem, please ?
I apologize for my "creepy" english. Thanks.
...
When trying to use pydoc under Windows and python.org 2.6.4 I get the following error:
C:\>pydoc sys
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "C:\programs\Python26\Lib\pydoc.py", line 55, in ?
import sys, imp, os, re, types, inspect, __builtin__, pkgutil
File "C:\programs\Python26\Lib\os...
I have a conjunctive probability mass function array, with shape, for example (1,2,3,4,5,6) and I want to calculate the probability table, conditional to a value for some of the dimensions (export the cpts), for decision-making purposes.
The code I came up with at the moment is the following (the input is the dictionary "vdict" of the f...
I have two computers in geographically dispersed locations, both connected to the internet. On each computer I am running a Python program, and I would like to send and receive data from one to the other. I'd like to use the most simple approach possible, while remaining somewhat secure.
I have considered the following solutions, but I'...
I want to convert the following code:
...
urls = [many urls]
links = []
funcs = []
for url in urls:
func = getFunc(url, links)
funcs.append(func)
...
def getFunc(url, links):
def func():
page = open(url)
link = searchForLink(page)
links.append(link)
return func
into the much more convenient code:
urls =...
I am building a routine that processes disk buffers for forensic purposes. Am I better off using python strings or the array() type? My first thought was to use strings, but I'm trying to void unicode problems, so perhaps array('c') is better?
...
I am trying to get Netbeans python to run with the default python platform set to Python 2.6.1 (my system python), so in Netbeans I do the following:
Tools -> Python Platform
Set Python 2.6.1 to 'default'
However, it seems impossible to make this stick. Whenever I restart Netbeans it's back to Jython 2.5 again.
Moreover, I can obvious...
I haven't found a standard way in Python to read images. Is there really none (because there are so many functions for so many custom stuff that I really wonder that there are no functions to read images)? Or what is it? (It should be available in the MacOSX standard installation and in most recent versions on Linux distributions.)
If t...
How bad is it to redefine a class method from another, third-party module, in Python?
In fact, users can create NumPy matrices that contain numbers with uncertainty; ideally, I would like their code to run unmodified (compared to when the code manipulates float matrices); in particular, it would be great if the inverse of matrix m could...
I have c++ library that need communicate with Python plugged in modules. Communication supposes implementing by Python some callback c++ interface.
I have read already about writing extensions, but no idea how to develop inheritance.
So something about:
C++:
class Broadcast
{
void set(Listener *){...
}
class Listener
{
void n...
hello,
i need code python to get all pic files in diretorie e paste another dir
for ex.
in "c:\capture" confirm exist pic files, if true get all and paste in c:\backup\paste.1
sleep 30 min and confirm new files in c:\capture if true get all and past in c:\backup\paste.2
sorry my bad english
tks
...
I'm trying to access my classes via
from project import *
But from the python console something seems to be off with the paths. How do I set the correct paths to my project so I can import classes?
My models are stored in:
/Users/username/project/project/model
from project import *
And the error reads:
ImportError: No module...