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
3 views
Python Blowfish Encryption
I am struggling due to my incomplete knowledge of Java to convert this encryption code to Python code. The two should have the exact same results. Help would be greatly appreciated.
import ...
0
votes
0answers
5 views
Charset/Encoding error while Inserting to Google Datastore
I know this question is an exact duplicate of at least a dozen other questions. But I posted this question helplessly only after being convinced that those questions seldom solved my problem.
...
0
votes
0answers
22 views
Python string comparison whilst in loop
I am both new to this forum & programming & Python. I am trying to develop my first program, however I keep coming up against a brick wall regarding one particular issue. I am hopng that some ...
0
votes
0answers
3 views
missing files in flask installation
I've been trying for a long while to install Flask.
Each time I run into the same error where I get the following warnings of no previously-included files. I'm not sure how to bypass this, because ...
1
vote
3answers
14 views
Boolean expression in Python or a string? Always returns 'True'
I'm trying to build a Boolean expression, based on (unpredictable) user input. I find that I'm building a string that looks proper, but doesn't work. I've looked at python.org, Google and ...
0
votes
0answers
8 views
How to read functions from a file? [for factor graph in Bayesian networks]
I am trying to implement a factor graph. I would like to read the factor functions from a sperate file. Unfortunately when I read a function from a file just for test I get the error:
...
0
votes
4answers
20 views
Open text files with different names-Python
I have a python code which opens a text file read and do some processes. The input text file has to be updated each day with a new one. Currently I use following code to open the file.
f = ...
0
votes
1answer
9 views
several concurent URL calls
How can I make, say N url calls in parallel, and process the responses as they come back?
I want to ready the responses and print them to the screen, maybe after some manipulations.
I don't care ...
0
votes
0answers
13 views
python etree elementpath syntax
I've some bigs problems for editing odt file in python. I've choosen etree way, but understanding the elementpath syntax is quite hard.
I've saw somewhere that text in nodes ARE nodes too in xml with ...
0
votes
0answers
6 views
Nested url mapping at webapp2 (GAE)
In GAE there is a quite simple way to fold branched uri path with PathPrefixRoute, but what if I need something more complex, with more folding level and trailing slash?
Smart way is to use ...
0
votes
0answers
14 views
find out if a python script is running in idle or terminal/command prompt
is there a way to find out of the python script is running in the idle or terminal?
work cross-platform if possible, if needed, different way for each platform.
work with python2 and python3 if ...
0
votes
2answers
14 views
Django url dispatcher - wrong function
i am new to Django and i have some problem with Django URL dispatcher.
I have "prometfire" project and "homepage" app.
My goal is to connect this paths to their view functions:
127.0.0.1:8000 --> ...
1
vote
0answers
10 views
RPython: write generic native library / write CPython C module
I got the idea to use RPython to use my Python code to write a generic
native library.
I have looked roughly at the RPython translator code and it seems like
there are ways to export custom symbols.
...
0
votes
1answer
32 views
Finding indexes in python
I'm trying to find indexes in python when using tkinter and I keep getting this problem. I know that the line index starts from 1 and the column index starts from 0 but when I try to find the index ...
-1
votes
2answers
47 views
Python giving an “IndentationError” for no apparent reason
I have this short code snippet, which doesn't work, and keeps on giving me this error:
I don't really find anything wrong in my code... I've checked, and there's no non-valid ASCII characters which ...