[python] Bez -i to funguje

zu1234 zu1234 na seznam.cz
Ptek erven 5 11:33:13 CEST 2009


Pro mte na prvnm dku obou soubor text zaivajc: <div class= a 
tak dle?
A na konci text </div>

Myslm e bude dlat paseku.


Vyzkouel, opravil a poslm zpt
ZU
------------- dal st ---------------
A friend of mine|jeden m??j p??tel
Amr.White has called|byl tu jak??si pan White
Be taken aback|b??t p?ekvapen,zmaten
Abandon all hope|vzd??t se ve??ker?? naděje
Abandon oneself to|odd??vat se čemu
Abide by a promise|dodr??et slib
Be able|moci
Able-bodied|siln??,tělesně schopn??
Abominable weather|ohavn?? počas?
Abortive attempt|nezda?en?? pokus
Abound in st|opl??vat č?m
Walk about the town|chodit po městě
I haven't any money about me|nem??m u sebe pen?ze
There is nothing strange about it|na tom nen? nic divn??ho
Talk about st|hovo?it o čem
What is it all about?|co to m?? v??echno znamenat?,oč jde?
Be about to|chystat se
The book is above me|kniha je pro mne nesrozumiteln??
As was stated above|jak bylo uvedeno d??ve
Travel abroad|cestovat do ciziny
Visitors from abroad|zahraničn? n??v??těvn?ci
Absence from school|nep??tomnost ve ??kole
Absent from school|nep??tomn?? ve ??kole
Be absorbed in|b??t upout??n č?m,pono?en do
Abstain from st|zdr??ovat se čeho
Food in abundance|hojnost j?dla
Abundance of food|nadbytek j?dla
Be abundant|hojně se vyskytovat
Abundant in|bohat?? na
Alternating current|st??dav?? proud
Accede to|souhlasit s
By accident|n??hodou
Have an accident|m?t nehodu
Meet with an accident|m?t nehodu
Accompanied luggage|spoluzavazadlo
He was accorded a warm welcome|dostalo se mu v?el??ho uv?t??n?
Give an account of|popsat,vyl?čit
Take st into account|vz?t v ??vahu co
On account of|pro,kv??li
On my account|kv??li mně
On no account|v ????dn??m p??padě
Account for|vysvětlit
Accustom oneself to|zvyknout si na
Be accustomed to|b??t zvykl?? na
Have an headache|m?t bolen? hlavy
My head aches|bol? mě hlava
Achieve one's aim|dos??hnout sv??ho c?le
Acknowledge one's mistake|uznat svou chybu
Be acquainted with|b??t obezn??men s
Acquiesce in st|d??t svolen? k čemu
Acquit of st|zprostit čeho
Acquit oneself of st|zprostit se čeho
Acquit oneself well like|osvědčit se, jako
Across the river|p?es ?eku
Across the street|na druh?? straně ulice
Across from|naproti čemu
Act as an interpreter|dělat tlumočn?ka
On active service|v činn?? slu??bě
Adhere to|lpět na
Adjust oneself to the circumstances|p?izp??sobit se okolnostem
Be admitted into a school|b??t p?ijat do ??koly
Much ado about nothing|mnoho povyku pro nic
Adult education college|st?edn? ??kola pro pracuj?c?
Advanced in years|v pokročil??m věku
Take advantage of st|vyu???t čeho
Take advantage of sb|o??idit někoho
Take sb's advice|d??t si poradit od koho
Follow sb's advice|d??t si poradit od koho
On the advice of sb|na č? radu
A good word of advice|dobr?? rada
You would be well advised to|doporučuje se, abyste
>From afar|zdaleka
The answer is affirmative|odpověď je kladn??
I can't afford it|nemohu si to dovolit
Be afraid of|b??t se čeho
Be afraid for|b??t se o
I'm afraid|bohu??el
After dark|po setměn?
Shut the door after you|zav?i za sebou dve?e
This afternoon|dnes odpoledne
On Sunday afternoon|v neděli odpoledne
Now and again|občas
Time and again|znovu a znovu
As much,many again|dvakr??t tolik
Lean against the wall|op?rat se o zeď
At your age|v tv??m věku
Come of age|dos??hnout zletilosti
I haven't seen you for ages|neviděl jsem tě ani nepamatuji
A boy aged ten|chlapec star?? deset let
An aged man|star?? mu??
The aged and infirm|sta?? a nemocn?
Two days ago|p?ed dvěma dny
Agree to,with st|souhlasit s
Agree about st|souhlasit v čem
Agree with sb|souhlasit s k??m
Agree on|dohodnout se na
Coffee does not agree with me|k??va mi neděl?? dob?e
Agreable to st|srozuměn?? s č?m
I'm agreeable|jsem pro
Come to an agreement with sb|dohodnout se na
Go ahead?|jen račte?
Aim at|zamě?it se na,usilovat o
Aim high|m??it vysoko
In the open air|pod ??ir??m nebem
Walk on air|chodit jako ve snu
Be on the air|vys?lat,b??t vys?l??n rozhlasem
Give oneself on|dělat se d??le??it??m,p?edv??dět se
With arms akimbo|ruce v bok
On the alert|ve st?ehu
Alight from the bus|vystoupit z autobusu
Be alive to st|uvědomovat si co
All day long|cel?? den
Beyond all doubt|nad ve??kerou pochybnost
Why help him, of all people?|proč pom??hat pr??vě jemu?
All of us|my v??ichni
Not at all|nen? zač
There is to it|v tom to věz?
For all I know|co j?? v?m
Once for all|jednou pro v??dy
All along|od zač??tku
All at once|najednou
I'm all for it|jsem pro
All over the world|po cel??m světě
All right|v po???dku
All the better|t?m l??pe
Allocate a flat to sb|p?idělit byt komu
Allow for|vz?t v ??vahu,poč?tat s
Allow of|p?ipou??tět
Be allowed to|smět
Along the street|po ulici
Along here|tudy,d??le
Come along|tak pojď
Along with|spolu
Get along with|vych??zet s dob?e,??patně
Be along|p?ij?t,p?ijet
Be aloof from st|stranit se čeho
Have the shops closed already?|to u?? maj? obchody zav?eno?
A.m.|r??no,dopoledne
Amazed at st|udiven,u??asl?? nad
Make amends to sb for st|nahradit komu co
Come amiss|p?ij?t nevhod
Take st amiss|m?t co za zl??
There is st amiss|tady něco neklape
Who among you|kdo z v??s
Be anong the best|pat?it k nejlep???mu
Among other things|mezi jin??m
They had a pound among them|měli dohromady libru
It amounts to the same thing|to je vlastně tot????
Bread and butter|chl??b s m??slem
Nice and warm|hezky teplo
Try and come|sna?? se p?ij?t
Angry young man|rozzloben?? mlad?? mu??
Get angry|rozzlobit se
Ankle socks|kr??tk?? pono??ky
Ankle-deep in the mud|po kotn?ky v bl??tě
Be annoyed with sb,at st|zlobit se na
Another time|jindy
Another cup of tea|je??tě jeden ????lek čaje
Another two hours|je??tě dal??? dvě hodiny
Answer the door|j?t otev??t
Answer back|odmlouvat
Answerable to sb for st|zodpovědn?? komu zač
Antique shop|obchod se staro??itnostmi
Anxiety for|starost o
Anxieti about|starost ohledně
Anxieti for|touha po
Anxieti to|touha aby
Anxious about,for one's health|znepokojen?? o sv?? zdrav?
Be anxious|velmi si p???t,sna??it se
Anxious to please|vyhovět
At any rate|alespo?
In any case|v ka??d??m p??padě
If it's any good|stoj?-li to v??bec za něco
Not in any way|nijak
Not anybody|nikdo
Not anything|nic
Anything but|v??echno, jenom ne
Not anywhere|nikde,nikam
Apart from|nehledě k
Tel,know apart|rozeznat
Set apart|vyhradit
Take apart|rozebrat
Joking apart|??erty stranou
Apartment house|n??jemn? d??m,penzi??n
Apologize to sb for st|omluvit se komu zač
Apology to sb for st|omluva komu zač
Appeal to sb for st|prosba ke komu oč
In apple-pie order|ve vzorn??m po???dku
Apply a compress|p?ilo??it obklad
Apprehensive of|ob??vaj?c? se čeho
Apprehensive for|ob??vaj?c? se čeho
Apprehensive that|ob??vaj?c? se, ??e
Easy,difficult to approach|snadno,tě??ko p??stupn??
Approach to work|postoj k pr??ci
Approval to st|souhlas s č?m
Apt At st|schopn?? k čemu
We are apt to forget|r??di zapom?n??me
Aptitude for|talent k
Arabic numerals|arabsk?? č?slice
With open arms|s otev?enou n??ruč?
Keep sb at arm's length|dr??et si koho od těla
He's been around a lot|viděl kus světa,vyzn?? se
Arouse from sleep|vzbudit ze sp??nku
Arouse sb's suspicion|vzbudit něč? podez?en?
Arouse sb's anger|vzbudit něč? hněv
Arrival to the town|p??jezd,p??chod do města
Arrive home|p?ijet,p?ij?t dom??
As usual|jako obyčejně
As a rule|zpravidla
Twice as large|dvakr??t tak velk??
Just as good|stejně tak dobr??
As I said before|jak u?? jsem ?ekl
As it were|jaksi
As it is|stejně,beztoho
Old as he is|i kdy?? je star??
As far as Prague|a?? do Prahy
As for|co se t??če,pokud jde o
As good as|skoro
As if,as though|jako kdyby
As long as|pokud
As soon as|jakmile
As to|co se t??če
As well|rovně?? tak??
As well as|jako?? i,a tak??
As yet|a?? dosud
Ascent of mountain|v??stup na horu
Be ashamed of|stydět se za
Be ashamed of yourself|styď se
Lay aside|odlo??it
Put aside|rezervovat
Step aside|ustoupit stranou
Ask the way|pt??t se na ceestu
Ask a question|pt??t se na co
Ask after sb,sb's health|pt??t se na koho,na č? zdrav?
Ask for sb|pt??t se po kom
Ask for help|????dat o pomoc
Ask for a favour|????dat o laskavost
Ask to dinner|pozvat na oběd
You have asked for it|s??m jsi to chtěl
Ask me another|to se mě moc pt????
Look askance at|d?vat se podez?ravě na
Be asleep|sp??t
fall asleep|usnout
Two aspirins for a headache|dva pr????ky proti bolen? hlavy
Assist sb|pomoci komu
Be of any assistance to sb|b??t n??pomocn?? komu
On the assumption|za p?edpokladu, ??e
Be astonished to see|s ????asem vidět
Be astonished at the news|b??t udiven zpr??vou
To my astonishment|k m??mu ????asu
Go astray|zabloudit,ztratit se
Lead astray|sv??st ze spr??vn?? cesty
At the door|u dve??
At the theatre|v divadle
At the corner|na rohu
At a lesson|p?i hodině
At table|p?i j?dle
At the station|na n??dra???
At home|doma
At night|v noci
At three o.clock|ve t?i hodiny
At that time|v t?? době,tehdy
At the moment|v tomto okam??iku,teď
At any moment|kdykoli
At the age of six|v ??esti letech
At December 31|k 31 prosinci
At work,v zaměstn??n?
At peace|v m?ru
At 10 crowns a piece|po deseti korun??ch za kus
What are you at now?|č?m se teď zab??v??te?
Be hard at it|pilně pracovat
Be at one|b??t zajedno
At full speed|plnou rychlost?
At that|a k tomu je??tě
Atone for st|odčinit co
Attach much importance to st|p?ikl??dat velkou d??le??itost k čemu
Attainone's object|dos??hnout sv??ho c?le
Attempt at|pokus o
Attend to|věnovat se komu,čemu
Have you been attended to?|byl jste u?? obslou??en?
Attend school|nav??těvovat ??kolu
Attend sb,on sb|l??čit,o??et?ovat koho
Attendance at school,school attendance|n??v??těva ??koly
Medical attendance|l??ka?sk?? p??če
Pay attention to st|věnovat pozornost čemu
Call sb's attention to st|upozornit koho nač
Power of attorney|pln?? moc
Avail oneself of st|pou???t čeho
Further information is available on request|dal??? informace lze obdr??et na po????d??n?
On an average|pr??měrně
Avert an accident|odvr??tit ne??těst?
Awake to st|uvědomit si co
Be awake to st|b??t si vědom čeho
Be awave of st,that|b??t si vědom čeho,??e
He was grumbling away|po???d mu nebylo něco po chuti
Awkward door to open|dve?e, kter?? se ??patně otv?raj?
Go awry|zhatit se
Bable a secret|vyzvonit tajemstv?
Behind one's back|komu za z??dy
Turn one's back on|obr??tit se z??dy k
The of one's hand|h?bet ruky
Stand back|ustupte
There and back|tam a zpět
Be,come back|vr??tit se
Put it back|dejte to zp??tky
20 years back|p?ed 20 lety
Go back upon one's word|nedodr??et slovo
Back in 1900|ji?? v roce 1900
Call sb bad names|nad??vat komu
A bad mistake|v????n?? chyba
A bad headache|siln?? bolen? hlavy
That's too bad|to je zl??
>From bad to worse|od dev?ti k pěti
Feel bad|c?tit se ??patně
It baffles all description|to se ned?? popsat
As if he had just come out of a band|jako ze ??katulky
Bang one'shead|uhodit se do hlavy
Bang the door|pr??sknout dve?mi
Bash the typewriter|bu??it do psac?ho stroje
Not an eyelid|ani nemrknout
Have,take a bath|vykoupat se
Bath-tub|vana
Bay window|ark???ov?? okno
Keep at bay|dr??et v ??achu

