Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Christopher Arndt Newsgroups: de.comp.lang.python Subject: Re: [Python-de] Migration Python 2 auf 3 Date: Fri, 16 Mar 2018 14:44:23 +0100 Lines: 19 Message-ID: References: <9ad883a2-9c08-f1ba-71b8-06d730ba358f@chrisarndt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de KMo2ZvRqB+wKTwoX8hH9tQzpReJReRvTXjeUnUmxk2ZQ== Return-Path: X-Original-To: python-de@python.org Delivered-To: python-de@mail.python.org X-Virus-Scanned: Debian amavisd-new at mx01.0x20.eu User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: Content-Language: de-DE X-BeenThere: python-de@python.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Die Deutsche Python Mailingliste List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <9ad883a2-9c08-f1ba-71b8-06d730ba358f@chrisarndt.de> X-Mailman-Original-References: Xref: csiph.com de.comp.lang.python:5138 Am 16.03.2018 um 14:29 schrieb Philipp Klaus Krause: > print "%-35.35s" % base, > > könnte ich in Python 3 wohl als > > print("%-35.35s" % base, end=' ') > > was aber wohl unter Python 2 nicht erlaubt ist. Einfach from __future__ import print_function an den Beginn (erste nicht-leere / nicht-Kommentarzeile) der Quelldatei schreiben. https://docs.python.org/3/library/__future__.html Chris