🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.python
Article #27953

Re: zestawienie zbiorcze

#27953
From: Mateuszzz
Date: Sat, 26 Mar 2011 18:11
34 lines
2248 bytes
zbiorcze = folder_serw + zmienna + ".txt"
     if not os.path.isfile(zbiorcze):
         shutil.copy(plik2, zbiorcze)
     else:
         #otwieramy pliki i wczytujemy zawartosc
         plik_obecny=open(plik2,'r')
         kolumna=[]
         for linia in plik_obecny:
             m=linia.split(" ")
             element=m[2]
             element=str(element)
             kolumna.append(element)

         plik_obecny.close()
         plik_uzup=open(zbiorcze,'r')
         zawartosc=""
##
# WIEM ZE TO CO JEST DALEJ JEST TROCHE BEZ SENSU - jednak wstawiajac w # 
w obrebie petli instrukcje n+=1 otrzymywalem komunikat, ze chce 
#####pobrac wartosc spoza zakresu
         n=0
         for linia in plik_uzup:
             dodawany_element=kolumna[n]
             dodawany_element=str(dodawany_element)
             linia=str(linia)
             linia.rstrip()
             zawartosc=zawartosc+linia+" "+dodawany_element+"\n"


         plik_uzup.close()
         os.remove(zbiorcze)
         plik_uzup=open(zbiorcze,'w')
         plik_uzup.write(zawartosc)
         plik_uzup.close()
Technical Details
Message-ID: <4d8e2bcd$0$2490$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <4d8846a1$0$2438$65785112@news.neostrada.pl> <4d889f2d$0$2455$65785112@news.neostrada.pl> <4d8e2065$0$2456$65785112@news.neostrada.pl> <iml981$9ut$1@polsl.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Date: Sat, 26 Mar 2011 19:11:19 +0100
From: Mateuszzz <km_wawaUSUNMNIE@vp.pl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9
MIME-Version: 1.0
Newsgroups: pl.comp.lang.python
Subject: Re: zestawienie zbiorcze
References: <4d8846a1$0$2438$65785112@news.neostrada.pl> <4d889f2d$0$2455$65785112@news.neostrada.pl> <4d8e2065$0$2456$65785112@news.neostrada.pl> <iml981$9ut$1@polsl.pl>
In-Reply-To: <iml981$9ut$1@polsl.pl>
Lines: 34
Message-ID: <4d8e2bcd$0$2490$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 83.24.18.191
X-Trace: 1301162957 unt-rea-a-02.news.neostrada.pl 2490 83.24.18.191:51595
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit