Questions tagged as 'python'

1
answer

How to move between directories in python 3 with the linux operating system?

I try to move directory in python 3 but it gives an error: import os os.system("cd /") I tried this one but it does not work either: import os os.chdir("cd /") In this case, I use the operating system parrot os 4.2.2....
asked by 13.11.2018 / 01:41
1
answer

How do I install colorama? Python

I want to use colorma, as I already install it with:     sudo pip install colorama But when I try to import it in python it appears: And in the terminal it appears that I already installed it: What is happening? Thanks     
asked by 13.11.2018 / 03:58
0
answers

Put restrictions on typing a float variable, a string variable, and leaving blanks of the following interface in Python

good morning. I am developing a program in Python that I enter the number of students according to their performance in the notes and generate a statistical graph, and would like to know how to put restrictions with graphical interfaces that...
asked by 12.11.2018 / 03:03
1
answer

Change background color of a cell in TreeView

Can you change the background color of a particular cell in a treeview according to the information it contains? In plan if it contains a 0 the background is green, if it contains a 1 the background is orange and if it contains a 2 the backgroun...
asked by 12.11.2018 / 12:53
0
answers

how to make requests from ajax to python and sqlite

Hi friends, I have a question which I do not know what to use, I'm new to web programming and I know enough to create a web page, what happens is that I want to make an App and using a compiler of code like cordova which allows me to create an A...
asked by 12.11.2018 / 18:55
0
answers

How to run a script.py as a daemon (in the background) with python?

I have the following python3 script as a basic example: if __name__=="__main__": temperatura = 71 #"función que lee la temperatura del procesador" print("Leyendo temperatura del procesador") if temperatura >= 70 #grados centigr...
asked by 18.11.2018 / 23:34
0
answers

How to make the file finish receiving? Python Sockets

Good morning everyone, I am new to the world of Python ; I am developing an application with Sockets . It turns out that the code is developed for the version of Python 3 ; On the server side I have the problem that when I star...
asked by 12.11.2018 / 19:30
0
answers

how do I parse data from an html in real time?

I'm trying to read data from a local html file. A script causes one of the tags of this html to increase in value. My intention is to obtain this value. I am parsing the html file with the BeautifulSoup library but it always reads the initial ht...
asked by 18.11.2018 / 20:19
0
answers

Error QAbstractTableModel (parent: QObject = None): argument 1 has unexpected type 'list'

I'm learning Python. I work in Win8.1 with Python 3.7. I must create a qtableview to show 9 columns of read-only data. Send as a parameter a list like the following: xlista = ['ars 1', 'Ars-s 2', 'Bry 2', 'CALC 3', 'cean 1', 'coll 1', 'cup...
asked by 18.11.2018 / 18:58
0
answers

I want to make a string a JSON

# Import(s) import json def saveLearned(newKnowledge): reply = "hola" mind = "'" + "{" + '"' + newKnowledge + '"' + " : " + '"' + reply + '"' + "}" + "'" json = mind print(json) load = json.load(json) print(load) du...
asked by 18.11.2018 / 19:13