Sh1Fu / Netlab

A simple python script for working with Netlab API
2 stars 0 forks source link

Send creds to App stdin class #8

Closed Sh1Fu closed 1 year ago

Sh1Fu commented 2 years ago

Current problem in this function(crontab_task.py):

def run_netlab(self, username: str, password: str, mode: str) -> None:
        process = subprocess.Popen(["python3", "main.py"])
        sleep(20)
        process.communicate(input=("%s\n%s\n" % (username, password)).encode())
        for count in range(int(mode) - 1):
            keyboard.send("page down")
        keyboard.send("enter")

You need to understand why sending data to stdin by the App class is not triggered

Fix this in feature/crontab_task branch and pull request it later

Sh1Fu commented 2 years ago

https://github.com/CITGuru/PyInquirer/tree/master/tests

Files: