0
votes
0answers
10 views
Tornado set minmum and maximum values for get_argument
I am currently using Tornado RequestHandler.get_argument to get http POST and GET arguments.
The RequestHandler.get_argument lets you set default values. Is there a way in Tornado
Is there is a way to ...
0
votes
1answer
30 views
Printing List Vertically/Centered - Pascal's Triange
I'm pretty stumped on what seems to be a simple problem. Everything is computed and displayed correctly. I want it to print horizontally and centered. Also, a way to remove the brackets and commas ...
0
votes
0answers
7 views
Python Twisted self.transport not writing
I have created some small TCP server (start.py) using twisted. I import plugin loader (import PluginLoader) which loops through directory and then includes ( import(plugs/helloWorld.py, globals(), ...
1
vote
0answers
36 views
Changing the definition of an existing function
I want to print to a file using print I import from __future___. I have the following as an import:
from __future__ import print_function
From now on, I can print using:
print("stuff", ...
0
votes
0answers
7 views
The location of the Image function in drawing module openpyxl
I am writing a python program that should insert a picture in a excel sheet.
The program works good when run it from the python IDLE, but when I try to run my converted exe an error occurs : " ...
0
votes
2answers
51 views
Looping through huge ranges in python
How do I (efficiently) loop through huge ranges in Python? Whenever I try to run something like-
for x in range(105, 10000000000000):
#do stuff
it takes an eternity to complete. I've tried many ...
-1
votes
0answers
36 views
Hello, need help to begain understanding python [closed]
i just have started to learn python, and i didn't study any thing related to IT neither programming before, currently i am reading " Hello World"; friend of mine told me that this book is good to ...
0
votes
1answer
54 views
Can anyone help me end this piece of code?
Basically i have created a space invaders game and i have created pre game window, were the user can enter their username but it stays on that window. Dos anyhow know 1. how to store what is enters so ...
1
vote
2answers
19 views
ImportError when importing from a lower module
I'm trying to import an object named db (SQLAlchemy object) in in a module of my Flask Project in order to use the SQLAlchemy in my models (models.py). Assuming my package is named Foo and contains ...
0
votes
1answer
43 views
Collision in pygame
I'm trying to add collision into my game but have run into a problem.
The collision works fine horizontally without gravity, it stops where it should and all that, but when I add gravity it freaks ...
0
votes
0answers
39 views
IntegerField value gets converted to a string for some numbers
Having a Cloud Endpoints (ProtoRPC) message class with an integer field, e.g.
TestMsg(messages.Message):
int_field = messages.IntegerField(1)
and a method:
@endpoints.method(VoidMessage, ...
-4
votes
1answer
69 views
Generating a range of random numbers [closed]
I need to write a code that makes a list of 26 non repeating numbers in a random order 0 to 25 no odd commands like shuffle it needs to be begginer language even if the resulting code is longer and ...
0
votes
1answer
21 views
Pulling Image from website based off link
I currently have the code in place to pull all the image tags in an html document by using the BeautifulSoup library. I was wondering if there was a way in Python to programatically download the image ...
1
vote
1answer
33 views
Remove list entries from the beginning using lambda
I have breadcrumbs from a website and I want to remove all "Home" entries from the beginning with a lambda expression.
Something like:
lambda v: v[1:] if v and v[0] == 'Home' else v
But I want to ...
3
votes
1answer
32 views
unexpected output and return value with Cython
First, I'm using Cython 0.18 with Python 2.7.4. I'm experiencing a rather strange bug, and I'm not sure why. Here's the toy code:
from cpython cimport bool
cpdef unsigned int func(char *seq1, char ...