Questions tagged as 'python'

2
answers

Image upload using CGI Python - It does not work!

Hello, I created an html file with one and I want to select an image from a directory and after clicking on submit this image should be saved in another directory. Any help? This is what I've tried so far ... index.html <form name="py...
asked by 29.04.2016 / 21:46
1
answer

Through a tuple of 2 lists make a graph

I have 1 tuple with 2 ready lists like for example the following ones, in which the first contains dates in the format YYYYMMDD and the second contains the number of times a crime happened that day. tuplo= (['20160130', '20160230', '20160330',...
asked by 26.05.2016 / 16:34
1
answer

What is the difference between IDLE Python 3.5 Shell and Python 3.5 (CMD)?

I installed Python for Windows on my machine but I had a question: Both IDLE Python 3.5 (Shell) and Python 3.5 (CMD) were installed. Is there a difference between them? Do any of them have more features or something?     
asked by 04.04.2016 / 03:25
1
answer

How do you make a socket that actually connects to other computers?

I tried to make a socket in Python 3.5.1, but when I went to test it, it only connects with me. I tried connecting to another computer (from my friend), but it does not connect. Does anyone know how to make a socket that actually connects? If...
asked by 13.07.2016 / 02:06
2
answers

How to calculate the percentage of items made in a data tree in list format?

There is the following list: [ [0, False], [1, True], [1, False], [2, False], [2, True], [2, False], [3, False], [3, True], [2, False], [1, False], [2, False] ] This list forms the following tree:...
asked by 14.03.2016 / 15:35
1
answer

Unused import statement - Pycharm

When trying to import using Pycharm : from selenium.webdriver.common.alert import Alert It leaves the text in gray, and shows unused import statemnet . I tried to use the: # noinspection PyUnresolvedReferences But withou...
asked by 16.03.2016 / 18:28
1
answer

Obtaining numerical values of mathematical graphs with python

If you have a data file that allows you to plot a 2d graph (straight line, parabola, a conic), is it possible, starting from the graphic image to extract the numeric values that generated it? Is there a package or technique in python that allows...
asked by 17.02.2016 / 22:01
1
answer

Error with Django and Cloudinary - can not use the string pattern on a bytes-like object

I'm trying to make a simple app: I've done the Django Girls tutorial and now I'm trying to use it as well including an image using the < a href="http://cloudinary.com/"> Cloudinary But I'm having the following error: Theerroroccursatl...
asked by 03.02.2016 / 20:22
2
answers

Why does the following code print 'None' instead of the list?

The program must receive values in a quantity specified by the user. I need a list created with these values. Why this code does not work? quantidade = int(raw_input()) inicio = 0 lista1 = list() while inicio < quantidade: valor = int(r...
asked by 10.04.2016 / 01:53
1
answer

Is reading files in Python updated in real time?

I'm developing an application where I'll create a multithreading that will read a .json file and based on a key of this file ( status: 'pending' or status: 'completed' ) I'm going to perform an action or not. The idea is t...
asked by 10.02.2016 / 12:36