Python Forum
Subprocesses not opening File Select Dialog
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Subprocesses not opening File Select Dialog
#1
Hello ,
I am trying to run a command which should open up a File Select Windows widget in Kivy. Kivy has the non-native FileChooser class which is not user friendly in my perspective. My plan is to use a subprocess call to run a powershell script which would open a File Select Dialog.

class UserInfoWidget(BoxLayout):
    def browse_file(self):
        p = subprocess.Popen(["powershell.exe",
                              '"' + os.path.join(os.getcwd(), "filebrowser.ps1")+'"'],
                             stdout=sys.stdout)
        p.communicate()
Clicking the button once the kivy gui is launched gives the default statements in the shell and then when button is clicked gives
C:\Users\Dell\OneDrive\Desktop\New folder\filebrowser.ps1 in the shell.Why is the File Dialog not opening?
It is opening when I run powershell.exe ./filebrowser.ps1 in windows powershell or command prompt.
Img1- https://ibb.co/1G5SKMF
Img2 - https://ibb.co/bR44JqK
Reply


Messages In This Thread
Subprocesses not opening File Select Dialog - by teut - Feb-22-2021, 05:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Hard disk structure like a file selection dialog malonn 2 802 Aug-09-2023, 09:14 PM
Last Post: malonn
  select files such as text file RolanRoll 2 1,179 Jun-25-2022, 08:07 PM
Last Post: RolanRoll
  [S0LVED] [Tkinter] Center dialog? Winfried 8 4,227 Mar-01-2022, 07:17 PM
Last Post: Winfried
  Facing Problem while opening a file through command prompt vlearner 4 1,922 Jan-30-2022, 08:10 AM
Last Post: snippsat
  how to view all installed software in a dialog Tyrel 6 2,148 Oct-09-2021, 08:11 PM
Last Post: Tyrel
  Set Text in Open Dialog Box giddyhead 0 1,681 May-21-2021, 06:31 PM
Last Post: giddyhead
  Terminating Subprocesses and Threads while they're calculating lvlanson 4 2,548 Oct-17-2020, 12:33 PM
Last Post: lvlanson
  Opening file and outputting its text content example leodavinci1990 1 1,891 Oct-12-2020, 05:33 AM
Last Post: buran
  File Opening Hitso 10 5,296 Jun-05-2020, 10:35 AM
Last Post: DeaD_EyE
  Test a file for a string without opening it? tester_V 2 2,151 Jun-03-2020, 06:40 PM
Last Post: tester_V

Forum Jump:

User Panel Messages

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