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

  • SEARCH
  • Home
  • 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 6141639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:16:42+00:00 2026-05-23T18:16:42+00:00

I have swf’s which need to sync on a server which I have no

  • 0

I have swf’s which need to sync on a server which I have no access to. I can’t know when this has happened by something on the server(there is a cron job which is supposed to run every 15 minutes, but it works… intermittently), so pretty much my only real option seems guess and check (wait 15 minutes… has it updated? Wait fifteen minutes…). A further annoyance is that sometimes it takes 5 minutes to see whether the version has updated or there is an older version. All told, this wastes a couple of hours a week, if not more.

I’m looking for a way for Python to let me know that the local file and the file on the server are the same file.

My (completely untested) plan:

def ensureSynced(url,localfile,finaldest = None):
    urllib.request.urlretrieve(url,<download-file>)
    downloaded = '\n'.join(file(<download-file>).readlines())
    local      = '\n'.join(file(localfile).readlines())
    if finaldest is None: finaldest  = url
    if downloaded == local: # I believe this will work?
        webbrowser.open(finaldest)
    else
        time.sleep(90)
        ensureSynced(url,localfile,finaldest)

But, I can’t help but thinking that there must be a better way.

THE REAL QUESTION

Is there a way to have Python easily check whether a resource on a remote server is the same as the local resource if there is no FTP availability? OR Is there a better way to accomplish the above code?

Side Note

No, I don’t have the authority to fix it. I am trying to get it so that the server simply outputs “sync-time” somewhere in the HTML — even in a comment — but my pleas have largely fallen on “it isn’t a priority” ears.

  • 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-23T18:16:42+00:00Added an answer on May 23, 2026 at 6:16 pm

    I would suggest checking whether the target server supports HEAD requests and whether the etag header and last modified header are set.

    If this is the case, you could do (even every x seconds) a head request and compare the etag with an md5sum of a local file and if the last modified time is correct than you can see what time the file was synced.

    For sending a HEAD request, see for example How do you send a HEAD HTTP request in Python 2?

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

Sidebar

Related Questions

I have a swf file sample.swf which has its actionscript class in Main.as. This
I have a swf which, for some reason, has four RemoteObjects pointing to the
I have some swf files (games) which I play using Swiff player... Is there
I have a SWF file that connects to a remote flash server and receives
i have an swf file, uploaded in server. But whenever I make changes to
I have a swf that loads images from my server and resizes them to
I have this swf (flash) file that provides the json that needs to be
I have a .swf file, which I have to display as a ticker, but
I have a swf loaded into another swf , is there a way to
i have a SWF file with a simple function that returns a string. can

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.