Doubt about Python Apis

Asked

Viewed 106 times

0

Good morning!

I need to make a program that simulates the operation of a "user", these operations are taken based on various circumstances, would have to send code via Linux Terminal and cmd Windows and also observe fields of a assisted system that show alarms (these alarms are shown in the form of images/gifs), I would like to know which Apis currently exist to do such tasks.

Obs.: get this information on account of the assisted system, and many cases when I try to access the memory of it it ends up "bugging" and closing.

The purpose 'and I can develop a software that helps network administrators to stay less time and receive certain information more quickly and securely.

Note: Linux/Windows question, due to the fact that my software has to take information from 2 different operating systems and feed a database.

  • Your question seems quite comprehensive. It would be better to detail more on what you need by giving examples of the input you will get and the output you expect. Putting the code you have already tried to implement also helps to understand the problem.

1 answer

1


Man, Python would be a good, because it works on Windows and Linux perfectly.
When you talk about (simulates the operation of a "user") I think about automation, which you can do using Lib:
Pywinauto (https://pywinauto.readthedocs.io/en/latest/)
With Pywinauto, you can monitor the desired application, take application values, automate tasks quickly and easily. You can even monitor the Windows Task Manager, so you can, for example: Know which program is consuming the most RAM and close it. Pretty cool, right?

Can be done with Python2 as well, using Lib:
Pyautogui(https://pyautogui.readthedocs.io/en/latest/)
But this lib is very limited. I do not recommend.

These Libs are if automation with Python, I’ve worked with both and they work well.
To display alerts we can use Lib (Win32), very simple example:

import win32api

win32api.MessageBox(0, 'hello', 'title')

To display on linux you can use lib (simple-monitor-Alert).
I guess I took away your doubts, anything you ask then I answer.
=D

  • Was this really what I needed, helped a lot, could you just ask me one last question? &#xA;&#xA;Quando eu uso:&#xA;pyautogui.getWindows()&#xA;&#xA;ele da a seguinte mensagem de erro:&#xA;Traceback (most recent call last):&#xA; File "/home/link/PycharmProjects/Golem_Bot/venv/include/home.py", line 6, in <module>&#xA; lista = list(pyautogui.getWindows()) Attributeerror: module 'pyautogui' has no attribute 'getWindows' knows how to solve or how I can validate the screen to use the Pis you recommended me?

  • Of course. Speak there.

  • I edited the comment to above...

  • Dude, this Exception could be happening for n reasons, hard to know so with little information, I don’t know which version of pyautogui you’re using, if you have a setup.py, what’s inside it, what dependencies? Which version of PIP? Are you using a virtual environment? The best thing for you is to ask another question by passing on all the details. Do not forget to give feedback. = D

Browser other questions tagged

You are not signed in. Login or sign up in order to post.