Questions tagged as 'python-2.7'

1
answer

Django does not create admin.py file in new app

I'm following some video lessons about Django to make some changes in a project started some time by someone else. However, starting a new app in this project with the django-admin start app mad files are created: __init__.py ,...
asked by 08.02.2017 / 03:00
2
answers

Relate index lists in python

Good afternoon! I have the list: a=[4,3, 1, 2, 3] and the list: sub_ind_novo=[96, 7, 97, 23, 18] And I needed to list the lists getting the result: no97. G1 #When the% is 97 , the match in a is 1 , so just print 1 instead I need...
asked by 28.05.2016 / 19:18
1
answer

I need to know the size of a file even before it is created

I have a college job and it's hard to solve ... it's kind of the wordlists that hackers use, but it's for teaching. QT: Generate a file with all possible groupings using the concept of simple arrangements in which we have n elements arranged p...
asked by 17.04.2016 / 20:31
3
answers

Multidimensional Array

I'm trying to create a multidimensional array. First I wanted to put all the first elements with value 2 so I did: l=4 x=6 TSup=[ [ 2 for i in range(l) ] for j in range(x) ] print TSup And I got what I expected: [[2, 2, 2, 2], [2, 2, 2, 2...
asked by 20.03.2016 / 13:57
1
answer

How to extract data from plain non-standard texts?

I would like to extract fields to a database from text files. However, the fields are positioned differently in each text and it is difficult to obtain the values by common methods, for example: file 1: PROVA: 2º Corta Mato LOCAL: Pin...
asked by 09.12.2015 / 15:22
1
answer

Display the value of a counter in a table

Live, The goal is to simulate the iteration between the system and the user, and for this I have to know how many repetitions have been made in each test scenario. I leave my code below, Defines the Control Layout countHF = 0 countRT...
asked by 02.11.2015 / 13:04
3
answers

How to install scipy libraries in python?

I tried to install using the WinPython program, but when importing the library an error occurred: "> > from scipy.optimize import curve_fit Traceback (most recent call last):   File "", line 1, in     from scipy.optimize import curve...
asked by 21.07.2015 / 17:07
1
answer

"Interpret 8-bit bytestrings" error in SQLAlchemy

I'm starting with SQLAlchemy and I came across this error:  sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use 8-bit bytes trings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str)....
asked by 26.05.2014 / 21:24
0
answers

How to merge two automata?

I want to create an automaton supervisor. I was able to create the class of automata. However, when I am facing the case of fusion with automata, I do not know how to deal with it. For example, with the following automata: ThedataI'musingisd...
asked by 19.12.2018 / 18:11
0
answers

How to configure an application in kinghost - Django [pending]

I'm trying to upload a site to the kinghost provider, the site was not developed by me and was done in python 2.7, however after putting the backup content in the folder that appears in the tutorial of the kinghost site, it seems that I have to...
asked by 26.11.2018 / 02:33