How much is it?|kolik to stoj??
I am to see him tomorrow|m??m ho z?tra nav??t?vit
It was not to be found|nedalo se to naj?t
Don't be long|nebuď tam dlouho
Has the postman been yet?|u?? tady byl listono???
I haven't a bean|nem??m ani krejcar
I can't bear him|nemohu ho vyst??t
The road bears to the left|cesta zah??b?? doleva
Bear on st|t??kat se čeho
Take one's bearings|orientovat se
Beckon sb,to sb|pokynout komu
Go to bed|j?t sp??t
Be in bed|le??et v posteli
Take to one's bed|z??stat v posteli
Make the bed|ustlat
Have a bee in a bonnet|b??t posedl?? my??lenkou
The day before yesterday|p?edevč?rem
Before my eyes|p?ed m??ma očima
I beg your pardon|promi?te
I beg to differ|jsem bohu??el jin??ho n??zoru
At the beginning of|na zač??tku čeho
In the beginning|zpoč??tku
>From Beginning to end|od zač??tku do konce
Behave oneself|chovat se slu??ně
Behind your back|za tv??mi z??dy
He is behind the times|zaspal dobu
Belief in|v?ra v
The best of my belief|podle m??ho nejlep???ho svědom?
Believe it or not|vě?te tomu nebo ne
Below zero|pod nulou
It is below my dignity|je to pod moji d??stojnost
As stated below|jak je uvedeno n???e
It is beneath my dignity|to je pod moji d??stojnost
¨
Sit beside me|sedni si vedle mě
This is beside the point|to nepat?? k věci
Be beside oneself with joy|b??t bez sebe radost?
No better than|o nic lep??? ne??
Get the better of|p?emoci,zvl??dnout
Know better|m?t lep??? rozum
For better or worse|v dobr??m i ve zl??m
He is better today|je mu dnes l??pe
You had better go|bylo by l??pe, kdybys ??el,měl bys raději j?t
There is no love lost bettween them|nemaj? se r??di
We had five pounds between us|měli jsme dohromady pět liber
That's going beyond a joke|tady p?est??vaj? ??erty
It'squite beyond me|to mi v??bec nejde na rozum
The big toe|palec u nohy
He is bound up in his work|je ??plně zabr??n do pr??ce
Bite one'slips|kousat se do rt??
Bite in the leg|kousnout do nohy
Have a little bite of st;sněz si něco mal??ho
Bituminous coal;čern?? uhl?
Be black and blue;b??t sam?? mod?ina
In black and white;čern?? na b?l??m
Give sb a black look;zle se na koho pod?vat
Dressed in black;oblečen?? v čern??m
Black out;zatemnit
Who is to blame?;č? je to vina?
Bleed to death;vykrv??cet
Bless me!,bless my soul!;m??j ty bo??e!
Be blessed with good health;tě??it se dobr??mu zdrav?
Blind in one eye;slep?? na jedno oko
Blind to sb's faults;slep?? k něč?m chyb??m
The roses are in full bloom now|r????e jsou teď v pln??m květu
Be in blossom|kv??st
Blow one's nose|vysmrkat se
Blue with cold|modr?? zimou
Things are looking blue|vypad?? to bledě
Blush for,with shame|červenat se hanbou
Boast of,about st|chlubit se č?m
Burn one's boats|sp??lit za sebou mosty,jezdit na loďce
Have a bone to pick with sb|m?t nevy??zen?? ??čet s k??m
Make no bones about st|neot??let s č?m
Be born|narodit se
Both of us,we both|my oba
It is both good and cheap;je to nejen dobr??, ale tak?? levn??
At bottom;v podstatě
>From the bottom of my heart;z hloubi srdce
Get to the bottom of st;dostat se na kloub čemu
At the bottom of the page;dole na str??nce
Bounce a ball;hr??t si s m?čem
Advance by leaps and bounds;postupovat m?lov??mi kroky
Where are you bound for?;kam m??te nam??eno?
He is bound to come;určitě p?ijde
Brag about st;chv??stat se č?m
Rack one's brain;l??mat si hlavu
Turn sb's brain;popl??st hlavu komu
Get down to brass tacks;p?ej?t k věci
A breach of the peace|poru??en? ve?ejn??ho po???dku
A breach of promise|nedodr??en? slibu man??elsk??ho
Escape by a hair's breadth|uniknout o vlas
Breake into pieces|rozb?t se na kusy
Breake to one's word|nedodr??et slovo
Breake to one's journey|p?eru??it cestu
The day breaks|rozedn?v?? se
Breake the bad news to sb|??etrně sdělit ??patnou zpr??vu komu
Breake away from st|zbavit se čeho
Make a clean breast of st|otev?eně p?iznat co
Out of breath|bez dechu
With bated breath|se zatajen??m dechem
Take breath|oddychnout si
Take a deep breath|zhluboka se nadechnout
Take sb's breath away|vz?t komu dech,p?ekvapit
Not a breath of suspicion|ani st?n podez?en?
Drop a brick|dopustit se netaktnosti
Go on a brigade|jet na brig??du
Bring to an end|ukončit
Bring up-to-date|zmodernizovat
Bring round to|p?iv??st k sobě,vzk??sit
Broad daylight|jasn?? den
In broad outline|velkorysy, tolerantn?
Broad views|tolerantn? n??zory
Broil in the sun|pra??it se na slunci
Be broke|b??t bez hal???e
A new broom sweeps clean|nov?? ko??tě dob?e mete
Give the clothes a good brush|dob?e vykart??čovat ??aty
He won's budge an inch|neustoup? o krok
His eyes bulged|oči mu vyl??zaly z d??lk??
Bump one's head against,on st|narazit nač
Burst into tears|propuknout v pl??č
Burst out laughing|d??t se do sm?chu
Go by bus|jet autobusem
Miss the bus|zme??kat autobus,prop??st p??le??itost
Let's down to business|p?istupme k věci
Busy oneself with|zaměstn??vat se č?m
Excuse my butting in|promi?te, ??e v??m sk??ču do ?eči
My ears buzz|huč? mi v u???ch
It must be ready by now|teď u?? je to jistě hotov??
Know by the name|zn??t jm??nem
Let's call it day|pro dne??ek konč?me
What is it called in English?|jak se to ?ekne anglicky?
He was out when I called|byl pryč, kdy?? jsem tam p?i??el
Call sb up|telefonovat komu
Give sb a call|zavolat komu
Pay a call on sb|p?ij?t ke komu na kr??tkou n??v??těvu
Go camping|jet t??bo?it
I can hear you|j?? tě sly???m
I cannot but|mus?m
Capable for st|schopn?? čeho
Take care that|d??t pozor, aby
Take care of|postarat se o
I don't care for soup|j?? pol??vku nerad
She doesn't a hang,pin|je j? to ??plně jedno
Be careful not to|dej pozor, abys ne
Be careful about,while ...ing|dej si pozor p?i
Be careful of|db??t na
Carry oneself|n??st se
Carry one's head|dr??et hlavu
In case|pro p??pad,??e
In case of fire|pro p??pad po????ru
In any case|v ka??d??m p??padě,rozhodně
In no case|za ????dn??ch okolnost?
If that is the case|je-li tomu tak
Just in case|pro ka??d?? p??pad
As the case may be|pop??padě,eventu??lně
Cash on delivery|na dob?rku
Be short of cash|m?t m??lo peněz
It's raining cats and dogs|lije jako z konve
Catch me riding a bus!|j?? a jet autobusem!
------------- dal st ---------------
# -*- coding: utf8 -*-

