•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 403,298 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,851 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 374 | Replies: 2 | Solved
![]() |
•
•
Join Date: May 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
I am quite the beginner at python (and programming altogether), but I'm attempting to learn (slowly but surely). Anyway, I am attempting to make a standalone python program that will interact with firefox (opening links, etc.). I've figured out how to open FF and open links. However, for the life of me, I cannot figure out how to close it again. I used
os.spawnl(os.P_NOWAIT, "c:\\program files\\mozilla firefox\\firefox.exe") to open FF. I then attempted to use win32api.TerminateProcess(396,0) to close it again, but I received the error: error: (5, 'TerminateProcess', 'Access is denied.') . I am guessing that FF is blocking my TerminateProcess command(?). MSPaint will start/shut down fine using this method, but the Any ideas to prevent FF from blocking my command or ideas about other methods to shut the program down? Thanks for any and all help! •
•
Join Date: Oct 2007
Posts: 41
Reputation:
Rep Power: 1
Solved Threads: 5
Is it possible to do a
?
python Syntax (Toggle Plain Text)
import os os.system('tskill firefox')
"And da wind cry moron." ~ Pearls Before Swine
![]() |
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
beta bon browser browsers browsing development echo email encryption eu europe firefox gecko html internet internet explorer internet explorer 7 javascript leak linux memory microsoft mozilla networking news open source open-source opera patch phishing programming python scams security social software super testing users web webmail
- Previous Thread: Special sort a list
- Next Thread: Web and Networking tutorials


Linear Mode