Python Open Web Browser4/19/2021
I have searched the web and still not able to find a solution.Another way of doing this might be to start the browser window in a separate program (progA) then use another program to kill the program (progA) but this is very crude, and how do I do this I am very new to python.
To do this I create a new profile for filefox (which I called foo). If you only need to display an html page and then close the window, you could also use wxpython instead of your web browser, see data-template this code snippet. Traceback (most recent call last): File popen.py, line 7, in browse( data-template, 3) File popen.py, line 6, in browse child.terminate() AttributeError: Popen object has no attribute terminate. The a new tab has successfully open but still not able to close. I have followed your instruction and has created a separate firefox profile, but the window stay even after the program completed (I have tried start with no other firefox and with a default firefox open, but both tries share the same result). Anyway, following are the output of the program and see if there is anything I did wrongly. I have also do a ps -ef and see that the new profile (and also the default profile) firefox ppid is 1, is this OK. This will close any running instance of firefox:) Not sure about linux. The problem is that the call to Popen with the argument shellTrue creates 2 processes, a binsh process and a.firefox process. The call to terminate() only kills the sh process. By the way, I dont think its very useful to run python with the -v option. I am new to Python and does not know other ways to provide useful information for troubleshooting. Submitting a web form with Python (using mechanize or clientform). Python Open Web Browser Software Development CommunityReach out to all the awesome people in our software development community by starting your own topic. We equally welcome both specific questions as well as open-ended discussions. Solved questions live forever in our knowledge base where they go on to help others facing the same issues for years to come. Are you sure you have something valuable to add that has not already been mentioned. Otherwise, please be thoughtful, detailed and courteous, and adhere to our posting rules.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |