Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'string': 0.09; 'arguments': 0.09; 'bytes,': 0.09; 'part,': 0.09; 'python': 0.11; 'expecting': 0.16; 'format?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'it;': 0.16; 'magic': 0.16; 'stdout': 0.16; 'value"': 0.16; 'value;': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'written': 0.21; 'passes': 0.24; 'please?': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'perl': 0.31; 'subject:from': 0.34; 'received:209.85': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'simply': 0.61; 'kind': 0.63; 'between': 0.67; 'presumably': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=C9MSlG2PQ/alDqMlnjHUMspQT23iLHzUBQUehsnof9E=; b=a3gYzd49+oQP7sbZEWRYgjF+5iPAkcZ+ZtShbgJOTIuYJ+yG8opqDtxx1yXbcSGk+i eN5aW6B2sEFXTpSDZLlh3WsfwsJf9/o9OfHkPmjwPenn6u4h2OeCXI4AwQukcvbPTzbP t6jHt/kTfhLvRDH+qDsQPVjURwcGzrctndCqTNWaqx9/efGcsHxMTPDpboYTEuAXzldj OlJr+w3ul8g8sz714IADxGUIWOgx9mj0dplNFD6Fd0TjkSNf2dV6Szc2YqyCXYtta2wM tdTdS+HNHkN2wCJLAZLJ3I1eLrNmvq0ElQ84biBawAtpTOBW7X/cX18JlUBeL2OGyUFC hXEQ== MIME-Version: 1.0 X-Received: by 10.52.111.130 with SMTP id ii2mr4311598vdb.111.1365688812988; Thu, 11 Apr 2013 07:00:12 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Apr 2013 00:00:12 +1000 Subject: Re: Return a value from a function result From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365688815 news.xs4all.nl 2572 [2001:888:2000:d::a6]:33701 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43371 On Thu, Apr 11, 2013 at 7:06 PM, Ombongi Moraa Fe wrote: > My perl script "a.pl" calls python script "b.py" and passes arguments to it; > expecting a return value; Can you clarify this part, please? What kind of "return value" is your Perl script expecting? Presumably you actually mean something written to stdout; what format? How do you decode it? Ultimately, stdout is simply a stream of bytes, though with some small magic you can treat it as a string of characters. All its meaning is between the sender and receiver. ChrisA