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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:58:53+00:00 2026-06-11T17:58:53+00:00

I am looking for a way to pass information safely (!) between two processes

  • 0

I am looking for a way to pass information safely (!) between two processes of python scripts.

One process reads only, and the other writes only.
The data I need to pass is a dictionary.

The best solution I found so far is a local SQL server (since the data itself is kind of a table) and I assume SQLite will handle the transaction safely.

Is there a better way, maybe a module to lock a file from being read while it is written to and vice versa?

I am using linux ubuntu 11.10, but a cross platform solution will be welcome.

  • 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-11T17:58:54+00:00Added an answer on June 11, 2026 at 5:58 pm

    For one-way communication you could use e.g. multiprocessing.Queue or multiprocessing.queues.SimpleQueue.

    Shared memory is also an option using multiprocessing.Array. But you’d have to split up the dictionary in at least two arrays (keys and values). This will only work well if all the values are of the same basic type.

    The good point about both multiprocessing.Queue and multiprocessing.Array is that they are both protected by locks internally, so you don’t have to worry about that.

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

Sidebar

Related Questions

I am looking for a better way to pass information between my Firefox extension
I'm looking for a way to pass web-application transaction information on to the underlying
I am looking for a way to pass NumPy arrays to Matlab. I've managed
I'm looking for a way to pass different options as a parameter to a
I am looking for a way to pass an object ( vector<long> in my
I am looking for a way to pass a string containg the * character
I'm looking for a way to pass a variable or string or anything into
im looking for a way to print the array as is after each pass.
I'm looking for way to write Javascript programs / scripts on desktop, not inside
I've been trying to find a proper way to pass some information, such as

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.