FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-docs-de/howto/curses.po at 3.15 · python/python-docs-de · GitHub
python
python-docs-de
Repository navigation
Code
Issues
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
python-docs-de
/
howto
/
curses.po
Copy path
More file actions
More file actions
Latest commit
History
History
History
1287 lines (1168 loc) · 56.5 KB
Breadcrumbs
python-docs-de
/
howto
/
curses.po
Copy path
File metadata and controls
1287 lines (1168 loc) · 56.5 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
German translation of the Python documentation.
#
Copyright (C) 2001 Python Software Foundation
#
This file is distributed under the same license as the Python package.
#
#
Translators:
#
python-doc bot, 2025
#
Swen Bachmann, 2026
#
msgid ""
msgstr ""
"
Project-Id-Version
:
Python 3.15\n
"
"
Report-Msgid-Bugs-To
:
\n
"
"
POT-Creation-Date
:
2026-09-14 20:17+0000\n
"
"
PO-Revision-Date
:
2026-10-15 06:00+0200\n
"
"
Last-Translator
:
python-doc bot, 2025\n
"
"
Language-Team
:
German (https://github.com/python/python-docs-de)\n
"
"
Language
:
de\n
"
"
MIME-Version
:
1.0\n
"
"
Content-Type
:
text/plain; charset=UTF-8\n
"
"
Content-Transfer-Encoding
:
8bit\n
"
"
Plural-Forms
:
nplurals=2; plural=(n != 1);\n
"
#:
../../howto/curses.rst:5
msgid
"Curses Programming with Python"
msgstr
"Curses-Programmierung mit Python"
#:
../../howto/curses.rst:10
msgid
"Abstract"
msgstr
"Zusammenfassung"
#:
../../howto/curses.rst:12
msgid
""
"This document describes how to use the :mod:`curses` extension module to "
"control text-mode displays."
msgstr
""
"Dieses Dokument beschreibt, wie du mit dem Erweiterungsmodul :mod:`curses` "
"Anzeigen im Textmodus steuerst."
#:
../../howto/curses.rst:17
msgid
"What is curses?"
msgstr
"Was ist curses?"
#:
../../howto/curses.rst:19
msgid
""
"The curses library supplies a terminal-independent screen-painting and "
"keyboard-handling facility for text-based terminals; such terminals include "
"VT100s, the Linux console, and the simulated terminal provided by various "
"programs. Display terminals support various control codes to perform common "
"operations such as moving the cursor, scrolling the screen, and erasing "
"areas. Different terminals use widely differing codes, and often have their "
"own minor quirks."
msgstr
""
"Die curses-Bibliothek bietet für textbasierte Terminals eine "
"terminalunabhängige Einrichtung zum Zeichnen des Bildschirms und zum "
"Verarbeiten der Tastatur. Zu solchen Terminals gehören VT100-Geräte, die "
"Linux-Konsole und das nachgebildete Terminal, das verschiedene Programme "
"bereitstellen. Anzeigeterminals unterstützen verschiedene Steuercodes für "
"verbreitete Vorgänge wie das Bewegen des Cursors, das Rollen des Bildschirms "
"und das Löschen von Bereichen. Unterschiedliche Terminals verwenden stark "
"voneinander abweichende Codes und haben oft ihre eigenen kleinen Eigenheiten."
#:
../../howto/curses.rst:27
msgid
""
"In a world of graphical displays, one might ask
\"
why bother
\"
? It's true "
"that character-cell display terminals are an obsolete technology, but there "
"are niches in which being able to do fancy things with them are still "
"valuable. One niche is on small-footprint or embedded Unixes that don't run "
"an X server. Another is tools such as OS installers and kernel "
"configurators that may have to run before any graphical support is available."
msgstr
""
"In einer Welt grafischer Anzeigen könnte man fragen: „Warum die Mühe?“ Es "
"ist wahr, dass Terminals mit Zeichenzellen eine überholte Technik sind, aber "
"es gibt Nischen, in denen es noch wertvoll ist, ausgefeilte Dinge mit ihnen "
"tun zu können. Eine Nische sind kleine oder eingebettete Unix-Systeme, auf "
"denen kein X-Server läuft. Eine andere sind Werkzeuge wie "
"Betriebssysteminstallationsprogramme und Kernel-Konfiguratoren, die "
"möglicherweise laufen müssen, bevor überhaupt grafische Unterstützung "
"verfügbar ist."
#:
../../howto/curses.rst:35
msgid
""
"The curses library provides fairly basic functionality, providing the "
"programmer with an abstraction of a display containing multiple non-"
"overlapping windows of text. The contents of a window can be changed in "
"various ways---adding text, erasing it, changing its appearance---and the "
"curses library will figure out what control codes need to be sent to the "
"terminal to produce the right output. curses doesn't provide many user-"
"interface concepts such as buttons, checkboxes, or dialogs; if you need such "
"features, consider a user interface library such as :pypi:`Urwid`."
msgstr
""
"Die curses-Bibliothek bietet recht grundlegende Funktionalität: Sie gibt dem "
"Programmierer die Abstraktion einer Anzeige, die mehrere sich nicht "
"überlappende Textfenster enthält. Der Inhalt eines Fensters lässt sich auf "
"verschiedene Weisen ändern – Text hinzufügen, löschen, sein Erscheinungsbild "
"ändern – und die curses-Bibliothek findet heraus, welche Steuercodes an das "
"Terminal gesendet werden müssen, um die richtige Ausgabe zu erzeugen. curses "
"bietet nicht viele Konzepte für Benutzeroberflächen wie Schaltflächen, "
"Kontrollkästchen oder Dialoge, wenn du solche Funktionen brauchst, erwäge "
"eine Bibliothek für Benutzeroberflächen wie :pypi:`Urwid`."
#:
../../howto/curses.rst:45
msgid
""
"The curses library was originally written for BSD Unix; the later System V "
"versions of Unix from AT&T added many enhancements and new functions. BSD "
"curses is no longer maintained, having been replaced by ncurses, which is an "
"open-source implementation of the AT&T interface. If you're using an open-"
"source Unix such as Linux or FreeBSD, your system almost certainly uses "
"ncurses. Since most current commercial Unix versions are based on System V "
"code, all the functions described here will probably be available. The "
"older versions of curses carried by some proprietary Unixes may not support "
"everything, though."
msgstr
""
"Die curses-Bibliothek wurde ursprünglich für BSD Unix geschrieben. Die "
"späteren System-V-Versionen von Unix von AT&T ergänzten viele Verbesserungen "
"und neue Funktionen. BSD-curses wird nicht mehr gepflegt und wurde durch "
"ncurses ersetzt, eine Open-Source-Umsetzung der AT&T-Schnittstelle. Wenn du "
"ein Open-Source-Unix wie Linux oder FreeBSD verwendest, nutzt dein System so "
"gut wie sicher ncurses. Da die meisten heutigen kommerziellen Unix-Versionen "
"auf System-V-Code beruhen, werden alle hier beschriebenen Funktionen "
"wahrscheinlich verfügbar sein. Die älteren curses-Versionen, die manche "
"proprietären Unix-Systeme mitbringen, unterstützen allerdings möglicherweise "
"nicht alles."
#:
../../howto/curses.rst:55
msgid
""
"The Windows version of Python doesn't include the :mod:`curses` module. The "
"third-party :pypi:`windows-curses` package provides the same interface on "
"Windows."
msgstr
""
"Die Windows-Fassung von Python enthält das Modul :mod:`curses` nicht. Das "
"Paket :pypi:`windows-curses` von Dritten bietet dieselbe Schnittstelle unter "
"Windows."
#:
../../howto/curses.rst:60
msgid
"The Python curses module"
msgstr
"Das Python-Modul curses"
#:
../../howto/curses.rst:62
msgid
""
"The Python module is a fairly simple wrapper over the C functions provided "
"by curses; if you're already familiar with curses programming in C, it's "
"really easy to transfer that knowledge to Python. The biggest difference is "
"that the Python interface makes things simpler by merging different C "
"functions such as :c:func:`!addstr`, :c:func:`!mvaddstr`, and :c:func:`!"
"mvwaddstr` into a single :meth:`~curses.window.addstr` method. You'll see "
"this covered in more detail later."
msgstr
""
"Das Python-Modul ist eine recht einfache Hülle um die C-Funktionen, die "
"curses bereitstellt, wenn du mit curses-Programmierung in C schon vertraut "
"bist, lässt sich dieses Wissen wirklich leicht auf Python übertragen. Der "
"größte Unterschied ist, dass die Python-Schnittstelle die Dinge vereinfacht, "
"indem sie verschiedene C-Funktionen wie :c:func:`!addstr`, :c:func:`!"
"mvaddstr` und :c:func:`!mvwaddstr` zu einer einzigen "
"Methode :meth:`~curses.window.addstr` zusammenfasst. Das wird später "
"ausführlicher behandelt."
#:
../../howto/curses.rst:70
msgid
""
"This HOWTO is an introduction to writing text-mode programs with curses and "
"Python. It doesn't attempt to be a complete guide to the curses API; for "
"that, see the Python library guide's section on ncurses, and the C manual "
"pages for ncurses. It will, however, give you the basic ideas."
msgstr
""
"Dieses HOWTO ist eine Einführung in das Schreiben von Textmodus-Programmen "
"mit curses und Python. Es versucht nicht, eine vollständige Anleitung zur "
"curses-API zu sein. Dafür lies den Abschnitt zu ncurses in der Anleitung zur "
"Python-Bibliothek und die C-Handbuchseiten zu ncurses. Es gibt dir aber die "
"grundlegenden Ideen mit."
#:
../../howto/curses.rst:77
msgid
"Starting and ending a curses application"
msgstr
"Eine curses-Anwendung starten und beenden"
#:
../../howto/curses.rst:79
msgid
""
"Before doing anything, curses must be initialized. This is done by calling "
"the :func:`~curses.initscr` function, which will determine the terminal "
"type, send any required setup codes to the terminal, and create various "
"internal data structures. If successful, :func:`!initscr` returns a window "
"object representing the entire screen; this is usually called ``stdscr`` "
"after the name of the corresponding C variable. ::"
msgstr
""
"Bevor irgendetwas geschieht, muss curses initialisiert werden. Das geschieht "
"durch den Aufruf der Funktion :func:`~curses.initscr`, die den Terminaltyp "
"bestimmt, alle nötigen Einrichtungscodes an das Terminal sendet und "
"verschiedene interne Datenstrukturen anlegt. Bei Erfolg gibt :func:`!"
"initscr` ein Fensterobjekt zurück, das den gesamten Bildschirm darstellt. Es "
"wird üblicherweise ``stdscr`` genannt, nach dem Namen der entsprechenden C-"
"Variablen. ::"
#:
../../howto/curses.rst:87
msgid
""
"import curses\n"
"stdscr = curses.initscr()"
msgstr
""
"import curses\n"
"stdscr = curses.initscr()"
#:
../../howto/curses.rst:90
msgid
""
"Usually curses applications turn off automatic echoing of keys to the "
"screen, in order to be able to read keys and only display them under certain "
"circumstances. This requires calling the :func:`~curses.noecho` function. ::"
msgstr
""
"Üblicherweise schalten curses-Anwendungen das automatische Anzeigen der "
"Tastenanschläge auf dem Bildschirm ab, um Tasten lesen und sie nur unter "
"bestimmten Umständen anzeigen zu können. Dazu ist ein Aufruf der "
"Funktion :func:`~curses.noecho` nötig. ::"
#:
../../howto/curses.rst:95
msgid
"curses.noecho()"
msgstr
"curses.noecho()"
#:
../../howto/curses.rst:97
msgid
""
"Applications will also commonly need to react to keys instantly, without "
"requiring the Enter key to be pressed; this is called cbreak mode, as "
"opposed to the usual buffered input mode. ::"
msgstr
""
"Häufig müssen Anwendungen außerdem unmittelbar auf Tasten reagieren, ohne "
"dass die Eingabetaste gedrückt werden muss. Das heißt cbreak-Modus, im "
"Gegensatz zum üblichen gepufferten Eingabemodus. ::"
#:
../../howto/curses.rst:101
msgid
"curses.cbreak()"
msgstr
"curses.cbreak()"
#:
../../howto/curses.rst:103
msgid
""
"Terminals usually return special keys, such as the cursor keys or navigation "
"keys such as Page Up and Home, as a multibyte escape sequence. While you "
"could write your application to expect such sequences and process them "
"accordingly, curses can do it for you, returning a special value such "
"as :const:`curses.KEY_LEFT`. To get curses to do the job, you'll have to "
"enable keypad mode. ::"
msgstr
""
"Terminals geben besondere Tasten – etwa die Cursortasten oder "
"Navigationstasten wie Bild auf und Pos1 – üblicherweise als Mehrbyte-Escape-"
"Sequenz zurück. Du könntest deine Anwendung so schreiben, dass sie solche "
"Sequenzen erwartet und entsprechend verarbeitet, aber curses kann das für "
"dich tun und einen besonderen Wert wie :const:`curses.KEY_LEFT` zurückgeben. "
"Damit curses diese Arbeit übernimmt, musst du den keypad-Modus "
"einschalten. ::"
#:
../../howto/curses.rst:110
msgid
"stdscr.keypad(True)"
msgstr
"stdscr.keypad(True)"
#:
../../howto/curses.rst:112
msgid
""
"Terminating a curses application is much easier than starting one. You'll "
"need to call::"
msgstr
""
"Eine curses-Anwendung zu beenden ist viel leichter, als sie zu starten. Du "
"musst Folgendes aufrufen::"
#:
../../howto/curses.rst:115
msgid
""
"curses.nocbreak()\n"
"stdscr.keypad(False)\n"
"curses.echo()"
msgstr
""
"curses.nocbreak()\n"
"stdscr.keypad(False)\n"
"curses.echo()"
#:
../../howto/curses.rst:119
msgid
""
"to reverse the curses-friendly terminal settings. Then call "
"the :func:`~curses.endwin` function to restore the terminal to its original "
"operating mode. ::"
msgstr
""
"um die curses-freundlichen Terminaleinstellungen rückgängig zu machen. Rufe "
"dann die Funktion :func:`~curses.endwin` auf, um das Terminal in seine "
"ursprüngliche Betriebsart zurückzuversetzen. ::"
#:
../../howto/curses.rst:123
msgid
"curses.endwin()"
msgstr
"curses.endwin()"
#:
../../howto/curses.rst:125
msgid
""
"A common problem when debugging a curses application is to get your terminal "
"messed up when the application dies without restoring the terminal to its "
"previous state. In Python this commonly happens when your code is buggy and "
"raises an uncaught exception. Keys are no longer echoed to the screen when "
"you type them, for example, which makes using the shell difficult."
msgstr
""
"Ein verbreitetes Problem beim Debuggen einer curses-Anwendung ist, dass dein "
"Terminal durcheinandergerät, wenn die Anwendung stirbt, ohne das Terminal in "
"seinen früheren Zustand zurückzuversetzen. In Python passiert das häufig, "
"wenn dein Code fehlerhaft ist und eine nicht gefangene Ausnahme auslöst. "
"Tastenanschläge werden dann zum Beispiel nicht mehr auf dem Bildschirm "
"angezeigt, was die Arbeit mit der Shell erschwert."
#:
../../howto/curses.rst:131
msgid
""
"In Python you can avoid these complications and make debugging much easier "
"by importing the :func:`curses.wrapper` function and using it like this::"
msgstr
""
"In Python kannst du diese Komplikationen vermeiden und das Debuggen deutlich "
"erleichtern, indem du die Funktion :func:`curses.wrapper` importierst und so "
"verwendest::"
#:
../../howto/curses.rst:134
msgid
""
"from curses import wrapper\n"
"\n"
"def main(stdscr):\n"
" # Clear screen\n"
" stdscr.clear()\n"
"\n"
" # This raises ZeroDivisionError when i == 10.\n"
" for i in range(0, 11):\n"
" v = i-10\n"
" stdscr.addstr(i, 0, '10 divided by {} is {}'.format(v, 10/v))\n"
"\n"
" stdscr.refresh()\n"
" stdscr.getkey()\n"
"\n"
"wrapper(main)"
msgstr
""
"from curses import wrapper\n"
"\n"
"def main(stdscr):\n"
" # Clear screen\n"
" stdscr.clear()\n"
"\n"
" # This raises ZeroDivisionError when i == 10.\n"
" for i in range(0, 11):\n"
" v = i-10\n"
" stdscr.addstr(i, 0, '10 divided by {} is {}'.format(v, 10/v))\n"
"\n"
" stdscr.refresh()\n"
" stdscr.getkey()\n"
"\n"
"wrapper(main)"
#:
../../howto/curses.rst:150
msgid
""
"The :func:`~curses.wrapper` function takes a callable object and does the "
"initializations described above, also initializing colors if color support "
"is present. :func:`!wrapper` then runs your provided callable. Once the "
"callable returns, :func:`!wrapper` will restore the original state of the "
"terminal. The callable is called inside a :keyword:`try`..."
"
\\
:keyword:`except` that catches exceptions, restores the state of the "
"terminal, and then re-raises the exception. Therefore your terminal won't "
"be left in a funny state on exception and you'll be able to read the "
"exception's message and traceback."
msgstr
""
"Die Funktion :func:`~curses.wrapper` nimmt ein aufrufbares Objekt und führt "
"die oben beschriebenen Initialisierungen durch. Sie initialisiert auch die "
"Farben, wenn Farbunterstützung vorhanden ist. :func:`!wrapper` führt dann "
"das von dir übergebene aufrufbare Objekt aus. Sobald es zurückkehrt, "
"versetzt :func:`!wrapper` das Terminal in seinen ursprünglichen Zustand "
"zurück. Das aufrufbare Objekt wird innerhalb eines :keyword:`try`…"
"
\\
:keyword:`except` aufgerufen, das Ausnahmen fängt, den Zustand des "
"Terminals wiederherstellt und die Ausnahme dann erneut auslöst. Dein "
"Terminal bleibt bei einer Ausnahme also nicht in einem komischen Zustand "
"zurück, und du kannst die Meldung der Ausnahme und den Traceback lesen."
#:
../../howto/curses.rst:164
msgid
"Windows and Pads"
msgstr
"Fenster und Pads"
#:
../../howto/curses.rst:166
msgid
""
"Windows are the basic abstraction in curses. A window object represents a "
"rectangular area of the screen, and supports methods to display text, erase "
"it, allow the user to input strings, and so forth."
msgstr
""
"Fenster sind die grundlegende Abstraktion in curses. Ein Fensterobjekt "
"stellt einen rechteckigen Bereich des Bildschirms dar und unterstützt "
"Methoden, um Text anzuzeigen, ihn zu löschen, den Benutzer Zeichenketten "
"eingeben zu lassen und so weiter."
#:
../../howto/curses.rst:170
msgid
""
"The ``stdscr`` object returned by the :func:`~curses.initscr` function is a "
"window object that covers the entire screen. Many programs may need only "
"this single window, but you might wish to divide the screen into smaller "
"windows, in order to redraw or clear them separately. "
"The :func:`~curses.newwin` function creates a new window of a given size, "
"returning the new window object. ::"
msgstr
""
"Das Objekt ``stdscr``, das die Funktion :func:`~curses.initscr` zurückgibt, "
"ist ein Fensterobjekt, das den gesamten Bildschirm abdeckt. Viele Programme "
"brauchen nur dieses einzige Fenster, aber du möchtest den Bildschirm "
"vielleicht in kleinere Fenster teilen, um sie getrennt neu zu zeichnen oder "
"zu leeren. Die Funktion :func:`~curses.newwin` erzeugt ein neues Fenster "
"gegebener Größe und gibt das neue Fensterobjekt zurück. ::"
#:
../../howto/curses.rst:177
msgid
""
"begin_x = 20; begin_y = 7\n"
"height = 5; width = 40\n"
"win = curses.newwin(height, width, begin_y, begin_x)"
msgstr
""
"begin_x = 20; begin_y = 7\n"
"height = 5; width = 40\n"
"win = curses.newwin(height, width, begin_y, begin_x)"
#:
../../howto/curses.rst:181
msgid
""
"Note that the coordinate system used in curses is unusual. Coordinates are "
"always passed in the order *y,x*, and the top-left corner of a window is "
"coordinate (0,0). This breaks the normal convention for handling "
"coordinates where the *x* coordinate comes first. This is an unfortunate "
"difference from most other computer applications, but it's been part of "
"curses since it was first written, and it's too late to change things now."
msgstr
""
"Beachte, dass das in curses verwendete Koordinatensystem ungewöhnlich ist. "
"Koordinaten werden immer in der Reihenfolge *y,x* übergeben, und die linke "
"obere Ecke eines Fensters ist die Koordinate (0,0). Das bricht die übliche "
"Konvention für Koordinaten, bei der die *x*-Koordinate zuerst kommt. Das ist "
"ein unglücklicher Unterschied zu den meisten anderen Computeranwendungen, "
"aber es gehört zu curses, seit es zum ersten Mal geschrieben wurde, und es "
"ist zu spät, daran noch etwas zu ändern."
#:
../../howto/curses.rst:189
msgid
""
"Your application can determine the size of the screen by using "
"the :data:`curses.LINES` and :data:`curses.COLS` variables to obtain the *y* "
"and *x* sizes. Legal coordinates will then extend from ``(0,0)`` to "
"``(curses.LINES - 1, curses.COLS - 1)``."
msgstr
""
"Deine Anwendung kann die Größe des Bildschirms über die "
"Variablen :data:`curses.LINES` und :data:`curses.COLS` bestimmen, um die "
"*y*- und *x*-Größe zu bekommen. Zulässige Koordinaten reichen dann von "
"``(0,0)`` bis ``(curses.LINES - 1, curses.COLS - 1)``."
#:
../../howto/curses.rst:194
msgid
""
"When you call a method to display or erase text, the effect doesn't "
"immediately show up on the display. Instead you must call "
"the :meth:`~curses.window.refresh` method of window objects to update the "
"screen."
msgstr
""
"Wenn du eine Methode aufrufst, um Text anzuzeigen oder zu löschen, erscheint "
"die Wirkung nicht sofort auf der Anzeige. Du musst stattdessen die "
"Methode :meth:`~curses.window.refresh` der Fensterobjekte aufrufen, um den "
"Bildschirm zu aktualisieren."
#:
../../howto/curses.rst:199
msgid
""
"This is because curses was originally written with slow 300-baud terminal "
"connections in mind; with these terminals, minimizing the time required to "
"redraw the screen was very important. Instead curses accumulates changes to "
"the screen and displays them in the most efficient manner when you "
"call :meth:`!refresh`. For example, if your program displays some text in a "
"window and then clears the window, there's no need to send the original text "
"because they're never visible."
msgstr
""
"Der Grund: curses wurde ursprünglich mit Blick auf langsame "
"Terminalverbindungen mit 300 Baud geschrieben. Bei diesen Terminals war es "
"sehr wichtig, die Zeit zum Neuzeichnen des Bildschirms gering zu halten. "
"curses sammelt die Änderungen am Bildschirm stattdessen und zeigt sie auf "
"die effizienteste Weise an, wenn du :meth:`!refresh` aufrufst. Wenn dein "
"Programm zum Beispiel etwas Text in einem Fenster anzeigt und das Fenster "
"dann leert, muss der ursprüngliche Text nicht gesendet werden, weil er nie "
"sichtbar ist."
#:
../../howto/curses.rst:208
msgid
""
"In practice, explicitly telling curses to redraw a window doesn't really "
"complicate programming with curses much. Most programs go into a flurry of "
"activity, and then pause waiting for a keypress or some other action on the "
"part of the user. All you have to do is to be sure that the screen has been "
"redrawn before pausing to wait for user input, by first calling :meth:`!"
"stdscr.refresh` or the :meth:`!refresh` method of some other relevant window."
msgstr
""
"In der Praxis verkompliziert es die Programmierung mit curses nicht wirklich "
"sehr, curses ausdrücklich zum Neuzeichnen eines Fensters aufzufordern. Die "
"meisten Programme stürzen sich in eine Flut von Tätigkeiten und halten dann "
"an, um auf einen Tastenanschlag oder eine andere Handlung des Benutzers zu "
"warten. Du musst nur sicherstellen, dass der Bildschirm neu gezeichnet "
"wurde, bevor du zum Warten auf Benutzereingaben anhältst – indem du "
"zuvor :meth:`!stdscr.refresh` oder die Methode :meth:`!refresh` eines "
"anderen betroffenen Fensters aufrufst."
#:
../../howto/curses.rst:216
msgid
""
"A pad is a special case of a window; it can be larger than the actual "
"display screen, and only a portion of the pad displayed at a time. Creating "
"a pad requires the pad's height and width, while refreshing a pad requires "
"giving the coordinates of the on-screen area where a subsection of the pad "
"will be displayed. ::"
msgstr
""
"Ein Pad ist ein Sonderfall eines Fensters. Es kann größer sein als der "
"tatsächliche Anzeigebildschirm, und es wird jeweils nur ein Teil des Pads "
"angezeigt. Zum Erzeugen eines Pads sind Höhe und Breite des Pads nötig, "
"während beim Aktualisieren eines Pads die Koordinaten des Bildschirmbereichs "
"angegeben werden müssen, in dem ein Teilbereich des Pads angezeigt wird. ::"
#:
../../howto/curses.rst:222
msgid
""
"pad = curses.newpad(100, 100)\n"
"# These loops fill the pad with letters; addch() is\n"
"# explained in the next section\n"
"for y in range(0, 99):\n"
" for x in range(0, 99):\n"
" pad.addch(y,x, ord('a') + (x*x+y*y) % 26)\n"
"\n"
"# Displays a section of the pad in the middle of the screen.\n"
"# (0,0) : coordinate of upper-left corner of pad area to display.\n"
"# (5,5) : coordinate of upper-left corner of window area to be filled\n"
"# with pad content.\n"
"# (20, 75) : coordinate of lower-right corner of window area to be\n"
"# : filled with pad content.\n"
"pad.refresh( 0,0, 5,5, 20,75)"
msgstr
""
"pad = curses.newpad(100, 100)\n"
"# These loops fill the pad with letters; addch() is\n"
"# explained in the next section\n"
"for y in range(0, 99):\n"
" for x in range(0, 99):\n"
" pad.addch(y,x, ord('a') + (x*x+y*y) % 26)\n"
"\n"
"# Displays a section of the pad in the middle of the screen.\n"
"# (0,0) : coordinate of upper-left corner of pad area to display.\n"
"# (5,5) : coordinate of upper-left corner of window area to be filled\n"
"# with pad content.\n"
"# (20, 75) : coordinate of lower-right corner of window area to be\n"
"# : filled with pad content.\n"
"pad.refresh( 0,0, 5,5, 20,75)"
#:
../../howto/curses.rst:237
msgid
""
"The :meth:`!refresh` call displays a section of the pad in the rectangle "
"extending from coordinate (5,5) to coordinate (20,75) on the screen; the "
"upper left corner of the displayed section is coordinate (0,0) on the pad. "
"Beyond that difference, pads are exactly like ordinary windows and support "
"the same methods."
msgstr
""
"Der Aufruf von :meth:`!refresh` zeigt einen Teilbereich des Pads in dem "
"Rechteck an, das sich auf dem Bildschirm von Koordinate (5,5) bis Koordinate "
"(20,75) erstreckt. Die linke obere Ecke des angezeigten Teilbereichs ist die "
"Koordinate (0,0) auf dem Pad. Abgesehen von diesem Unterschied sind Pads "
"genau wie gewöhnliche Fenster und unterstützen dieselben Methoden."
#:
../../howto/curses.rst:243
msgid
""
"If you have multiple windows and pads on screen there is a more efficient "
"way to update the screen and prevent annoying screen flicker as each part of "
"the screen gets updated. :meth:`!refresh` actually does two things:"
msgstr
""
"Wenn du mehrere Fenster und Pads auf dem Bildschirm hast, gibt es einen "
"effizienteren Weg, den Bildschirm zu aktualisieren und das störende Flimmern "
"zu verhindern, das beim Aktualisieren jedes Bildschirmteils "
"entsteht. :meth:`!refresh` tut nämlich zwei Dinge:"
#:
../../howto/curses.rst:248
msgid
""
"Calls the :meth:`~curses.window.noutrefresh` method of each window to update "
"an underlying data structure representing the desired state of the screen."
msgstr
""
"Es ruft die Methode :meth:`~curses.window.noutrefresh` jedes Fensters auf, "
"um eine darunterliegende Datenstruktur zu aktualisieren, die den gewünschten "
"Zustand des Bildschirms darstellt."
#:
../../howto/curses.rst:251
msgid
""
"Calls the function :func:`~curses.doupdate` function to change the physical "
"screen to match the desired state recorded in the data structure."
msgstr
""
"Es ruft die Funktion :func:`~curses.doupdate` auf, um den tatsächlichen "
"Bildschirm an den gewünschten Zustand anzupassen, der in der Datenstruktur "
"festgehalten ist."
#:
../../howto/curses.rst:254
msgid
""
"Instead you can call :meth:`!noutrefresh` on a number of windows to update "
"the data structure, and then call :func:`!doupdate` to update the screen."
msgstr
""
"Du kannst stattdessen :meth:`!noutrefresh` für eine Reihe von Fenstern "
"aufrufen, um die Datenstruktur zu aktualisieren, und dann :func:`!doupdate`, "
"um den Bildschirm zu aktualisieren."
#:
../../howto/curses.rst:260
msgid
"Displaying Text"
msgstr
"Text anzeigen"
#:
../../howto/curses.rst:262
msgid
""
"From a C programmer's point of view, curses may sometimes look like a twisty "
"maze of functions, all subtly different. For example, :c:func:`!addstr` "
"displays a string at the current cursor location in the ``stdscr`` window, "
"while :c:func:`!mvaddstr` moves to a given y,x coordinate first before "
"displaying the string. :c:func:`!waddstr` is just like :c:func:`!addstr`, "
"but allows specifying a window to use instead of using ``stdscr`` by "
"default. :c:func:`!mvwaddstr` allows specifying both a window and a "
"coordinate."
msgstr
""
"Aus der Sicht eines C-Programmierers kann curses manchmal wie ein "
"verwundenes Labyrinth von Funktionen aussehen, die alle feine Unterschiede "
"haben. So zeigt zum Beispiel :c:func:`!addstr` eine Zeichenkette an der "
"aktuellen Cursorposition im Fenster ``stdscr`` an, während :c:func:`!"
"mvaddstr` zuerst zu einer gegebenen y,x-Koordinate springt, bevor es die "
"Zeichenkette anzeigt. :c:func:`!waddstr` ist genau wie :c:func:`!addstr`, "
"erlaubt aber die Angabe eines Fensters anstelle der Vorgabe "
"``stdscr``. :c:func:`!mvwaddstr` erlaubt die Angabe von Fenster und "
"Koordinate."
#:
../../howto/curses.rst:271
msgid
""
"Fortunately the Python interface hides all these details. ``stdscr`` is a "
"window object like any other, and methods such "
"as :meth:`~curses.window.addstr` accept multiple argument forms. Usually "
"there are four different forms."
msgstr
""
"Zum Glück verbirgt die Python-Schnittstelle all diese Details. ``stdscr`` "
"ist ein Fensterobjekt wie jedes andere, und Methoden "
"wie :meth:`~curses.window.addstr` nehmen mehrere Argumentformen an. "
"Üblicherweise gibt es vier verschiedene Formen."
#:
../../howto/curses.rst:277
msgid
"Form"
msgstr
"Form"
#:
../../howto/curses.rst:277
../../howto/curses.rst:348
msgid
"Description"
msgstr
"Beschreibung"
#:
../../howto/curses.rst:279
msgid
"*str* or *ch*"
msgstr
"*str* or *ch*"
#:
../../howto/curses.rst:279
msgid
"Display the string *str* or character *ch* at the current position"
msgstr
""
"Zeigt die Zeichenkette *str* oder das Zeichen *ch* an der aktuellen Position "
"an"
#:
../../howto/curses.rst:282
msgid
"*str* or *ch*, *attr*"
msgstr
"*str* or *ch*, *attr*"
#:
../../howto/curses.rst:282
msgid
""
"Display the string *str* or character *ch*, using attribute *attr* at the "
"current position"
msgstr
""
"Zeigt die Zeichenkette *str* oder das Zeichen *ch* mit dem Attribut *attr* "
"an der aktuellen Position an"
#:
../../howto/curses.rst:286
msgid
"*y*, *x*, *str* or *ch*"
msgstr
"*y*, *x*, *str* or *ch*"
#:
../../howto/curses.rst:286
msgid
"Move to position *y,x* within the window, and display *str* or *ch*"
msgstr
""
"Springt zur Position *y,x* innerhalb des Fensters und zeigt *str* oder *ch* "
"an"
#:
../../howto/curses.rst:289
msgid
"*y*, *x*, *str* or *ch*, *attr*"
msgstr
"*y*, *x*, *str* or *ch*, *attr*"
#:
../../howto/curses.rst:289
msgid
""
"Move to position *y,x* within the window, and display *str* or *ch*, using "
"attribute *attr*"
msgstr
""
"Springt zur Position *y,x* innerhalb des Fensters und zeigt *str* oder *ch* "
"mit dem Attribut *attr* an"
#:
../../howto/curses.rst:293
msgid
""
"Attributes allow displaying text in highlighted forms such as boldface, "
"underline, reverse code, or in color. They'll be explained in more detail "
"in the next subsection."
msgstr
""
"Attribute erlauben es, Text in hervorgehobenen Formen anzuzeigen, etwa fett, "
"unterstrichen, invertiert oder in Farbe. Sie werden im nächsten "
"Unterabschnitt ausführlicher erklärt."
#:
../../howto/curses.rst:298
msgid
""
"The :meth:`~curses.window.addstr` method takes a Python string or bytestring "
"as the value to be displayed. The contents of bytestrings are sent to the "
"terminal as-is. On a build without wide-character support strings are "
"encoded using the value of the window's :attr:`~window.encoding` attribute; "
"this defaults to the default system encoding as returned "
"by :func:`locale.getencoding`."
msgstr
""
"Die Methode :meth:`~curses.window.addstr` nimmt als anzuzeigenden Wert eine "
"Python-Zeichenkette oder eine Bytefolge. Der Inhalt von Bytefolgen wird "
"unverändert an das Terminal gesendet. In einem Build ohne Unterstützung für "
"breite Zeichen werden Zeichenketten mit dem Wert des "
"Attributs :attr:`~window.encoding` des Fensters kodiert. Dieses entspricht "
"standardmäßig der Standardkodierung des Systems, wie "
"sie :func:`locale.getencoding` zurückgibt."
#:
../../howto/curses.rst:306
msgid
""
"The :meth:`~curses.window.addch` methods take a character, which can be "
"either a string of length 1, a bytestring of length 1, or an integer."
msgstr
""
"Die Methoden :meth:`~curses.window.addch` nehmen ein Zeichen, das entweder "
"eine Zeichenkette der Länge 1, eine Bytefolge der Länge 1 oder eine Ganzzahl "
"sein kann."
#:
../../howto/curses.rst:309
msgid
""
"Constants are provided for the characters of the terminal's alternate "
"character set. For example, :const:`ACS_PLMINUS` is a +/- symbol, "
"and :const:`ACS_ULCORNER` is the upper left corner of a box (handy for "
"drawing borders). You can also use the appropriate Unicode character."
msgstr
""
"Für die Zeichen des alternativen Zeichensatzes des Terminals gibt es "
"Konstanten. So ist zum Beispiel :const:`ACS_PLMINUS` ein Plus-Minus-Zeichen "
"und :const:`ACS_ULCORNER` die linke obere Ecke eines Kastens (praktisch zum "
"Zeichnen von Rahmen). Du kannst auch das passende Unicode-Zeichen verwenden."
#:
../../howto/curses.rst:316
msgid
""
"Windows remember where the cursor was left after the last operation, so if "
"you leave out the *y,x* coordinates, the string or character will be "
"displayed wherever the last operation left off. You can also move the "
"cursor with the ``move(y,x)`` method. Because some terminals always display "
"a flashing cursor, you may want to ensure that the cursor is positioned in "
"some location where it won't be distracting; it can be confusing to have the "
"cursor blinking at some apparently random location."
msgstr
""
"Fenster merken sich, wo der Cursor nach der letzten Operation stehen "
"geblieben ist. Lässt du die Koordinaten *y,x* weg, wird die Zeichenkette "
"oder das Zeichen also dort angezeigt, wo die letzte Operation endete. Du "
"kannst den Cursor auch mit der Methode ``move(y,x)`` bewegen. Weil manche "
"Terminals immer einen blinkenden Cursor anzeigen, solltest du dafür sorgen, "
"dass der Cursor an einer Stelle steht, an der er nicht ablenkt. Es kann "
"verwirren, wenn der Cursor an einer scheinbar zufälligen Stelle blinkt."
#:
../../howto/curses.rst:324
msgid
""
"If your application doesn't need a blinking cursor at all, you can call "
"``curs_set(False)`` to make it invisible. The window "
"method :meth:`~curses.window.leaveok` does something different: when its "
"argument is true, curses leaves the cursor wherever the last update put it, "
"instead of moving it back to the window's cursor position."
msgstr
""
"Wenn deine Anwendung überhaupt keinen blinkenden Cursor braucht, kannst du "
"``curs_set(False)`` aufrufen, um ihn unsichtbar zu machen. Die "
"Fenstermethode :meth:`~curses.window.leaveok` tut etwas anderes: Ist ihr "
"Argument wahr, lässt curses den Cursor dort, wo die letzte Aktualisierung "
"ihn hingesetzt hat, anstatt ihn zurück auf die Cursorposition des Fensters "
"zu bewegen."
#:
../../howto/curses.rst:333
msgid
"Attributes and Color"
msgstr
"Attribute und Farbe"
#:
../../howto/curses.rst:335
msgid
""
"Characters can be displayed in different ways. Status lines in a text-based "
"application are commonly shown in reverse video, or a text viewer may need "
"to highlight certain words. curses supports this by allowing you to specify "
"an attribute for each cell on the screen."
msgstr
""
"Zeichen lassen sich auf verschiedene Weisen anzeigen. Statuszeilen in einer "
"textbasierten Anwendung werden häufig invertiert dargestellt, oder ein "
"Textbetrachter muss bestimmte Wörter hervorheben. curses unterstützt das, "
"indem du für jede Zelle des Bildschirms ein Attribut angeben kannst."
#:
../../howto/curses.rst:340
msgid
""
"An attribute is an integer, each bit representing a different attribute. "
"You can try to display text with multiple attribute bits set, but curses "
"doesn't guarantee that all the possible combinations are available, or that "
"they're all visually distinct. That depends on the ability of the terminal "
"being used, so it's safest to stick to the most commonly available "
"attributes, listed here."
msgstr
""
"Ein Attribut ist eine Ganzzahl, wobei jedes Bit für ein anderes Attribut "
"steht. Du kannst versuchen, Text mit mehreren gesetzten Attributbits "
"anzuzeigen, aber curses sichert nicht zu, dass alle möglichen Kombinationen "
"verfügbar oder visuell voneinander unterscheidbar sind. Das hängt von den "
"Fähigkeiten des verwendeten Terminals ab. Am sichersten bleibst du daher bei "
"den am häufigsten verfügbaren Attributen, die hier aufgeführt sind."
#:
../../howto/curses.rst:348
msgid
"Attribute"
msgstr
"Attribut"
#:
../../howto/curses.rst:350
msgid
":const:`A_BLINK`"
msgstr
":const:`A_BLINK`"
#:
../../howto/curses.rst:350
msgid
"Blinking text"
msgstr
"Blinkender Text"
#:
../../howto/curses.rst:352
msgid
":const:`A_BOLD`"
msgstr
":const:`A_BOLD`"
#:
../../howto/curses.rst:352
msgid
"Extra bright or bold text"
msgstr
"Besonders heller oder fetter Text"
#:
../../howto/curses.rst:354
msgid
":const:`A_DIM`"
msgstr
":const:`A_DIM`"
#:
../../howto/curses.rst:354
msgid
"Half bright text"
msgstr
"Halbheller Text"
#:
../../howto/curses.rst:356
msgid
":const:`A_REVERSE`"
msgstr
":const:`A_REVERSE`"
#:
../../howto/curses.rst:356
msgid
"Reverse-video text"
msgstr
"Invertierter Text"
#:
../../howto/curses.rst:358
msgid
":const:`A_STANDOUT`"
msgstr
":const:`A_STANDOUT`"
#:
../../howto/curses.rst:358
msgid
"The best highlighting mode available"
msgstr
"Die beste verfügbare Hervorhebungsart"
#:
../../howto/curses.rst:360
msgid
":const:`A_UNDERLINE`"
msgstr
":const:`A_UNDERLINE`"
#:
../../howto/curses.rst:360
msgid
"Underlined text"
msgstr
"Unterstrichener Text"
#:
../../howto/curses.rst:363
msgid
""
"So, to display a reverse-video status line on the top line of the screen, "
"you could code::"
msgstr
""
"Um also eine invertierte Statuszeile in der obersten Zeile des Bildschirms "
"anzuzeigen, könntest du Folgendes schreiben::"
#:
../../howto/curses.rst:366
msgid
""
"stdscr.addstr(0, 0,
\"
Current mode: Typing mode
\"
,\n"
" curses.A_REVERSE)\n"
"stdscr.refresh()"
msgstr
""
"stdscr.addstr(0, 0,
\"
Current mode: Typing mode
\"
,\n"
" curses.A_REVERSE)\n"
"stdscr.refresh()"
#:
../../howto/curses.rst:370
msgid
""
"The curses library also supports color on those terminals that provide it. "
"The most common such terminal is probably the Linux console, followed by "
"color xterms."
msgstr
""
"Die curses-Bibliothek unterstützt auf den Terminals, die das anbieten, "
"außerdem Farbe. Das verbreitetste solche Terminal ist wahrscheinlich die "
"Linux-Konsole, gefolgt von farbfähigen xterms."
#:
../../howto/curses.rst:374
msgid
""
"To use color, you must call the :func:`~curses.start_color` function soon "
"after calling :func:`~curses.initscr`, to initialize the default color set "
"(the :func:`curses.wrapper` function does this automatically). Once that's "
"done, the :func:`~curses.has_colors` function returns TRUE if the terminal "
"in use can actually display color. (Note: curses uses the American spelling "
"'color', instead of the Canadian/British spelling 'colour'. If you're used "
"to the British spelling, you'll have to resign yourself to misspelling it "
"for the sake of these functions.)"
msgstr
""
"Um Farbe zu verwenden, musst du kurz nach dem Aufruf "
"von :func:`~curses.initscr` die Funktion :func:`~curses.start_color` "
"aufrufen, um den Standardfarbsatz zu initialisieren (die "
"Funktion :func:`curses.wrapper` tut das automatisch). Ist das erledigt, gibt "
"die Funktion :func:`~curses.has_colors` TRUE zurück, wenn das verwendete "
"Terminal tatsächlich Farbe anzeigen kann. (Beachte: curses verwendet die "
"amerikanische Schreibweise „color“ anstelle der kanadisch-britischen "
"Schreibweise „colour“. Wenn du an die britische Schreibweise gewöhnt bist, "
"musst du dich für diese Funktionen damit abfinden, sie falsch zu schreiben.)"
#:
../../howto/curses.rst:384
msgid
""
"The curses library maintains a finite number of color pairs, containing a "
"foreground (or text) color and a background color. You can get the "
"attribute value corresponding to a color pair with "
"the :func:`~curses.color_pair` function; this can be bitwise-OR'ed with "
"other attributes such as :const:`A_REVERSE`, but again, such combinations "
"are not guaranteed to work on all terminals."
msgstr
""
"Die curses-Bibliothek führt eine begrenzte Anzahl von Farbpaaren, die "
"jeweils eine Vordergrundfarbe (oder Textfarbe) und eine Hintergrundfarbe "
"enthalten. Den Attributwert, der zu einem Farbpaar gehört, bekommst du mit "
"der Funktion :func:`~curses.color_pair`. Dieser lässt sich bitweise mit "
"anderen Attributen wie :const:`A_REVERSE` ODER-verknüpfen, aber auch hier "
"ist nicht zugesichert, dass solche Kombinationen auf allen Terminals "
"funktionieren."
#:
../../howto/curses.rst:391
msgid
"An example, which displays a line of text using color pair 1::"
msgstr
"Ein Beispiel, das eine Textzeile mit dem Farbpaar 1 anzeigt::"
#:
../../howto/curses.rst:393
msgid
""
"stdscr.addstr(
\"
Pretty text
\"
, curses.color_pair(1))\n"
"stdscr.refresh()"
msgstr
""
"stdscr.addstr(
\"
Pretty text
\"
, curses.color_pair(1))\n"
"stdscr.refresh()"
#:
../../howto/curses.rst:396
msgid
""
"As I said before, a color pair consists of a foreground and background "
"color. The ``init_pair(n, f, b)`` function changes the definition of color "
"pair *n*, to foreground color f and background color b. Color pair 0 is "
"hard-wired to white on black, and cannot be changed."
msgstr
""
"Wie gesagt besteht ein Farbpaar aus einer Vordergrund- und einer "
"Hintergrundfarbe. Die Funktion ``init_pair(n, f, b)`` ändert die Definition "
"des Farbpaars *n* auf die Vordergrundfarbe f und die Hintergrundfarbe b. Das "
"Farbpaar 0 ist fest auf Weiß auf Schwarz verdrahtet und lässt sich nicht "
"ändern."
#:
../../howto/curses.rst:401
msgid
""
"Colors are numbered, and :func:`start_color` initializes 8 basic colors when "
"it activates color mode. They are: 0:black, 1:red, 2:green, 3:yellow, "
"4:blue, 5:magenta, 6:cyan, and 7:white. The :mod:`curses` module defines "
"named constants for each of these "
"colors: :const:`curses.COLOR_BLACK`, :const:`curses.COLOR_RED`, and so forth."
msgstr
""
"Farben sind durchnummeriert, und :func:`start_color` initialisiert beim "
"Einschalten des Farbmodus 8 Grundfarben. Es sind: 0: Schwarz, 1: Rot, 2: "
"Grün, 3: Gelb, 4: Blau, 5: Magenta, 6: Cyan und 7: Weiß. Das "
"Modul :mod:`curses` definiert für jede dieser Farben eine benannte "
"Konstante: :const:`curses.COLOR_BLACK`, :const:`curses.COLOR_RED` und so "
"weiter."
#:
../../howto/curses.rst:407
msgid
""
"Let's put all this together. To change color 1 to red text on a white "
"background, you would call::"
msgstr
""
"Fügen wir das alles zusammen. Um die Farbe 1 auf roten Text auf weißem "
"Hintergrund zu ändern, würdest du Folgendes aufrufen::"
#:
../../howto/curses.rst:410
msgid
"curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)"
msgstr
"curses.init_pair(1, curses.COLOR_RED, curses.COLOR_WHITE)"
#:
../../howto/curses.rst:412
msgid
""
"When you change a color pair, any text already displayed using that color "
"pair will change to the new colors. You can also display new text in this "
"color with::"
msgstr
""
"Wenn du ein Farbpaar änderst, wechselt aller bereits mit diesem Farbpaar "
"angezeigte Text auf die neuen Farben. Du kannst neuen Text in dieser Farbe "
"auch so anzeigen::"
#:
../../howto/curses.rst:416
msgid
"stdscr.addstr(0,0,
\"
RED ALERT!
\"
, curses.color_pair(1))"
msgstr
"stdscr.addstr(0,0,
\"
RED ALERT!
\"
, curses.color_pair(1))"
#:
../../howto/curses.rst:418
msgid
""
"Very fancy terminals can change the definitions of the actual colors to a "
"given RGB value. This lets you change color 1, which is usually red, to "
"purple or blue or any other color you like. Unfortunately, the Linux "
"console doesn't support this, so I'm unable to try it out, and can't provide "
"any examples. You can check if your terminal can do this by "
"calling :func:`~curses.can_change_color`, which returns ``True`` if the "
"capability is there. If you're lucky enough to have such a talented "
"terminal, consult your system's man pages for more information."
msgstr
""
"Sehr ausgefeilte Terminals können die Definitionen der tatsächlichen Farben "
"auf einen gegebenen RGB-Wert ändern. Damit kannst du die Farbe 1, die "
"üblicherweise Rot ist, auf Violett, Blau oder jede andere Farbe ändern, die "
"du magst. Leider unterstützt die Linux-Konsole das nicht, ich kann es daher "
"nicht ausprobieren und keine Beispiele geben. Ob dein Terminal das kann, "
"prüfst du mit einem Aufruf von :func:`~curses.can_change_color`, das "
"``True`` zurückgibt, wenn die Fähigkeit vorhanden ist. Wenn du das Glück "
"hast, ein so begabtes Terminal zu besitzen, findest du weitere Informationen "
"in den Handbuchseiten deines Systems."
#:
../../howto/curses.rst:429
msgid
"User Input"
msgstr
"Benutzereingaben"
#:
../../howto/curses.rst:431
msgid
""
"The C curses library offers only very simple input mechanisms. "
"Python's :mod:`curses` module adds a basic text-input widget. (Other "
"libraries such as :pypi:`Urwid` have more extensive collections of widgets.)"
msgstr
""
"Die C-Bibliothek curses bietet nur sehr einfache Eingabemechanismen. Das "
"Python-Modul :mod:`curses` ergänzt ein grundlegendes Bedienelement zur "
"Texteingabe. (Andere Bibliotheken wie :pypi:`Urwid` haben umfangreichere "
"Sammlungen von Bedienelementen.)"
View remainder of file in raw view
Back
|
FazBrowse Home
|
New Git URL