import sys
import wx


class MainFrame(wx.Frame):
    u"""Hlavn? okno aplikace."""

    def __init__(self, title, application):
        u"""Vybudov??n? a prvn? aktualizace obsahu hlavn?ho okna."""

        # Inicializujeme b??zovou t??du a uschov??me parametry.
        x, y, w, h = wx.GetClientDisplayRect()
        pos = (x + 50, y + 50)
        size = (w - 100, h - 100)

        wx.Frame.__init__(self, None, -1, title, pos, size)

        self.application = application

        # Hlavn? okno bude rozděleno na horn? panel pro ???dky needitovateln??ho
        # textu a doln? panel pro vstup z kl??vesnice.
        splitter = wx.SplitterWindow(self)

        self.topPanel = wx.TextCtrl(splitter, -1,
                   style = wx.TE_MULTILINE | wx.TE_RICH2 | wx.TE_READONLY )
        self.bottomPanel = wx.TextCtrl(splitter, -1,
                                    style = wx.TE_MULTILINE 
                                            | wx.TE_RICH2
                                            | wx.TE_PROCESS_ENTER)

        splitter.SplitHorizontally(self.topPanel, self.bottomPanel, -100)

        # Nav????eme stisk Enter ve spodn?m panelu na o??et?uj?c? metodu.
        self.Bind(wx.EVT_TEXT_ENTER, self.OnEnter, self.bottomPanel)

    
    def displayTopText(self):
        self.topPanel.SetValue(self.getMultilineText())


    def getMultilineText(self):
        # Spoj?me cel?? seznam ???dk?? do v?ce???dkov??ho ?etězce. Vynech??me
        # ale prvn? ???dek, kter?? se zobrazuje v z??hlav? okna. Značky |
        # nahrad?me čitelněj???m st?edn?kem a mezerou.
        text = u''.join(self.application.lines[1:])
        return text.replace(u'|', u'; ')


    def OnEnter(self, event):
        # Z?sk??me zadan?? ???dek a p?ipoj?me jej na konec seznamu ???dk??.
        text = self.bottomPanel.GetValue()
        self.application.lines.append(text.rstrip() + u'\r\n')
        
        # Zobraz?me aktualizovan?? obsah. Obsah spodn?ho panelu vyma??eme.
        self.displayTopText()
        self.bottomPanel.SetValue(u'')

        # Zjednodu??en?? implementace -- poka??d?? zap???eme nov?? obsah do
        # souboru.
        import codecs
        f = codecs.open(self.application.filename, 'w', 'utf-8-sig')
        f.write(u''.join(self.application.lines))
        f.close()
        

class App(wx.App):
    """Application class."""

    def OnInit(self):
        # Vytvo??me hlavn? okno vycentrovan?? na st?ed obrazovky. 
        title = u'Slovn?k' 
        self.filename = 'database.txt' 
        self.frame = MainFrame(title, self)
        self.frame.Center()
        self.frame.Show()
        self.SetTopWindow(self.frame)

        # Načteme obsah slovn?ku -- zat?m jen jednodu??e -- a pou??ijeme jej
        # jako obsah horn?ho panelu. Tenhle k??d bude později um?stěn jinde. 
        import codecs
        f = codecs.open(self.filename, 'r', 'utf-8-sig')
        self.lines = f.readlines()
        f.close()
        
        # Prvn? ???dek z datab??ze slovn?ku pou??ijeme jako titulek okna.
        self.frame.SetTitle(self.lines[0])

        # Ostatn? ???dky začneme zobrazovat jako text horn?ho okna.
        self.frame.displayTopText()

        return True


#---------------------------------------------------------------------

def main():
    app = App(False)
    app.MainLoop()


if __name__ == '__main__':
    main()


sys.exit


Dal informace o konferenci Python