Python Forum
Launch soft on Terminal in silent mode
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Launch soft on Terminal in silent mode
#1
Ok, Hi everyone,

I explain to you,

I make a little program for automatize tasks as downlaod, install and start software, a kind og all in one.

Some softwares must be launch in the terminal, as Audacity for example, it is no a problem but i would like to know if it's possible to start Audacity in silent mode, run the terminal in background.

I can start Audacity directly in my program but that's not what I want, while the software runs, i can't use my program, that's the reason that i launch it in an other terminal.

Here is a part of code :

if tool_choice == "01":
    if path.isfile('/usr/bin/audacity'):
        print("\n\033[1;34m AUDACITY\033[1;m start >> \033[1;36mLoading\033[1;m...")
        sleep(1)
        Popen(['xterm', 'audacity'])
    else:
        print("\n\033[1;34m AUDACITY\033[1;m is not installed on your system...")
        audacity_inst = input(" Do you want to install it (y/n) ? ").lower()
        if audacity_inst == "y":
            print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;35mIn progress...\033[1;m\n")
            system('sudo apt install audacity -y && sudo apt update')
            sleep(1)
            print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;32mDone !\033[1;m")
            sleep(2)
        elif audacity_inst == "n":
            print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;31mCancelled...\033[1;m\n")
            sleep(2)
        else:
            print("\n\033[1;31m ERROR !! Wrong choice.. Please, retry...\033[1;m")
            sleep(2)
My request concerns specifictly the part : "Popen(['xterm', 'audacity'])", I think this is here that's the code must be modfiy. I tried several options but nothing worked

Thanks for your help and happy New Year :D

(Dec-26-2019, 07:41 AM)DKRoots Wrote: Ok, Hi everyone, I explain to you, I make a little program for automatize tasks as downlaod, install and start software, a kind of all in one. Some softwares must be launch in the terminal, as Audacity for example, it is not a problem but I would like to know if it's possible to start Audacity in silent mode, run the terminal in background. I can start Audacity directly in my program but that's not what I want, while the software runs, i can't use my program, that's the reason that I launch it in an other terminal. Here is a part of code :
 if tool_choice == "01": if path.isfile('/usr/bin/audacity'): print("\n\033[1;34m AUDACITY\033[1;m start >> \033[1;36mLoading\033[1;m...") sleep(1) Popen(['xterm', 'audacity']) else: print("\n\033[1;34m AUDACITY\033[1;m is not installed on your system...") audacity_inst = input(" Do you want to install it (y/n) ? ").lower() if audacity_inst == "y": print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;35mIn progress...\033[1;m\n") system('sudo apt install audacity -y && sudo apt update') sleep(1) print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;32mDone !\033[1;m") sleep(2) elif audacity_inst == "n": print("\n\033[1;34m AUDACITY\033[1;m installation >> \033[1;31mCancelled...\033[1;m\n") sleep(2) else: print("\n\033[1;31m ERROR !! Wrong choice.. Please, retry...\033[1;m") sleep(2) 
My request concerns specifictly the part : "Popen(['xterm', 'audacity'])", I think this is here that's the code must be modfiy. I tried several options but nothing worked Thanks for your help and happy New Year :D
Reply
#2
Sorry for the quote, wrong manipulation and I don't know how to delete it :(
Reply
#3
python test.py &

Will run the file in the background.
spotify apk
Reply
#4
Thanks !

I will try it as soon as possible :)
Reply
#5
(Jan-01-2020, 02:00 PM)Spotify_220 Wrote: python test.py &

Will run the file in the background.
spotify apk

You are right

terraria apk
geometry dash apk
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020