Questions tagged as 'python'

0
answers

Python, bots, mechanize

I'm making a bot that is able to enter my router, go to a certain tab and click the reset button. The idea is simple, I simply intend to restart the router in an automated way, in python. For this I am using the Python Mechanize library. im...
asked by 25.05.2018 / 10:29
0
answers

Generate several txt files in python

I'm new to python. I have a main file in which there is information stored in columns. I am asked to empty every 5 lines of this file into a new file. That is to say; lines 3-8 in file1.txt, lines 9-13 in file2.txt and so on until the lines in t...
asked by 23.05.2018 / 19:04
0
answers

Error in date format in python

I have a function in python that is responsible for recognizing the date of a text file that reads, the date format to read is this for example: May 28 00:00 , I have changed the orders according to python but it gives me an error : Type...
asked by 29.05.2018 / 17:05
0
answers

Error with Python ODBC (pyodbc)

I have some databases to which I want to connect via pyodbc, if I enter the code: import pyodbc pyodbc.dataSources() I get the following: Out[28]: {'dBASE Files': 'Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)', 'Excel Files':...
asked by 20.06.2018 / 15:07
0
answers

Run Python script from PHP

I'm trying to run a Python script from PHP with the function shell_exec("python3.5 semanticAnalyzer.py textoA.txt textoB,txt"); but it turns out that my php script does not do anything, I have a similar one that works, in my python file I...
asked by 27.05.2018 / 02:33
1
answer

IndentationError: expected an indented block noob error [duplicate]

I'm starting in programming and I figure this error can help me identify it please. usuarios = {"Marta","David","Elvira","Juan","Marcos"} administradores = {"Juan","Marta"} print ("estos son los usuarios: ",usuarios,) print ("estos son los...
asked by 27.05.2018 / 02:45
0
answers

I do not work with the Horspool algorithm

I've been replicating the Horspool algorithm in Python that I found in a book. I have already made the ShifTable and the HorspoolMarching. The problem is that I can not find the match or the index, that is, it returns -1 and I do not know the...
asked by 27.05.2018 / 00:58
0
answers

How to insert image with Reportlab and variable extension text?

What I want is to generate a file in which on the first page is an image generated with matplotlib and then insert text of variable size, as I understand this method makes the number of pages adapt to the text, The code that I have is the...
asked by 23.05.2018 / 02:04
0
answers

Threads with python

I am trying to make updates to a database that is located in MongoDB. For the number of records I need to do it by threads so that this is much faster. In the code that I put down it does but I see that it repeats the values so it does not wo...
asked by 23.05.2018 / 15:48
0
answers

Can Squarify use two columns to graph?

I would like to know if having a dataframe with column A and B, where A is a quantity and B indicates a category assigned to that amount can be used as parameters in squarify to display its graph. One of the parameters of squarify is the scale o...
asked by 21.05.2018 / 03:22