Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 937177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:26:06+00:00 2026-05-15T21:26:06+00:00

I would like to invoke my chrome or firefox browser when a file that

  • 0

I would like to invoke my chrome or firefox browser when a file that I specify is modified. How could I “watch” that file to do something when it gets modified?

Programmatically it seems the steps are.. basically set a never ending interval every second or so and cache the initial modification date, then compare the date every second, when it changes invoke X.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:26:06+00:00Added an answer on May 15, 2026 at 9:26 pm

    As noted, you can use pyinotify:

    E.g.:

    import webbrowser
    import pyinotify
    
    class ModHandler(pyinotify.ProcessEvent):
        # evt has useful properties, including pathname
        def process_IN_CLOSE_WRITE(self, evt):
                webbrowser.open(URL)
    
    handler = ModHandler()
    wm = pyinotify.WatchManager()
    notifier = pyinotify.Notifier(wm, handler)
    wdd = wm.add_watch(FILE, pyinotify.IN_CLOSE_WRITE)
    notifier.loop()
    

    This is more efficient than polling. The kernel tells you when it does the operation, without you having to constantly ask.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know how to Invoke bean method from jsp. something like.
I would like to test a string containing a path to a file for
I would like to use a language that I am familiar with - Java,
I would like to invoke XmlSerializer.Deserialize passing it an XDocument . It can take
I would like to invoke a webservice via Android. I need to POST some
I would like to invoke heavy duty method dowork on a separate thread and
I have a method which I would like to invoke asynchronously: void Foo() {
i have an ActiveX Object (Master) and would like to invoke functions dynamically on
For build automation, I would like to invoke the XML Data Binding Wizard in
I would like to invoke a simple method (no arguments, returns void) from within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.