Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Larry Martell Newsgroups: comp.lang.python Subject: Re: starting docker container messes up terminal settings Date: Sun, 8 May 2016 12:25:02 -0400 Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de js+aSJsDChJ8mYwMwIr5KQf0b9OKFAJkNoR/8rRSM6jQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cmd': 0.09; 'issue?': 0.09; 'returns,': 0.09; 'causing': 0.13; '2016': 0.16; '>>>i': 0.16; 'cares': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'shell': 0.18; 'settings': 0.20; 'to:name:python- list@python.org': 0.20; 'fix': 0.21; 'am,': 0.23; 'passing': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'script': 0.25; "doesn't": 0.26; '(which': 0.26; 'error': 0.27; 'message- id:@mail.gmail.com': 0.27; 'container': 0.29; 'larry': 0.29; 'that.': 0.30; 'code': 0.30; 'fixed': 0.31; 'anyone': 0.32; "skip:' 20": 0.34; 'worked': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'starting': 0.37; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'here': 0.66; 'messed': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=yvOw2v6RR8q6j2lsuRAX4zbyx6jkizY4F7FqCvHhsKQ=; b=LgbhfqFkLmIHeJSDM2ypoZpyNWlOHdlQFDvKV9XPRYz4vMrG9nYR6TcXxfXVuH5cji GRgWshS40nvCPJSvo6+dABHfiFHl67VRtGYe/Jfwki93QCGQnm8tP0ZXpzIO02qQFyug 92IjI/u/gU0RB/kHfZm02DOXNpNd68UFLfteq2++SCu/5Xf6mWlG/3rtJCLjbRyUu8QQ VM88ezCqBd7fqx91mVO9K2az0zJFKhlJMWDLUCUwkVD9hV8r1TmZFsJi7jYMQQglLnsN lmPDlyQibZc5WGRkOtTetXHtei930yEn1rNlGsEJwNAw+J97z5/qcyPZcDFbNn5hchMK ogYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=yvOw2v6RR8q6j2lsuRAX4zbyx6jkizY4F7FqCvHhsKQ=; b=dJ+KfKh2YRpc+o/oG+SGyYPuLvzyLGQuFWwdXtfT8D5XEVgT3mqhgeOxINlv6jqvjU Fw55nKa65FMIHjN3lnfvUEzDbcROc0mvqDufczjRszUqnN/653p4qzjDVtl+uXEdRbfp 6F0h7bpHDY5iaVs7ZevazsovpLl89EGF+MH9+EmhPQP5hZGINRFQgcSzuxoN2wBXvqyj 2OEfs+TsO2Ul3UX/4c1OGbxcvPsbfrClBbi9/JjQ66yjx5Ltg4qtKRmx9DOKo+MkkqhW M7EgYsJCuPCQX5qnMn7kwj8W+1d7HLizorXj/j7qsvhaIKOiGPqabjEVDnk7AyPs+kb2 mD9Q== X-Gm-Message-State: AOPr4FXC0gArYTdo+relAQQ2ViFYnWz4kpqMiVIHEKXZJvN4zPrhyDt5jt7GQzbzHtMxYRbsWb0hiGLoj2tA6A== X-Received: by 10.50.246.14 with SMTP id xs14mr7050780igc.47.1462724741948; Sun, 08 May 2016 09:25:41 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com comp.lang.python:108368 On Mon, May 2, 2016 at 10:28 AM, Larry Martell wr= ote: > On Mon, May 2, 2016 at 10:08 AM, Joaquin Alzola > wrote: >>>I am starting a docker container from a subprocess.Popen and it works, b= ut when the script returns, the terminal settings of my shell are messed up= . Nothing is echoed and return doesn't cause a >newline. I can fix this wit= h 'tset' in the terminal, but I don't want to require that. Has anyone here= worked with docker and had seen and solved this issue? >> >> It is good to put part of the code you think is causing the error (Popen= subprocess) > > cmd =3D ['sudo', > 'docker', > 'run', > '-t', > '-i', > 'elucidbio/capdata:v2', > 'bash' > ] > p =3D subprocess.Popen(cmd, stdout=3Dsubprocess.PIPE, > stderr=3Dsubprocess.STDOUT) If anyone cares (which is doubtful), I fixed this by removing -t and passing in stdin=3DNone to Popen.