Tagged Questions
Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.
0
votes
0answers
4 views
Python and the PATH environment variable in Windows
I am following the Pylearn2 tutorial and in one of the steps the following is written:
You should have pylearn2/scripts in your PATH enviroment variable.
So i added:
...
-1
votes
1answer
6 views
How to make two column fom at same page?
can anyone please help me out to make the two column form vertically at same page.i ve also attached the coding too.my issue is that how to write two forms in form.py and how to do changes in ...
0
votes
0answers
2 views
Set wx.Slider Limit
Is there any way limit a wxpython wx.Slider's control to a point in the middle of the slider? I know I can set the min and max values of the slider, but I want to set up an invisible max or min in the ...
0
votes
1answer
6 views
How to change Python version for Enthought Canopy?
I installed Enthought Canopy on a Mac and it's using Apple's built-in Python 2.7.3 version.
sys.version
Out[1]: '2.7.3 | 32-bit | (default, Jun 14 2013, 18:24:40) \n[GCC 4.2.1 (Apple Inc. build ...
0
votes
1answer
13 views
Python - how can i read in and read out so that other readers can read it for further pursing?
I have to run the Java application and read the syslog to trigger some other Python based events.
At the same time i also need to dump and store it in /var/tmp/log.log of all java outputs, but ...
0
votes
3answers
23 views
In python how can i know a given file is being used
I have a list of file and there is only one in used in a time. So i wanna know which file is being used by specific program. Since i can use 'unlocker' to find out a file that are in used like this ...
0
votes
0answers
25 views
Python or PHP sending email advantages/disadvantages? [on hold]
Is your experience, what's better for email automation? PHP or Python?
0
votes
4answers
24 views
Python : python is adding extra newline to the output.
The input file: a.txt
aaaaaaaaaaaa
bbbbbbbbbbb
cccccccccccc
The python code:
with open("a.txt") as f:
for line in f:
print line
The problem:
[root@a1 0]# python read_lines.wsgi
...
0
votes
1answer
9 views
Is there a way to make a Text widget in Tkinter non-clickable and non-editable?
Is it possible do make a Text widget in Tkinter non-clickable and non-editable? I searched for a solution but coudn't find it.
1
vote
0answers
8 views
paramiko sftp get error
I have the following code with initalization of credentials removed.
Printing of directory listing works, however "get" fails with the following exception
It seems to me that is failing in prefetch ...
0
votes
0answers
8 views
python networkx: do networkx's centrality algorithms use a weighted adjacency matrix?
I'm using networkx to compute a couple centrality statistics for a weighted graph (eigenvector centrality, and katz centrality). The documentation for these methods mention the graph's adjacency ...
0
votes
2answers
28 views
Strange Python class behavior
I have created a simple class to manage tree of related objects:
class node(object):
children = list([])
def __init__(self, ID, *children):
self.ID = ID
for c in children:
...
0
votes
1answer
6 views
Catch a click in pyGTK
Using http://pygtk.org/pygtk2tutorial/examples/filelisting.py how can I detect a click on a filename and do something with it (like print this filename on the standard output)?
the file is here :
...
2
votes
1answer
40 views
Convert values to functions
The following code converts values to functions:
>>> a = map(lambda(x): lambda: x, [1, 2])
>>> [func() for func in a]
[1, 2]
However the following snippet fails:
>>> a = ...
0
votes
0answers
9 views
python lxml xpath AttributeError (NoneType) with correct xpath and usually working
I am trying to migrate a forum to phpbb3 with python/xpath. Although I am pretty new to python and xpath, it is going well. However, I need help with an error.
(The source file has been downloaded ...