forked from python/python-docs-el
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextending.po
More file actions
607 lines (541 loc) · 30 KB
/
extending.po
File metadata and controls
607 lines (541 loc) · 30 KB
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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-05-10 10:19+0300\n"
"PO-Revision-Date: 2024-10-31 12:22+0200\n"
"Last-Translator: Panagiotis Skias <panagiotis.skias@gmail.com>\n"
"Language-Team: PyGreece <organizers@pygreece.org>\n"
"Language: el\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.5\n"
#: faq/extending.rst:3
msgid "Extending/Embedding FAQ"
msgstr "Συχνές ερωτήσεις επέκτασης/ενσωμάτωσης"
#: faq/extending.rst:6
msgid "Contents"
msgstr "Περιεχόμενα"
#: faq/extending.rst:16
msgid "Can I create my own functions in C?"
msgstr "Μπορώ να δημιουργήσω τις δικές μου συναρτήσεις στη C;"
#: faq/extending.rst:18
msgid ""
"Yes, you can create built-in modules containing functions, variables, "
"exceptions and even new types in C. This is explained in the document :ref:"
"`extending-index`."
msgstr ""
"Ναι, μπορείτε να δημιουργήσετε ενσωματωμένα (built-in) modules που περιέχουν "
"συναρτήσεις, μεταβλητές, εξαιρέσεις και ακόμη και νέους τύπους στην C. Αυτό "
"εξηγείται στο έγγραφο :ref:`extending-index`."
#: faq/extending.rst:22
msgid "Most intermediate or advanced Python books will also cover this topic."
msgstr ""
"Τα περισσότερα βιβλία μεσαίας ή προηγμένης Python θα καλύπτουν επίσης αυτό "
"το θέμα."
#: faq/extending.rst:26
msgid "Can I create my own functions in C++?"
msgstr "Μπορώ να δημιουργήσω τις δικές μου συναρτήσεις στη C++;"
#: faq/extending.rst:28
msgid ""
"Yes, using the C compatibility features found in C++. Place ``extern "
"\"C\" { ... }`` around the Python include files and put ``extern \"C\"`` "
"before each function that is going to be called by the Python interpreter. "
"Global or static C++ objects with constructors are probably not a good idea."
msgstr ""
"Ναι, χρησιμοποιώντας τις δυνατότητες συμβατότητας C που βρίσκονται στη C++. "
"Τοποθετήστε το ``extern \"C\" { ... }`` γύρω από την Python να περιλαμβάνει "
"αρχεία και τοποθετήστε το ``extern \"C\"`` πριν από κάθε συνάρτηση που "
"πρόκειται να κληθεί από τον διερμηνέα της Python. Τα καθολικά ή τα στατικά "
"αντικείμενα C++ με constructors μάλλον δεν είναι καλή ιδέα."
#: faq/extending.rst:37
msgid "Writing C is hard; are there any alternatives?"
msgstr "Το να γράψει C κάποιος είναι δύσκολο· υπάρχουν άλλες εναλλακτικές;"
#: faq/extending.rst:39
msgid ""
"There are a number of alternatives to writing your own C extensions, "
"depending on what you're trying to do."
msgstr ""
"Υπάρχουν διάφορες εναλλακτικές λύσεις για να γράψετε τις δικές σας "
"επεκτάσεις C, ανάλογα με το τι προσπαθείτε να κάνετε."
#: faq/extending.rst:44
msgid ""
"`Cython <https://cython.org>`_ and its relative `Pyrex <https://www.csse."
"canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers that accept a "
"slightly modified form of Python and generate the corresponding C code. "
"Cython and Pyrex make it possible to write an extension without having to "
"learn Python's C API."
msgstr ""
"Το `Cython <https://cython.org>`_ και το σχετικό του `Pyrex <https://www."
"csse.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ είναι μεταγλωττιστές που "
"δέχονται ελαφρώς τροποποιημένη μορφή της Python και δημιουργούν τον "
"αντίστοιχο C κώδικα. Το Cython και το Pyrex καθιστούν δυνατή τη σύνταξη "
"μιας επέκτασης χωρίς να χρειάζεται να μάθετε το C API της Python."
#: faq/extending.rst:50
msgid ""
"If you need to interface to some C or C++ library for which no Python "
"extension currently exists, you can try wrapping the library's data types "
"and functions with a tool such as `SWIG <https://www.swig.org>`_. `SIP "
"<https://github.com/Python-SIP/sip>`__, `CXX <https://cxx.sourceforge.net/"
">`_ `Boost <https://www.boost.org/libs/python/doc/index.html>`_, or `Weave "
"<https://github.com/scipy/weave>`_ are also alternatives for wrapping C++ "
"libraries."
msgstr ""
"Εάν χρειάζεται να συνδεθείτε με κάποια βιβλιοθήκη C ή C++ για την οποία δεν "
"υπάρχει αυτήν τη στιγμή επέκταση Python, μπορείτε να δοκιμάσετε να "
"αναδιπλώσετε τους τύπους δεδομένων και τις συναρτήσεις της βιβλιοθήκης με "
"ένα εργαλείο όπως `SWIG <https://www.swig.org>`_. `SIP <https://github.com/"
"Python-SIP/sip>`__, `CXX <https://cxx.sourceforge.net/>`_ `Boost <https://"
"www.boost.org/libs/python/doc/index.html>`_, ή `Weave <https://github.com/"
"scipy/weave>`_ είναι επίσης εναλλακτικές λύσεις για την αναδίπλωση "
"βιβλιοθηκών C++."
#: faq/extending.rst:61
msgid "How can I execute arbitrary Python statements from C?"
msgstr "Πως μπορώ να εκτελέσω αυθαίρετες δηλώσεις Python από το C;"
#: faq/extending.rst:63
msgid ""
"The highest-level function to do this is :c:func:`PyRun_SimpleString` which "
"takes a single string argument to be executed in the context of the module "
"``__main__`` and returns ``0`` for success and ``-1`` when an exception "
"occurred (including :exc:`SyntaxError`). If you want more control, use :c:"
"func:`PyRun_String`; see the source for :c:func:`PyRun_SimpleString` in "
"``Python/pythonrun.c``."
msgstr ""
"Η συνάρτηση υψηλότερου επιπέδου για να γίνει αυτό είναι η :c:func:"
"`PyRun_SimpleString` η οποία εκτελεί ένα όρισμα συμβολοσειράς στο πλαίσιο "
"της ενότητας ``__main__`` και επιστρέφει ``0`` για επιτυχία και ``-1`` όταν "
"συμβαίνει μια εξαίρεση (συμπεριλαμβανομένου του :exc:`SyntaxError`). Εάν "
"θέλετε περισσότερο έλεγχο, χρησιμοποιήστε :c:func:`PyRun_String`· δείτε τον "
"πηγαίο κώδικα :c:func:`PyRun_SimpleString` στο``Python/pythonrun.c``."
#: faq/extending.rst:72
msgid "How can I evaluate an arbitrary Python expression from C?"
msgstr "Πώς μπορώ να αξιολογήσω μια αυθαίρετη έκφραση Python από τη C;"
#: faq/extending.rst:74
msgid ""
"Call the function :c:func:`PyRun_String` from the previous question with the "
"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it "
"and returns its value."
msgstr ""
"Καλέστε τη συνάρτηση :c:func:`PyRun_String` από την προηγούμενη ερώτηση με "
"το σύμβολο έναρξης :c:data:`Py_eval_input`· αναλύει μια παράσταση, την "
"αξιολογεί και επιστρέφει την τιμή της."
#: faq/extending.rst:80
msgid "How do I extract C values from a Python object?"
msgstr "Πως μπορώ να εξάγω τιμές C από ένα αντικείμενο Python;"
#: faq/extending.rst:82
msgid ""
"That depends on the object's type. If it's a tuple, :c:func:`PyTuple_Size` "
"returns its length and :c:func:`PyTuple_GetItem` returns the item at a "
"specified index. Lists have similar functions, :c:func:`PyList_Size` and :c:"
"func:`PyList_GetItem`."
msgstr ""
"Αυτό εξαρτάται από τον τύπο του αντικειμένου. Εάν είναι μια πλειάδα "
"(tuple), :c:func:`PyTuple_Size` επιστρέφει το μήκος του και το :c:func:"
"`PyTuple_GetItem` επιστρέφει το στοιχείο σε ένα καθορισμένο index. Οι "
"λίστες έχουν παρόμοιες συναρτήσεις, :c:func:`PyList_Size` και :c:func:"
"`PyList_GetItem`."
#: faq/extending.rst:87
msgid ""
"For bytes, :c:func:`PyBytes_Size` returns its length and :c:func:"
"`PyBytes_AsStringAndSize` provides a pointer to its value and its length. "
"Note that Python bytes objects may contain null bytes so C's :c:func:`!"
"strlen` should not be used."
msgstr ""
"Για bytes, :c:func:`PyBytes_Size` επιστρέφει το μήκος του και το :c:func:"
"`PyBytes_AsStringAndSize` παρέχει έναν δείκτη στην τιμή και το μήκος του. "
"Λάβετε υπόψη ότι τα αντικείμενα byte της Python μπορεί να περιέχουν null "
"byte, επομένως η :c:func:`!strlen` της C δεν πρέπει να χρησιμοποιείται."
#: faq/extending.rst:92
msgid ""
"To test the type of an object, first make sure it isn't ``NULL``, and then "
"use :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:"
"`PyList_Check`, etc."
msgstr ""
"Για να ελέγξετε τον τύπο ενός αντικειμένου, πρώτα βεβαιωθείτε ότι δεν είναι "
"``NULL``, και μετά χρησιμοποιήστε τα :c:func:`PyBytes_Check`, :c:func:"
"`PyTuple_Check`, :c:func:`PyList_Check`, κλπ."
#: faq/extending.rst:95
msgid ""
"There is also a high-level API to Python objects which is provided by the so-"
"called 'abstract' interface -- read ``Include/abstract.h`` for further "
"details. It allows interfacing with any kind of Python sequence using calls "
"like :c:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, etc. as well "
"as many other useful protocols such as numbers (:c:func:`PyNumber_Index` et "
"al.) and mappings in the PyMapping APIs."
msgstr ""
"Υπάρχει επίσης ένα API υψηλού επιπέδου για αντικείμενα Python που παρέχεται "
"από τη λεγόμενη 'abstract' διεπαφή (interface) -- διαβάστε ``Include/"
"abstract.h`` για περισσότερες λεπτομέρειες. Επιτρέπει τη διασύνδεση με κάθε "
"είδους ακολουθίας Python χρησιμοποιώντας κλήσεις όπως :c:func:"
"`PySequence_Length`, :c:func:`PySequence_GetItem`, κλπ. καθώς και πολλά άλλα "
"χρήσιμα πρωτόκολλα όπως αριθμοί (:c:func:`PyNumber_Index` et al.) και "
"αντιστοιχίσεις στον PyMapping APIs."
#: faq/extending.rst:104
msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
msgstr ""
"Πώς μπορώ να χρησιμοποιήσω την Py_BuildValue() για να δημιουργήσω μια "
"πλειάδα (tuple) αυθαίρετου μήκους;"
#: faq/extending.rst:106
msgid "You can't. Use :c:func:`PyTuple_Pack` instead."
msgstr "Δεν μπορείς. Χρησιμοποιήστε το :c:func:`PyTuple_Pack`."
#: faq/extending.rst:110
msgid "How do I call an object's method from C?"
msgstr "Πώς καλώ τη μέθοδο ενός αντικειμένου από τη C;"
#: faq/extending.rst:112
msgid ""
"The :c:func:`PyObject_CallMethod` function can be used to call an arbitrary "
"method of an object. The parameters are the object, the name of the method "
"to call, a format string like that used with :c:func:`Py_BuildValue`, and "
"the argument values::"
msgstr ""
"Η συνάρτηση :c:func:`PyObject_CallMethod` μπορεί να χρησιμοποιηθεί για την "
"κλήση μιας αυθαίρετης μεθόδου ενός αντικειμένου. Οι παράμετροι είναι το "
"αντικείμενο, το όνομα της μεθόδου προς κλήση, μια συμβολοσειρά μορφής όπως "
"αυτή που χρησιμοποιείται με τη :c:func:`Py_BuildValue`, και τις τιμές "
"ορίσματος::"
#: faq/extending.rst:117
msgid ""
"PyObject *\n"
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
" const char *arg_format, ...);"
msgstr ""
"PyObject *\n"
"PyObject_CallMethod(PyObject *object, const char *method_name,\n"
" const char *arg_format, ...);"
#: faq/extending.rst:121
msgid ""
"This works for any object that has methods -- whether built-in or user-"
"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
"return value."
msgstr ""
"Αυτό λειτουργεί για κάθε αντικείμενο που έχει μεθόδους -- είτε είναι "
"ενσωματωμένες είτε καθορίζονται από το χρήστη. Είστε υπεύθυνοι εάν τελικά "
"χρησιμοποιήσετε :c:func:`Py_DECREF` στην τιμή επιστροφής."
#: faq/extending.rst:124
msgid ""
"To call, e.g., a file object's \"seek\" method with arguments 10, 0 "
"(assuming the file object pointer is \"f\")::"
msgstr ""
"Για να καλέσετε, π.χ., τη μέθοδο \"seek\" ενός αντικειμένου αρχείου με "
"ορίσματα 10, 0 (υποθέτοντας ότι ο δείκτης του αντικειμένου αρχείου είναι "
"\"f\")::"
#: faq/extending.rst:127
msgid ""
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
"if (res == NULL) {\n"
" ... an exception occurred ...\n"
"}\n"
"else {\n"
" Py_DECREF(res);\n"
"}"
msgstr ""
"res = PyObject_CallMethod(f, \"seek\", \"(ii)\", 10, 0);\n"
"if (res == NULL) {\n"
" ... an exception occurred ...\n"
"}\n"
"else {\n"
" Py_DECREF(res);\n"
"}"
#: faq/extending.rst:135
msgid ""
"Note that since :c:func:`PyObject_CallObject` *always* wants a tuple for the "
"argument list, to call a function without arguments, pass \"()\" for the "
"format, and to call a function with one argument, surround the argument in "
"parentheses, e.g. \"(i)\"."
msgstr ""
"Σημειώστε ότι επειδή το :c:func:`PyObject_CallObject` *πάντα* θέλει μια "
"πλειάδα (tuple) για τη λίστα ορισμάτων, για να καλέσει μια συνάρτηση χωρίς "
"ορίσματα, να περάσει \"()\" για τη μορφή και να καλέσει μια συνάρτηση με ένα "
"όρισμα, περιβάλλουν το όρισμα σε παρένθεση, π.χ. \"(i)\"."
#: faq/extending.rst:142
msgid ""
"How do I catch the output from PyErr_Print() (or anything that prints to "
"stdout/stderr)?"
msgstr ""
"Πώς μπορώ να κάνω catch την έξοδο από την PyErr_Print() (ή οτιδήποτε "
"εκτυπώνεται σε stdout/stderr);"
#: faq/extending.rst:144
msgid ""
"In Python code, define an object that supports the ``write()`` method. "
"Assign this object to :data:`sys.stdout` and :data:`sys.stderr`. Call "
"print_error, or just allow the standard traceback mechanism to work. Then, "
"the output will go wherever your ``write()`` method sends it."
msgstr ""
"Στον κώδικα Python, ορίστε ένα αντικείμενο που υποστηρίζει τη μέθοδο "
"``write()``. Αντιστοιχίστε αυτό το αντικείμενο στα :data:`sys.stdout` και :"
"data:`sys.stderr`. Καλέστε το print_error, ή απλώς επιτρέψτε στον τυπικό "
"μηχανισμό ανίχνευσης να λειτουργήσει. Στη συνέχεια, η έξοδος θα πάει "
"οπουδήποτε την στείλει η μέθοδος ``write()``."
#: faq/extending.rst:149
msgid "The easiest way to do this is to use the :class:`io.StringIO` class:"
msgstr ""
"Ο ευκολότερος τρόπος για να το κάνετε αυτό είναι να χρησιμοποιήσετε την "
"κλάση :class:`io.StringIO`:"
#: faq/extending.rst:151
msgid ""
">>> import io, sys\n"
">>> sys.stdout = io.StringIO()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(sys.stdout.getvalue())\n"
"foo\n"
"hello world!"
msgstr ""
">>> import io, sys\n"
">>> sys.stdout = io.StringIO()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(sys.stdout.getvalue())\n"
"foo\n"
"hello world!"
#: faq/extending.rst:161
msgid "A custom object to do the same would look like this:"
msgstr "Ένα προσαρμοσμένο αντικείμενο για να κάνει το ίδιο θα μοιάζει με αυτό:"
#: faq/extending.rst:163
msgid ""
">>> import io, sys\n"
">>> class StdoutCatcher(io.TextIOBase):\n"
"... def __init__(self):\n"
"... self.data = []\n"
"... def write(self, stuff):\n"
"... self.data.append(stuff)\n"
"...\n"
">>> import sys\n"
">>> sys.stdout = StdoutCatcher()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(''.join(sys.stdout.data))\n"
"foo\n"
"hello world!"
msgstr ""
">>> import io, sys\n"
">>> class StdoutCatcher(io.TextIOBase):\n"
"... def __init__(self):\n"
"... self.data = []\n"
"... def write(self, stuff):\n"
"... self.data.append(stuff)\n"
"...\n"
">>> import sys\n"
">>> sys.stdout = StdoutCatcher()\n"
">>> print('foo')\n"
">>> print('hello world!')\n"
">>> sys.stderr.write(''.join(sys.stdout.data))\n"
"foo\n"
"hello world!"
#: faq/extending.rst:182
msgid "How do I access a module written in Python from C?"
msgstr ""
"Πως μπορώ να αποκτήσω πρόσβαση σε ένα module γραμμένο σε Python από τη C;"
#: faq/extending.rst:184
msgid "You can get a pointer to the module object as follows::"
msgstr "Μπορείτε να λάβετε έναν δείκτη στο αντικείμενο του module ως εξής::"
#: faq/extending.rst:186
msgid "module = PyImport_ImportModule(\"<modulename>\");"
msgstr "module = PyImport_ImportModule(\"<modulename>\");"
#: faq/extending.rst:188
msgid ""
"If the module hasn't been imported yet (i.e. it is not yet present in :data:"
"`sys.modules`), this initializes the module; otherwise it simply returns the "
"value of ``sys.modules[\"<modulename>\"]``. Note that it doesn't enter the "
"module into any namespace -- it only ensures it has been initialized and is "
"stored in :data:`sys.modules`."
msgstr ""
"Εάν το module δεν έχει εισαχθεί ακόμα (δηλαδή δεν υπάρχει ακόμα στο :data:"
"`sys.modules`), αυτό αρχικοποιεί το module· διαφορετικά απλώς επιστρέφει την "
"τιμή του ``sys.modules[\"<modulename>\"]``. Σημειώστε ότι δεν εισάγει το "
"module σε κανένα namespace -- διασφαλίζει μόνο ότι έχει αρχικοποιηθεί και "
"ότι είναι αποθηκευμένη στο :data:`sys.modules`."
#: faq/extending.rst:194
msgid ""
"You can then access the module's attributes (i.e. any name defined in the "
"module) as follows::"
msgstr ""
"Μπορείτε στη συνέχεια να αποκτήσετε πρόσβαση στα χαρακτηριστικά του module "
"(δηλαδή οποιοδήποτε όνομα ορίζεται στο module) ως εξής::"
#: faq/extending.rst:197
msgid "attr = PyObject_GetAttrString(module, \"<attrname>\");"
msgstr "attr = PyObject_GetAttrString(module, \"<attrname>\");"
#: faq/extending.rst:199
msgid ""
"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the "
"module also works."
msgstr ""
"Η κλήση :c:func:`PyObject_SetAttrString` για αντιστοίχιση σε μεταβλητές στο "
"module λειτουργεί επίσης."
#: faq/extending.rst:204
msgid "How do I interface to C++ objects from Python?"
msgstr "Πως διασυνδέομαι με αντικείμενα C++ από την Python;"
#: faq/extending.rst:206
msgid ""
"Depending on your requirements, there are many approaches. To do this "
"manually, begin by reading :ref:`the \"Extending and Embedding\" document "
"<extending-index>`. Realize that for the Python run-time system, there "
"isn't a whole lot of difference between C and C++ -- so the strategy of "
"building a new Python type around a C structure (pointer) type will also "
"work for C++ objects."
msgstr ""
"Ανάλογα με τις απαιτήσεις σας, υπάρχουν πολλές προσεγγίσεις. Για να το "
"κάνετε αυτό χειροκίνητα, ξεκινήστε διαβάζοντας το :ref:`the \"Extending and "
"Embedding\" document <extending-index>` . Συνειδητοποιήστε ότι για το "
"σύστημα χρόνου εκτελεστή Python, δεν υπάρχει μεγάλη διαφορά μεταξύ C και C++ "
"-- επομένως η στρατηγική της δημιουργίας ενός νέου τύπου Python γύρω από "
"έναν τύπο δομής C (δείκτη) θα λειτουργήσει επίσης για αντικείμενα C++."
#: faq/extending.rst:212
msgid "For C++ libraries, see :ref:`c-wrapper-software`."
msgstr "Για βιβλιοθήκες C++, δείτε :ref:`c-wrapper-software`."
#: faq/extending.rst:216
msgid "I added a module using the Setup file and the make fails; why?"
msgstr ""
"Πρόσθεσα ένα module χρησιμοποιώντας το αρχείο Setup και το make αποτυγχάνει· "
"γιατί;"
#: faq/extending.rst:218
msgid ""
"Setup must end in a newline, if there is no newline there, the build process "
"fails. (Fixing this requires some ugly shell script hackery, and this bug "
"is so minor that it doesn't seem worth the effort.)"
msgstr ""
"Το setup πρέπει να τελειώνει σε μια νέα γραμμή, αν δεν υπάρχει νέα γραμμή, η "
"διαδικασία build αποτυγχάνει. (Για να διορθωθεί αυτό απαιτεί κάποιο "
"κακόβουλο script shell, και αυτό το σφάλμα είναι τόσο μικρό που δεν φαίνεται "
"να αξίζει τον κόπο.)"
#: faq/extending.rst:224
msgid "How do I debug an extension?"
msgstr "Πως κάνω debug μια επέκταση;"
#: faq/extending.rst:226
msgid ""
"When using GDB with dynamically loaded extensions, you can't set a "
"breakpoint in your extension until your extension is loaded."
msgstr ""
"Όταν χρησιμοποιείτε το GDB με δυναμικά φορτωμένες επεκτάσεις, δεν μπορείτε "
"να ορίσετε σημείο διακοπής στην επέκταση σας μέχρι να φορτωθεί η επέκτασής "
"σας."
#: faq/extending.rst:229
msgid "In your ``.gdbinit`` file (or interactively), add the command:"
msgstr "Στο αρχείο σας ``.gdbinit`` (ή διαδραστικά), προσθέστε την εντολή:"
#: faq/extending.rst:231
msgid "br _PyImport_LoadDynamicModule"
msgstr "br _PyImport_LoadDynamicModule"
#: faq/extending.rst:235
msgid "Then, when you run GDB:"
msgstr "Στη συνέχεια, όταν εκτελείτε το GDB:"
#: faq/extending.rst:237
msgid ""
"$ gdb /local/bin/python\n"
"gdb) run myscript.py\n"
"gdb) continue # repeat until your extension is loaded\n"
"gdb) finish # so that your extension is loaded\n"
"gdb) br myfunction.c:50\n"
"gdb) continue"
msgstr ""
"$ gdb /local/bin/python\n"
"gdb) run myscript.py\n"
"gdb) continue # repeat until your extension is loaded\n"
"gdb) finish # so that your extension is loaded\n"
"gdb) br myfunction.c:50\n"
"gdb) continue"
#: faq/extending.rst:247
msgid ""
"I want to compile a Python module on my Linux system, but some files are "
"missing. Why?"
msgstr ""
"Θέλω να κάνω compile ένα Python module στο σύστημα Linux μου, αλλά λείπουν "
"ορισμένα αρχεία. Γιατί;"
#: faq/extending.rst:249
msgid ""
"Most packaged versions of Python omit some files required for compiling "
"Python extensions."
msgstr ""
"Οι περισσότερες συσκευασμένες εκδόσεις της Python παραλείπουν ορισμένα "
"αρχεία που απαιτούνται για τη μεταγλώττιση των επεκτάσεων Python."
#: faq/extending.rst:252
msgid "For Red Hat, install the python3-devel RPM to get the necessary files."
msgstr ""
"Για το Red Hat, εγκαταστήστε το RPM της python3-devel για να λάβετε τα "
"απαραίτητα αρχεία."
#: faq/extending.rst:254
msgid "For Debian, run ``apt-get install python3-dev``."
msgstr "Για το Debian, εκτελέστε το ``apt-get install python3-dev``."
#: faq/extending.rst:257
msgid "How do I tell \"incomplete input\" from \"invalid input\"?"
msgstr ""
"Πώς μπορώ να ξεχωρίσω την \"ελλιπή εισαγωγή\" από την \"έγκυρη εισαγωγή\";"
#: faq/extending.rst:259
msgid ""
"Sometimes you want to emulate the Python interactive interpreter's behavior, "
"where it gives you a continuation prompt when the input is incomplete (e.g. "
"you typed the start of an \"if\" statement or you didn't close your "
"parentheses or triple string quotes), but it gives you a syntax error "
"message immediately when the input is invalid."
msgstr ""
"Μερικές φορές θέλετε να μιμηθείτε τη συμπεριφορά του διαδραστικού διερμηνέα "
"Python, όπου σας δίνει ένα συνεχόμενο prompt όταν η είσοδος είναι ελλιπής (π."
"χ. πληκτρολογήσατε την αρχή μιας δήλωσης \"if\" ή δεν κλείσατε τις "
"παρενθέσεις ή τα τριπλά εισαγωγικά συμβολοσειρών), αλλά σας δίνει ένα μήνυμα "
"συντακτικού σφάλματος αμέσως όταν η εισαγωγή δεν είναι έγκυρη."
#: faq/extending.rst:265
msgid ""
"In Python you can use the :mod:`codeop` module, which approximates the "
"parser's behavior sufficiently. IDLE uses this, for example."
msgstr ""
"Στην Python μπορείτε να χρησιμοποιήσετε το module :mod:`codeop`, η οποία "
"προσεγγίζει επαρκώς τη συμπεριφορά του parser. Το IDLE χρησιμοποιεί αυτό, "
"για παράδειγμα."
#: faq/extending.rst:268
msgid ""
"The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` "
"(perhaps in a separate thread) and let the Python interpreter handle the "
"input for you. You can also set the :c:func:`PyOS_ReadlineFunctionPointer` "
"to point at your custom input function. See ``Modules/readline.c`` and "
"``Parser/myreadline.c`` for more hints."
msgstr ""
"Ο ευκολότερος τρόπος για να το κάνετε στη C είναι να καλέσετε τη :c:func:"
"`PyRun_InteractiveLoop` (ίσως σε ξεχωριστό νήμα (thread)) και να αφήσετε τον "
"διερμηνέα Python να χειριστεί την είσοδο για εσάς. Μπορείτε επίσης να "
"ορίσετε :c:func:`PyOS_ReadlineFunctionPointer` για να δείξετε την δικιάς "
"προσαρμοσμένη συνάρτηση εισαγωγής. Δείτε τα ``Modules/readline.c`` και "
"``Parser/myreadline.c`` για περισσότερες συμβουλές."
#: faq/extending.rst:275
msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?"
msgstr ""
"Πώς μπορώ να βρω απροσδιόριστα σύμβολα g++ __builtin_new ή __pure_virtual;"
#: faq/extending.rst:277
msgid ""
"To dynamically load g++ extension modules, you must recompile Python, relink "
"it using g++ (change LINKCC in the Python Modules Makefile), and link your "
"extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)."
msgstr ""
"Για δυναμική φόρτωση module επέκτασης g++, πρέπει να κάνετε recompile την "
"Python, να τη συνδέσετε ξανά χρησιμοποιώντας g++ (αλλάξτε το LINKCC στο "
"Python Modules Makefile), και να συνδέσετε το module επέκτασης σας "
"χρησιμοποιώντας g++ (π.χ. ``g++ -shared -o mymodule.so mymodule.o``)."
#: faq/extending.rst:283
msgid ""
"Can I create an object class with some methods implemented in C and others "
"in Python (e.g. through inheritance)?"
msgstr ""
"Μπορώ να δημιουργήσω μια κλάση αντικειμένου με ορισμένες μεθόδους που "
"υλοποιούνται στη C και άλλες στη Python (π.χ. μέσω κληρονομικότητας);"
#: faq/extending.rst:285
msgid ""
"Yes, you can inherit from built-in classes such as :class:`int`, :class:"
"`list`, :class:`dict`, etc."
msgstr ""
"Ναι, μπορείτε να κληρονομήσετε από ενσωματωμένες (built-in) κλάσεις όπως :"
"class:`int`, :class:`list`, :class:`dict`, κ.λπ."
#: faq/extending.rst:288
msgid ""
"The Boost Python Library (BPL, https://www.boost.org/libs/python/doc/index."
"html) provides a way of doing this from C++ (i.e. you can inherit from an "
"extension class written in C++ using the BPL)."
msgstr ""
"Η βιβλιοθήκη Boost Python Library (BPL, https://www.boost.org/libs/python/"
"doc/index.html) παρέχει ένα τρόπο για να γίνει αυτό από την C++ (δηλαδή "
"μπορείτε να κληρονομήσετε από μια κλάση επέκτασης γραμμένη σε C++ "
"χρησιμοποιώντας το BPL)."