Posts by Franklin Timóteo • 158 points
11 posts
-
1
votes2
answers182
viewsA: Finding strings in a log and other patterns
... file=open(l,"r") for line in file.readline(): if 'connected' in line or 'disconnected' in line: #capture line #filtre para obter o usuário, data e hora print…
-
1
votes2
answers690
viewsA: Submit form in python
import requests account = {'login': '[email protected]', 'senha': 'muze123'} abs_domain = 'https://www.loskatchorros.com.br/' #1 form = 'ucp/global/verifica_login.php' #2 absolute_form_URL =…
-
0
votes1
answer213
viewsA: Cache Session in Python
Why you do not store in the class itself, so you will be able to use an attribute that can be seen between all instances of the same class. class WSMesa(tornado.websocket.WebSocketHandler): var1 =…
-
4
votes1
answer137
viewsA: Scamming shorteners with python
import urllib2 r = urllib2.urlopen(url="https://shorturl.com") print 'URL redirecionada:', r.url
-
0
votes1
answer33
viewsQ: Get variable declared in function outside of developer
I tried with the module inspect but I couldn’t get the result. The concept is: "scan" a file through a decorator. Stages Capture variable file before function read_file be called "Scan" filing…
-
0
votes1
answer3482
viewsA: Send POST form with python
#Instale a biblioteca requests pip3 install requests urllib3 --upgrade import requests payload = {'username': 'meuusername123', 'password': 'senha1234'} #1 resposta =…
-
0
votes1
answer350
viewsA: script search - python
The code below, #1 captures the output of the command as you suggested. We then use the #2 function of the module os to separate the base name of the absolute path. That is nothing more than passing…
-
0
votes1
answer159
viewsA: error running kivy designer, No module named 'designer'?
You need to install the designer kivy by following a few steps in the official documentation. Follow the URL: Link installation kivy designer…
-
0
votes1
answer46
viewsA: Telnetlib does not properly close the socket
Can you do a packet analysis? Try using tcpdump or wireshark to do an analysis of the point that happens and then is being rejected. It seems that your Script is sending a package and it is…
pythonanswered Franklin Timóteo 158 -
0
votes1
answer333
viewsA: Replace function does not work for all cases
There will be a reference for you. You will certainly be able to implement to save the file. import re import os from os import path def search_files(prefix:'Uso: /home/user'): if not…
python-3.xanswered Franklin Timóteo 158 -
1
votes1
answer809
viewsA: Run python kivy file
You must be wanting to run the files through functions regardless of the classes it is not? import kivy import main_Aluno, main_Professor, main_Curso from kivy.uix.boxlayout import BoxLayout from…