Questions tagged as 'python'

1
answer

Manipulate dictionaries within other dictionaries

Alunos = { 111: { 'nome' : 'Joao', 'curso' : 'ADS' }, 222: { 'nome' : 'Pedro', 'curso' : 'SI' }, 333: { 'nome' : 'Maria', 'curso' : 'SI' } } I need to make a script...
asked by 18.05.2018 / 02:27
1
answer

NameError: name 'Y' is not defined [closed]

So, I'm trying to make a very simple calculator, (one of my first "projects"). In this calculator you must choose an operation. Since each operation has an associated number, and I use if and elif to make the choice of operation. However when ch...
asked by 29.06.2018 / 00:34
1
answer

How to use quotation marks inside quotation marks and exchange word from within argument?

Running the os.system("reg add "caminho\caminho\caminho\caminho\"") And if there is more, how can I choose a word in the middle of this command and replace with another one?     
asked by 29.06.2018 / 19:46
1
answer

Telnet server in python that changes the title of the PuTTY window

Does anyone have any Telnet server scripts that change the title of the PuTTY window from who they connect to?     
asked by 20.08.2018 / 21:19
1
answer

Does the "sudo" command work in Debian?

I tried to run sudo in python and it returned me "bash: sudo: command not found", what's the problem? I'm trying to use matplotlib and I'm not getting it, so I tried installing it, running: sudo apt-get build-dep python-matplotlib...
asked by 18.04.2018 / 09:16
1
answer

Catch only the value and format in 2 decimal places [closed]

Well, I have a python script that queries two different bases for checking values per day, one in SQLSERVER and one in Postgres. I used an if to tell if the values were different and if so, to warn. What happens and what was alarming even...
asked by 07.11.2018 / 19:44
1
answer

Divide elements of a list by a number

Hello I'm an astrophysicist and I need to know how to "normalize" an astropy function: blackbody_lambda(wavelenght, temperatureG) For this specific value: 1279894.374188775erg / (Angstrom cm2 s sr) . I use python....
asked by 22.01.2018 / 16:45
2
answers

Read files and automatically put in the desired line;

I have several files in a folder: 01.PNG, 02.PNG, 05.PNG, some of the files do not have (04.PNG, 03.PNG). What would be the easiest way to write a text document where each filename would be written to the same line number: So: 01.PNG 02....
asked by 22.01.2018 / 13:59
1
answer

Identifying members of the same family [closed]

I would like to know what I can use in machine learning or another type of tool for the following problem: I have a list of full names and I would like to identify among them the relatives by the similarity of the surname. What can I use?     
asked by 19.11.2017 / 20:46
1
answer

Why does PyCharm not recognize modules and classes created by the user?

Hello, I'm new to python and I recently started working with the PyCharm IDE Community version. About IDE, I really liked one of the best IDE's I've ever used. However one problem I have identified in it is that it does not recognize the modules...
asked by 11.12.2017 / 12:03