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 5844591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:18:53+00:00 2026-05-22T12:18:53+00:00

Is where a way to persist objects over re-execs of a running script? If

  • 0

Is where a way to persist objects over re-execs of a running script? If I want a running script to re execute itself to pick up any code changes, (os.exec*) is there a way to persist the objects for access after the re-execution? I could set environment variables with pickled ascii data, or write that data to a pipe and re-read it after the re-execution, but that seems inelegant or like a hack. Even if doing that, not all items pickle well.

  • 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-22T12:18:53+00:00Added an answer on May 22, 2026 at 12:18 pm

    If you put your code in a module, you can use the reload() standard function to load the new version of the code. Your main module could look like this:

    import mymodule
    
    while mymodule.go():
        reload(mymodule)
    

    Whenever you want to reload your module code, return True from go(). When you want to exit, return False.

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

Sidebar

Related Questions

I haven't really done a two way binding project before, so this might be
Is there a way (meta property maybe) to tell db4o to simply ignore a
I've been slowly teaching myself the fundamentals of interface driven programming and I'm struggling
I'm trying to write a favorites system for my app. I've already converted my
I am using annoted Hibernate, and I'm wondering whether the following is possible. I
I am using Glassfish v3 server. Usually the DB connection with EJB3 + JPA
I would like to have a JPA Entity that has a GSon Object as
We have an implementation for an Ultrasound machine application current where the Ultrasound object
I have had a customer contact me about a bug in my application which
I'm attempting to programmatically chain asynchronous operations in C#4, such as Writes to a

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.