Questions tagged as 'python'

1
answer

Read XML through Python

I need to get data in an XML file from another domain, initially I did a js, I had to abort. I thought about reading the files through .py within my Django project In test character I tried something else one less like this: tree = ET.Eleme...
asked by 09.11.2017 / 22:14
1
answer

Go through the Python dictionary from the end

I wonder if there is a way to go through the keys of a dictionary backwards? For example, in a dictionary d1 ={1: [], 2: [], 3: [], ..} start with key 3. I know that it is possible to go from the beginning with for , but I must star...
asked by 21.09.2017 / 03:43
1
answer

How to get the data of a specific page on the web?

I want to create a script that gets data like bugs, issues and others from the following page Spring Framework , unfortunately I do not have any code to display because I do not really have a clue how to get this data. The question is: How t...
asked by 17.09.2017 / 22:47
2
answers

Delete a particular row from a .csv using Python

What I would like to do is that when the user types the name of a person who was inside the .csv file, his line and the lines of movies that he evaluated were deleted (I used an identifier for that), the code is this: import csv with open("ar...
asked by 09.08.2017 / 23:29
2
answers

How to receive more than one user command at one time?

For example: nasc= input('INFORME SUA DATA DE NASCIMENTO: ') RESPOSTA= 15112002 How to separate this into DAY / MONTH / YEAR?     
asked by 15.10.2017 / 18:07
1
answer

NameError: name 'setSaldo' is not defined

I'm learning POO in python and am having a problem. When I try to use the getters and setters I can not. #Método Construtor def __init__(self): self.saldo = 0 self.status = False #Métodos Especiais def getSaldo(self): return self....
asked by 16.10.2017 / 02:54
1
answer

I'm trying to test a game but every time I try to run it appears "invalid syntax"

import pygame def main(): #variaveix pygame.init() tela = pygame.display.set_mode([300, 300]) pygame.display.set_caption('THE GAME') relogio = pygame.time.Clock() branco = (255,255,255) azul = (0,255,255) verde =...
asked by 14.10.2017 / 05:15
1
answer

Problem when using the function .join ()

What's the problem with my code, I used the .split () function to separate the string when it finds'; ', after separating I wanted to join to come back putting spaces so I used the .join (), however I did not see effects see: #Irá separar cada...
asked by 03.08.2017 / 06:26
1
answer

Reading an XML file and printing specific fields using the Python language

I have the following XML file (actually it's just a piece of the file): <!DOCTYPE sysstat PUBLIC "DTD v2.19 sysstat //EN" "http://pagesperso-orange.fr/sebastien.godard/sysstat-2.19.dtd"> <sysstat> <sy...
asked by 02.08.2017 / 02:01
1
answer

Communication between two programs in PYTHON

Well, I'm developing two programs that have to communicate with each other, I tried the way to import the other program, but when I run the two they behave like a single code, and that's not what I want. It is necessary that they remain as disti...
asked by 26.10.2017 / 01:22