Questions tagged as 'python-3.x'

2
answers

I can not delete key in dbm

I made a basic program to store some data and I am in trouble if the user chooses to delete some stored dictionary key. The function that deletes the data in my program is this: def EraseData(name): ''' Apaga uma chave do dicionário do banco d...
asked by 07.07.2015 / 20:43
1
answer

Error with the asyncio module

I'm trying to run the example below on IDLE (Python 3.43, Windows 7, 64bit) for days, but it always gives an error. I tried searching for the solution on the English version website, on google, and I did not find an answer. I can run on Anaconda...
asked by 06.07.2015 / 22:47
2
answers

Problems with JavaScript, urllib and BeautifulSoup

The idea of my code is to get the link of the video and run it directly into VLC, but I came up with a problem: apparently urllib does not execute the JavaScript code, player is placed on the page using JavaScript. See my code below:...
asked by 08.03.2015 / 03:09
1
answer

What does this mean "people [last, first]" in Python?

This is the first time I see this people[last, first] syntax with the comma separating the indexes in Python. I do not even know what data structure is people . The question is    What does this statement do: for last, firs...
asked by 22.11.2014 / 22:59
1
answer

Regular expression that checks for the presence of a repeating pattern

How do I make a regular expression saying that this has to repeat exactly a tot of times? For example, I would like to check if a line from a file contains this pattern |1_CHAR exactly 8 times. By now, it is possible for example to say th...
asked by 17.11.2014 / 15:58
1
answer

Searching for a field contained in several models

I have a manager in my project, which is to do TAGS, and on the front of my system the user will search for a tag, and it will return everything related to that tag. Follow the models.py: from django.db import models from django.utils impor...
asked by 20.11.2018 / 19:05
1
answer

Time out with unexpected result

I'm running a code that sets the hours in the terminal but when I use the code below it brings me a totally wrong value at the time: Code: from time import gmtime, strftime print(strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime())) Here is...
asked by 20.09.2018 / 22:42
1
answer

File comparison program in python

I have a question and a great difficulty creating a program that reads 2 files, example doc1.txt and doc2.txt , inside the files it has the following data: doc1.txt doc2.txt 1 1 1 2 2 5 3...
asked by 04.07.2018 / 03:26
1
answer

How to make this class usable?

In the code below, I would like to return an instance of the class itself with the data filled in through a text file. The lines are stored this way in the file:    Yug Sekwaf, 13-04-1570,2-34,3: 21,2,34,2.45,3.01,2: 01,2: 01,3: 10,2-22 T...
asked by 13.11.2018 / 01:54
1
answer

Submit POST form with python

I'm developing an API in my work, and I need to develop something in python2 that sends a form to the server through POST, I saw some questions here in the forum and I could not find anything that worked ... I need the community to help me !...
asked by 16.12.2017 / 01:49