Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102146

Duplicate Output

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Gary Roach <gary719_list1@verizon.net>
Newsgroups comp.lang.python
Subject Duplicate Output
Date Tue, 26 Jan 2016 10:48:58 -0800
Lines 22
Message-ID <mailman.28.1453883934.2338.python-list@python.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de 3UMrEGkor/H4AJaX3urv7goGWd+d0dIb7ekK1t/cqEHA==
Return-Path <gary719_list1@verizon.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.105
X-Spam-Level *
X-Spam-Evidence '*H*': 0.80; '*S*': 0.02; 'dirnames,': 0.16; 'received:206.46': 0.16; 'received:206.46.173': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subprocess': 0.16; 'to:name:python list': 0.16; 'duplicate': 0.18; 'import': 0.24; 'written': 0.24; 'header:User-Agent:1': 0.26; 'command': 0.26; 'prints': 0.29; 'code:': 0.29; 'code': 0.30; 'run': 0.33; 'to:addr :python-list': 0.36; 'list.': 0.37; 'doing': 0.38; 'wrong': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'header:MIME- version:1': 0.60; 'received:206': 0.63; 'walk': 0.72; 'received:192.168.1.7': 0.91; 'stretch': 0.91; 'kate': 0.95
X-CMAE-Score 0
X-CMAE-Analysis v=2.1 cv=btqxfxui c=1 sm=1 tr=0 a=AstGAA2XJoPAehtj9MTdvA==:117 a=IkcTkHD0fZMA:10 a=7aQ_Q-yQQ-AA:10 a=I_HWyHHdDhjYWmmJz8sA:9 a=QEXdDO2ut3YA:10
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0
X-Mailman-Approved-At Wed, 27 Jan 2016 03:38:53 -0500
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102146

Show key headers only | View raw


Hi

Debian stretch OS
KDE Desktop
Code written with Kate
Run in command line with $python getFileNames.py

Code:

from os import walk
import subprocess

f = []
x = ""
for (dirpath, dirnames, filenames) in walk('.'):
     print(filenames)

This prints [<file list>][<duplicate file list>]

What am I doing wrong or how do I remove the duplicate list.

Gary R.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Duplicate Output Gary Roach <gary719_list1@verizon.net> - 2016-01-26 10:48 -0800

csiph-web