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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:09:00+00:00 2026-06-08T21:09:00+00:00

My messy solution: I am a beginning python programmer and because of my lack

  • 0

My messy solution:

I am a beginning python programmer and because of my lack of advanced knowledge, I often use primitive tools to finish my advanced projects. Currently I am trying to exchange data between programs at runtime. I have tried writing and reading text files. Each program has a separate write-only text file in order to avoid two programs writing to a file at the same time.

In order to collect all the data into a single file, I have written a separate program to read the write-only text files and consolidate all the data into a single file. All programs then have access to variables from all other programs in this one file.

My request for an easier solution:

Even though the above solution works well, I am trying to find a more elegant way to share variables among Python programs. Can you tell me if there is a better way to do this in Python?

Thank you so much.

  • 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-06-08T21:09:02+00:00Added an answer on June 8, 2026 at 9:09 pm

    Memcached is more or less designed for what you describe, since a variable is as volatile as memory.

    Redis is another good option, with some similarities to memcached, but the option to make the data persistent.

    All the other direct-sharing options I could think of fall directly into the category of database (whether SQL or not), except for using flat files, which is what you’re doing now.

    Finally, you could refactor the programs so that instead of sharing values directly, they provide services to one another whereby they can trade information when they need it. This may increase overhead and complexity in some cases, but eliminates the need to validate the cache of variable values if they ever change.

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

Sidebar

Related Questions

Hey. I've a very large C# solution, with many projects that are messy in
I find SharePoint (WSS 3) portal messy to use & manage with TFS. I
This question is messy, i dont need a working solution, i need some psuedo
I got some pretty messy urls that i got via scraping here, problem is
ifconfig -output is somewhat messy thing to look at. When I saw the nice
I have a messy stored procedure which uses dynamic sql. I can debug it
I have inherited a somewhat messy query that I am working on refactoring to
We (my colleagues) have a messy 12 y.o. mature app that is GUI-based, and
The mysql prompt spits out column data in a messy format, is there a
I search for the following lines coming from a messy HTML file: <span id=fooPack1_xpl01_name11>150.00

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.