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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:31:28+00:00 2026-06-14T23:31:28+00:00

hello I have two python files(namedpipe) a.py import win32pipe, win32file p = win32pipe.CreateNamedPipe(r’\\.\pipe\test_pipe’, win32pipe.PIPE_ACCESS_DUPLEX,

  • 0

hello I have two python files(namedpipe)

a.py

import win32pipe, win32file

p = win32pipe.CreateNamedPipe(r'\\.\pipe\test_pipe',
    win32pipe.PIPE_ACCESS_DUPLEX,
    win32pipe.PIPE_TYPE_MESSAGE | win32pipe.PIPE_WAIT,
    1, 65536, 65536,300,None)

win32pipe.ConnectNamedPipe(p, None)


data = "Hello Pipe"  
win32file.WriteFile(p, data)

this pipe creates a namedpipe “test_pipe” and writes the data into the pipe.

b.py

import win32pipe, win32file
import win32file
fileHandle = win32file.CreateFile("\\\\.\\pipe\\test_pipe",
                              win32file.GENERIC_READ | win32file.GENERIC_WRITE,
                              0, None,
                              win32file.OPEN_EXISTING,
                              0, None)
data = win32file.ReadFile(fileHandle, 4096)
print data

i am able to get the data without any problem. but the data i get is in this form(i have enclosed the output in double quotes)

"<0, Hello Pipe>" 

I am unable to figure out why all these variables are being printed(<,0 ,>) where is the problem in a.py or b.py and how I can fix this.

  • 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-14T23:31:29+00:00Added an answer on June 14, 2026 at 11:31 pm

    That’s just what win32file.ReadFile() returns. It returns a tuple of the result and the read data. You should verify the result is 0 (or anything else applicable) and then read the data.

    data = win32file.ReadFile(fileHandle, 4096)
    if data[0] == 0:
      print data[1]
    else:
      print 'ERROR', data[0]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two python modules: a.py import b def hello(): print hello print a.py
I have a two files in python, proc1.py and proc2.py, Both are implementation of
I have two android applications. The apks are Hello.apk and Fonts.apk I would like
I have two arrays: $array1 = array(1=>1,10=>1,12=>0,13=>13); $array2 = array(1=>Hello,10=>Test,12=>check,13=>error); Here $array1 has keys
Hello I have a UISegmentedControl with two segments. The selected segment is modified programmatically
Hello I have problem to put together animations of two separate objects to second
Let's say I have these two arrays: string[] arr1 = new string[2]{Hello, Stack} string[]
I have two strings string str1 = Hello World !; // the position of
I have two text files in the following format: The first is this on
hello i have a search engine for my site. i have two selection fields.

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.