Questions tagged as 'python-3.x'

1
answer

DjandoRestFramework standardize endpoints for methods with different permissions

I'm using Django 1.10 with the DRF lib. I created an endpoint / api / contact / and in this endpoint I apply 2 methods (GET and POST), GET can only be viewed with permission, and POST can be requested without permission. The problem is in the...
asked by 20.01.2017 / 15:23
1
answer

makemigrations command in Django (1.9) does not recognize Blank = True in a boolean field

I have the following template: class Site(models.Model): """ Model for a site entry @author: Leonardo Pessoa @since: 05/09/2016 """ from decimal import Decimal consolidated_financials = models.BooleanField(bla...
asked by 28.10.2016 / 09:59
1
answer

Break lines with regex

I'm having a problem separating lines from multiple txt files. These files have a specific pattern but there are files that do not respect it. Here are some of the 5000 files I'm trying to read: SAMPLE TYPE / MEDICAL SPECIALTY:Dentistry...
asked by 15.11.2016 / 00:42
1
answer

GUI python: request for interface tips and or ide's for this

I'm redoing a small project I had done in Java, but now in Python. I'm learning everything from scratch and alone. I need help with this part. Which interface do you recommend? Are there any IDEs that work in design mode and things like that?...
asked by 28.09.2016 / 04:04
1
answer

Python tkinter: Window works perfectly, but does not close after executing a function

code: def editar (self, event=None): ob = self.buffer(opcao=2) if (ob[1] == None): return elif (ob[0] == None): return root = Tk() root.withdraw() for o in self.lista: if (ob[0].codigo.upper()...
asked by 13.10.2016 / 18:59
1
answer

Creating an ARPING

#!/usr/bin/python3 #Fazer arping de conexao import sys from datetime import datetime from scapy.all import * try: interface = input ("\n[*] Set interface: ") ips = input("[*] Set IP RANGE or Network: ") except KeyboardInterrupt: pri...
asked by 13.08.2016 / 00:59
1
answer

PySide installation

I'm trying to install PySide in python 3.5 (32-bit), I installed the pip without any problems, but I'm not able to install easy_install . > ButwhenIrunthe'importeasy_install'commandinthepythonconsole,thereisnoerrorformeandwhenIrunthe'importP...
asked by 15.08.2016 / 05:28
1
answer

Character Alignment

I would like someone to tell me how I can get the numbers to align this way with the words from the top index, I'm doing a replica of this example for a college job, but I can not get numbers to align without ever expanding to off the scre...
asked by 02.04.2016 / 06:48
1
answer

Recursion in Python

I'm trying to do a recursive function in Python that is not assigning me the correct results and when I try to change it it always happens stack overflow. My code is this: def sublistas(lista): i=0 if not isinstance(lista,list): return 0 e...
asked by 06.01.2016 / 23:16
1
answer

Function code works in IDLE, but the program hangs

I'm a beginner, free time training about two months ago and so far my programs had 5 lines, very simple. This program taught me a lot of new concepts, and it's part of a larger program that I plan to do. def dicionario(palavra): f = open("...
asked by 14.07.2015 / 14:50