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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:31:06+00:00 2026-05-11T23:31:06+00:00

Consider this at the windows commandline. scriptA.py | scriptB.py I want to send a

  • 0

Consider this at the windows commandline.

scriptA.py | scriptB.py

I want to send a dictionary object from scriptA.py to scriptB.py by pickle:ing it and sending it over a pipe. But I don’t know how to accomplish this.

I’ve read some posts about this subject here, but usually there’s answers along these line:

Popen( "scriptA.py"´, ..., and so on )

But I don’t actually know the name of “scriptA.py”. I just want to get hold of the ready pipe object and send/receive the databuffer.

I’ve tried sys.stdout/stdout, but I get file-descriptor errors and basically haven’t tried that track very far.

The process is simple:

scriptA.py:

  • (1) Pickle/Serialize dictionary into stringbuffer
  • (2) Send stringbuffer over pipe

scriptB.py

  • (3) Receive stringbuffer from pipe
  • (4) Unpickle/Deserialize stringbuffer into dictionary
  • 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-11T23:31:07+00:00Added an answer on May 11, 2026 at 11:31 pm

    When you say this to a shell

    scriptA.py | scriptB.py
    

    The shell connects them with a pipe. You do NOTHING and it works perfectly.

    Everything that scriptA.py writes to sys.stdout goes to scriptB.py

    Everything that scriptB.py reads from sys.stdin came from scriptA.py

    They’re already connected.

    So, how do you pass a dictionary from stdout in A to stdin in B?

    1. Pickle. scriptA.py dumps the dictionary to stdout. scriptB.py loads the dictionary from stdin.

    2. JSON. scriptA.py dumps the dictionary to stdout. scriptB.py loads the dictionary from stdin.

    This is already built-in to Python and takes very, very little code.

    In scriptA, json.dump( {}, sys.stdout ) or pickle.dump( {}, sys.stdout )

    In scriptB, json.load( sys.stdin ) or pickle.load( sys.stdin )

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

Sidebar

Ask A Question

Stats

  • Questions 226k
  • Answers 226k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer What do you mean with "route information"? The map data… May 13, 2026 at 1:10 am
  • Editorial Team
    Editorial Team added an answer The main issue I'm having is wanting to load the… May 13, 2026 at 1:10 am
  • Editorial Team
    Editorial Team added an answer Welcome to the wonderful world of debugging multi-threaded code. There… May 13, 2026 at 1:10 am

Related Questions

Duplicate of this question. Vote to close. Consider this at the windows commandline. scriptA.py
I have an interesting (at least to me) problem: I can't manage to find
Please consider the following: I am storing around 1.2 Million TIF files ranging from
I find myself needing to store public key certificates, and a single private key

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.