diff --git a/faq/extending.po b/faq/extending.po index 5b673579e..e53140a07 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -1,378 +1,521 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2021, Python Software Foundation -# This file is distributed under the same license as the Python package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Python 3.10\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-17 23:20+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\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 "" - -#: 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 "" - -#: faq/extending.rst:22 -msgid "Most intermediate or advanced Python books will also cover this topic." -msgstr "" - -#: faq/extending.rst:26 -msgid "Can I create my own functions in C++?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:37 -msgid "Writing C is hard; are there any alternatives?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:44 -msgid "" -"`Cython `_ and its relative `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 "" - -#: 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 `_. `SIP " -"`__, `CXX `_ `Boost `_, or `Weave `_ are also alternatives " -"for wrapping C++ libraries." -msgstr "" - -#: faq/extending.rst:61 -msgid "How can I execute arbitrary Python statements from C?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:72 -msgid "How can I evaluate an arbitrary Python expression from C?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:80 -msgid "How do I extract C values from a Python object?" -msgstr "" - -#: 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:`PyListSize` and :c:" -"func:`PyList_GetItem`." -msgstr "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: faq/extending.rst:104 -msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" -msgstr "" - -#: faq/extending.rst:106 -msgid "You can't. Use :c:func:`PyTuple_Pack` instead." -msgstr "" - -#: faq/extending.rst:110 -msgid "How do I call an object's method from C?" -msgstr "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: 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 "" - -#: faq/extending.rst:142 -msgid "" -"How do I catch the output from PyErr_Print() (or anything that prints to " -"stdout/stderr)?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:149 -msgid "The easiest way to do this is to use the :class:`io.StringIO` class:" -msgstr "" - -#: faq/extending.rst:161 -msgid "A custom object to do the same would look like this:" -msgstr "" - -#: faq/extending.rst:182 -msgid "How do I access a module written in Python from C?" -msgstr "" - -#: faq/extending.rst:184 -msgid "You can get a pointer to the module object as follows::" -msgstr "" - -#: 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[\"\"]``. 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 "" - -#: faq/extending.rst:194 -msgid "" -"You can then access the module's attributes (i.e. any name defined in the " -"module) as follows::" -msgstr "" - -#: faq/extending.rst:199 -msgid "" -"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " -"module also works." -msgstr "" - -#: faq/extending.rst:204 -msgid "How do I interface to C++ objects from Python?" -msgstr "" - -#: 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 " -"`. 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 "" - -#: faq/extending.rst:212 -msgid "For C++ libraries, see :ref:`c-wrapper-software`." -msgstr "" - -#: faq/extending.rst:216 -msgid "I added a module using the Setup file and the make fails; why?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:224 -msgid "How do I debug an extension?" -msgstr "" - -#: 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 "" - -#: faq/extending.rst:229 -msgid "In your ``.gdbinit`` file (or interactively), add the command:" -msgstr "" - -#: faq/extending.rst:235 -msgid "Then, when you run GDB:" -msgstr "" - -#: faq/extending.rst:247 -msgid "" -"I want to compile a Python module on my Linux system, but some files are " -"missing. Why?" -msgstr "" - -#: faq/extending.rst:249 -msgid "" -"Most packaged versions of Python don't include the :file:`/usr/lib/python2." -"{x}/config/` directory, which contains various files required for compiling " -"Python extensions." -msgstr "" - -#: faq/extending.rst:253 -msgid "For Red Hat, install the python-devel RPM to get the necessary files." -msgstr "" - -#: faq/extending.rst:255 -msgid "For Debian, run ``apt-get install python-dev``." -msgstr "" - -#: faq/extending.rst:259 -msgid "How do I tell \"incomplete input\" from \"invalid input\"?" -msgstr "" - -#: faq/extending.rst:261 -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 "" - -#: faq/extending.rst:267 -msgid "" -"In Python you can use the :mod:`codeop` module, which approximates the " -"parser's behavior sufficiently. IDLE uses this, for example." -msgstr "" - -#: faq/extending.rst:270 -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 "" - -#: faq/extending.rst:276 -msgid "" -"However sometimes you have to run the embedded Python interpreter in the " -"same thread as your rest application and you can't allow the :c:func:" -"`PyRun_InteractiveLoop` to stop while waiting for user input. A solution is " -"trying to compile the received string with :c:func:`Py_CompileString`. If it " -"compiles without errors, try to execute the returned code object by calling :" -"c:func:`PyEval_EvalCode`. Otherwise save the input for later. If the " -"compilation fails, find out if it's an error or just more input is required " -"- by extracting the message string from the exception tuple and comparing it " -"to the string \"unexpected EOF while parsing\". Here is a complete example " -"using the GNU readline library (you may want to ignore **SIGINT** while " -"calling readline())::" -msgstr "" - -#: faq/extending.rst:401 -msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" -msgstr "" - -#: faq/extending.rst:403 -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 "" - -#: faq/extending.rst:409 -msgid "" -"Can I create an object class with some methods implemented in C and others " -"in Python (e.g. through inheritance)?" -msgstr "" - -#: faq/extending.rst:411 -msgid "" -"Yes, you can inherit from built-in classes such as :class:`int`, :class:" -"`list`, :class:`dict`, etc." -msgstr "" - -#: faq/extending.rst:414 -msgid "" -"The Boost Python Library (BPL, http://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 "" +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001-2021, Python Software Foundation +# This file is distributed under the same license as the Python package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Python 3.10\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-17 23:20+0300\n" +"PO-Revision-Date: 2022-07-01 14:35+0300\n" +"Last-Translator: \n" +"Language-Team: TURKISH \n" +"Language: tr\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" +"X-Generator: Poedit 3.0.1\n" + +#: faq/extending.rst:3 +msgid "Extending/Embedding FAQ" +msgstr "Genişletme/Ekleme SSS" + +#: faq/extending.rst:6 +msgid "Contents" +msgstr "İçerikler" + +#: faq/extending.rst:16 +msgid "Can I create my own functions in C?" +msgstr "C'de kendi fonksiyonlarımı oluşturabilir miyim?" + +#: 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 "" +"Evet, C'de fonksiyonlar, değişkenler, istisnalar ve hatta yeni tipler içeren " +"yerleşik modüller oluşturabilirsiniz. Bu konu :ref:`extending-index` " +"dosyasında açıklanmıştır." + +#: faq/extending.rst:22 +msgid "Most intermediate or advanced Python books will also cover this topic." +msgstr "Çoğu orta veya ileri seviye Python kitabı da bu konuyu ele alacaktır." + +#: faq/extending.rst:26 +msgid "Can I create my own functions in C++?" +msgstr "C++'da kendi fonksiyonlarımı oluşturabilir miyim?" + +#: 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 "" +"Evet, C++'da bulunan C uyumluluk özelliklerini kullanarak. ``extern \"C" +"\" { ... }`` komutunu Python include dosyalarının etrafına yerleştirin ve Python " +"yorumlayıcısı tarafından çağrılacak her fonksiyonun önüne ``extern \"C\"`` " +"koyun. Yapıcıları olan global veya statik C++ nesneleri muhtemelen iyi bir " +"fikir değildir." + +#: faq/extending.rst:37 +msgid "Writing C is hard; are there any alternatives?" +msgstr "C yazmak zor; başka alternatifler var mı?" + +#: 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 "" +"Ne yapmaya çalıştığınıza bağlı olarak, kendi C uzantılarınızı yazmanın bir " +"dizi alternatifi vardır." + +#: faq/extending.rst:44 +msgid "" +"`Cython `_ and its relative `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 `_ ve akrabası `Pyrex `_ Python'un biraz değiştirilmiş " +"bir formunu kabul eden ve karşılık gelen C kodunu üreten derleyicilerdir. " +"Cython ve Pyrex, Python'un C API'ını öğrenmek zorunda kalmadan bir uzantı " + +"yazmayı mümkün kılar." + +#: 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 `_. `SIP " +"`__, `CXX `_ `Boost `_, or `Weave `_ are also alternatives " +"for wrapping C++ libraries." +msgstr "" +"Şu anda Python uzantısı bulunmayan bir C veya C++ kütüphanesine arayüz " +"oluşturmanız gerekiyorsa, kütüphanenin veri türlerini ve işlevlerini `SWIG " +"`_ gibi bir araçla sarmalamayı deneyebilirsiniz. sIP " +"`__, `CXX `_ `Boost `_, veya `Weave `_ de C++ " +"kütüphanelerini sarmalamak için alternatiflerdir." + +#: faq/extending.rst:61 +msgid "How can I execute arbitrary Python statements from C?" +msgstr "C'den rastgele Python komutlarını nasıl çalıştırabilirim?" + +#: 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 "" +"Bunu yapan en üst düzey fonksiyon :c:func:`PyRun_SimpleString` olup, " +"``__main__`` modülü bağlamında çalıştırılmak üzere tek bir string argüman " +"alır ve başarı için ``0``, bir istisna oluştuğunda (:exc:`SyntaxError` " +"dahil) ``-1`` döndürür. Daha fazla kontrol istiyorsanız, :c:func:" +"`PyRun_String` kullanın; :c:func:`PyRun_SimpleString` için ``Python/" +"pythonrun.c`` içindeki kaynağa bakın." + +#: faq/extending.rst:72 +msgid "How can I evaluate an arbitrary Python expression from C?" +msgstr "C'den rastgele Python komutlarını nasıl değerlendirebilirim?" + + +#: 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 "" +"Önceki sorudaki :c:func:`PyRun_String` fonksiyonunu :c:data:`Py_eval_input` " +"başlangıç sembolü ile çağırın; bu fonksiyon bir ifadeyi ayrıştırır, " +"değerlendirir ve değerini döndürür." + +#: faq/extending.rst:80 +msgid "How do I extract C values from a Python object?" +msgstr "Bir Python nesnesinden C değerlerini nasıl çıkarabilirim?" + +#: 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:`PyListSize` and :c:" +"func:`PyList_GetItem`." +msgstr "" +"Bu, nesnenin türüne bağlıdır. Eğer bir tuple ise, :c:func:`PyTuple_Size` " +"uzunluğunu döndürür ve :c:func:`PyTuple_GetItem` belirtilen indeksteki öğeyi " +"döndürür. Listelerin de benzer fonksiyonları vardır, :c:func:`PyListSize` " +"ve :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 "" +"Baytlar için, :c:func:`PyBytes_Size` uzunluğunu döndürür ve :c:func:" +"`PyBytes_AsStringAndSize` değerine ve uzunluğuna bir işaretçi sağlar. " +"Python bayt nesnelerinin null bayt içerebileceğini unutmayın, bu nedenle " + +"C'nin :c:func:`strlen` özelliği kullanılmamalıdır." + +#: 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 "" +"Bir nesnenin türünü test etmek için, önce ``NULL`` olmadığından emin olun ve " +"ardından :c:func:`PyBytes_Check`, :c:func:`PyTuple_Check`, :c:func:" +"`PyList_Check` vb. kullanın." + +#: 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 "" +"Ayrıca Python nesneleri için 'abstract' arayüzü tarafından sağlanan üst " + +"düzey bir API de vardır -- daha fazla ayrıntı için ``Include/abstract.h`` " +"dosyasını okuyun. C:func:`PySequence_Length`, :c:func:`PySequence_GetItem`, " +"vb. gibi çağrıları kullanarak her türlü Python dizisi ile arayüz " +"oluşturmanın yanı sıra sayılar (:c:func:`PyNumber_Index` ve diğerleri) ve " +"PyMapping API'lerindeki eşlemeler gibi diğer birçok yararlı protokolü de " +"sağlar." + +#: faq/extending.rst:104 +msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" +msgstr "" +"İsteğe bağlı uzunlukta bir tuple oluşturmak için Py_BuildValue() işlevini " +"nasıl kullanabilirim?" + +#: faq/extending.rst:106 +msgid "You can't. Use :c:func:`PyTuple_Pack` instead." +msgstr "Bunu yapamazsınız. Bunun yerine :c:func:`PyTuple_Pack` kullanın." + +#: faq/extending.rst:110 +msgid "How do I call an object's method from C?" +msgstr "C'de bir nesnenin metodunu nasıl çağırabilirim?" + +#: 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` fonksiyonu, bir nesnenin rastgele bir metodunu " +"çağırmak için kullanılabilir. Parametreler nesne, çağrılacak yöntemin adı, :" +"c:func:`Py_BuildValue` ile kullanılan gibi bir string ve değişken " +"değerleridir::" + +#: 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 "" +"Bu, ister yerleşik ister kullanıcı tanımlı olsun, yöntemleri olan herhangi " +"bir nesne için geçerlidir. Sonunda dönüş değerini ::c:func:`Py_DECREF`\\ 'lemekten " +"siz sorumlusunuz." + +#: 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 "" +"Örneğin, bir dosya nesnesinin \"seek\" yöntemini 10, 0 argümanlarıyla " +"çağırmak için (dosya nesnesi işaretçisinin \"f\" olduğunu varsayarak)::" + +#: 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` *her zaman* argüman listesi için bir tuple " +"istediğinden, argümansız bir fonksiyon çağırmak için format olarak \"()\" ve " +"tek argümanlı bir fonksiyon çağırmak için argümanı parantez içine alın, " +"örneğin \"(i)\"." + +#: faq/extending.rst:142 +msgid "" +"How do I catch the output from PyErr_Print() (or anything that prints to " +"stdout/stderr)?" +msgstr "" +"PyErr_Print() işlevinden (veya stdout/stderr'e yazdıran herhangi bir şeyden) " +"gelen çıktıyı nasıl yakalayabilirim?" + +#: 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 kodunda, ``write()`` metodunu destekleyen bir nesne tanımlayın. Bu " +"nesneyi :data:`sys.stdout` ve :data:`sys.stderr` öğelerine atayın. " +"Print_error'ı çağırın ya da sadece standart geri izleme mekanizmasının " +"çalışmasına izin verin. Ardından, çıktı ``write()`` yönteminizin gönderdiği " +"yere gidecektir." + +#: faq/extending.rst:149 +msgid "The easiest way to do this is to use the :class:`io.StringIO` class:" +msgstr "" +"Bunu yapmanın en kolay yolu :class:`io.StringIO` sınıfını kullanmaktır:" + +#: faq/extending.rst:161 +msgid "A custom object to do the same would look like this:" +msgstr "Aynı şeyi yapan özel bir nesne şöyle görünecektir:" + + +#: faq/extending.rst:182 +msgid "How do I access a module written in Python from C?" +msgstr "Python'da yazılmış bir modüle C'den nasıl erişebilirim?" + +#: faq/extending.rst:184 +msgid "You can get a pointer to the module object as follows::" +msgstr "Modül nesnesine aşağıdaki gibi bir işaretçi alabilirsiniz::" + +#: 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[\"\"]``. 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 "" +"Modül henüz içe aktarılmamışsa (yani :data:`sys.modules` içinde henüz mevcut " +"değilse), bu modülü başlatır; aksi takdirde sadece ``sys." +"modules[\"\"]`` değerini döndürür. Modülü herhangi bir isim " +"alanına girmediğine dikkat edin -- sadece başlatıldığından ve :data:`sys." +"modules` içinde saklandığından emin olur." + +#: faq/extending.rst:194 +msgid "" +"You can then access the module's attributes (i.e. any name defined in the " +"module) as follows::" +msgstr "" +"Daha sonra modülün özniteliklerine (yani modülde tanımlanan herhangi bir " +"isme) aşağıdaki şekilde erişebilirsiniz::" + +#: faq/extending.rst:199 +msgid "" +"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " +"module also works." +msgstr "" +"Modüldeki değişkenlere atamak için :c:func:`PyObject_SetAttrString` çağrısı " +"da çalışır." + +#: faq/extending.rst:204 +msgid "How do I interface to C++ objects from Python?" +msgstr "Python'dan C++ nesnelerine nasıl arayüz oluşturabilirim?" + +#: 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 " +"`. 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 "" +"Gereksinimlerinize bağlı olarak, birçok yaklaşım vardır. Bunu manuel olarak " +"yapmak için :ref:`the \"Extending and Embedding\" belgesini okuyarak " +"başlayın `. Python çalışma zamanı sistemi için, C ve C++ " +"arasında çok fazla fark olmadığının farkına varın -- bu nedenle bir C yapı " +"(işaretçi) türü etrafında yeni bir Python türü oluşturma stratejisi C++ " +"nesneleri için de işe yarayacaktır." + +#: faq/extending.rst:212 +msgid "For C++ libraries, see :ref:`c-wrapper-software`." +msgstr "C++ kütüphaneleri için bakınız :ref:`c-wrapper-software`." + +#: faq/extending.rst:216 +msgid "I added a module using the Setup file and the make fails; why?" +msgstr "" +"Kurulum dosyasını kullanarak bir modül ekledim ve derleme başarısız oldu; neden?" + + +#: 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 "" +"Kurulum bir satır sonu ile bitmelidir, eğer satır sonu yoksa derleme işlemi " +"başarısız olur. (Bunu düzeltmek için biraz biçimsiz shell script " +"düzenlemesi gerekir ve bu hata o kadar küçük ki çabaya değmez gibi görünüyor)" + +#: faq/extending.rst:224 +msgid "How do I debug an extension?" +msgstr "Bir uzantıda nasıl hata ayıklayabilirim?" + +#: 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 "" +"Dinamik olarak yüklenen uzantılarla GDB kullanırken, uzantınız yüklenene " +"kadar uzantınızda bir kesme noktası ayarlayamazsınız." + +#: faq/extending.rst:229 +msgid "In your ``.gdbinit`` file (or interactively), add the command:" +msgstr "``.gdbinit`` dosyanıza (veya etkileşimli olarak) şu komutu ekleyin:" + +#: faq/extending.rst:235 +msgid "Then, when you run GDB:" +msgstr "Sonra, GDB'yi çalıştırdığınızda:" + +#: faq/extending.rst:247 +msgid "" +"I want to compile a Python module on my Linux system, but some files are " +"missing. Why?" +msgstr "" +"Linux sistemimde bir Python modülü derlemek istiyorum, ancak bazı dosyalar " +"eksik. Neden?" + +#: faq/extending.rst:249 +msgid "" +"Most packaged versions of Python don't include the :file:`/usr/lib/python2." +"{x}/config/` directory, which contains various files required for compiling " +"Python extensions." +msgstr "" +"Python'un paketlenmiş sürümlerinin çoğu, Python uzantılarını derlemek için " +"gerekli çeşitli dosyaları içeren :file:`/usr/lib/python2.{x}/config/` " +"dizinini içermez." + +#: faq/extending.rst:253 +msgid "For Red Hat, install the python-devel RPM to get the necessary files." +msgstr "Red Hat için, gerekli dosyaları almak için python-devel RPM yükleyin." + +#: faq/extending.rst:255 +msgid "For Debian, run ``apt-get install python-dev``." +msgstr "Debian için ``apt-get install python-dev`` komutunu çalıştırın." + +#: faq/extending.rst:259 +msgid "How do I tell \"incomplete input\" from \"invalid input\"?" +msgstr "\"Eksik girdi\" ile \"geçersiz girdi'yi nasıl ayırt edebilirim?" + +#: faq/extending.rst:261 +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 "" +"Bazen Python etkileşimli yorumlayıcısının davranışını taklit etmek " +"istersiniz; girdi eksik olduğunda size bir devam istemi verir (örneğin, bir " +"\"if\" deyiminin başlangıcını yazdınız veya parantezlerinizi veya üçlü dize " +"tırnaklarınızı kapatmadınız), ancak girdi geçersiz olduğunda size hemen bir " +"sözdizimi hata mesajı verir." + +#: faq/extending.rst:267 +msgid "" +"In Python you can use the :mod:`codeop` module, which approximates the " +"parser's behavior sufficiently. IDLE uses this, for example." +msgstr "" +"Python'da, ayrıştırıcının davranışına yeterince yaklaşan :mod:`codeop` " +"modülünü kullanabilirsiniz. Örneğin IDLE bunu kullanır." + +#: faq/extending.rst:270 +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 "" +"Bunu C'de yapmanın en kolay yolu :c:func:`PyRun_InteractiveLoop` çağırmak " +"(belki ayrı bir iş parçacığında) ve Python yorumlayıcısının girdiyi sizin " +"için işlemesine izin vermektir. Ayrıca :c:func:" +"`PyOS_ReadlineFunctionPointer`ı özel girdi fonksiyonunuza işaret edecek " +"şekilde ayarlayabilirsiniz. Daha fazla ipucu için ``Modules/readline.c`` ve " +"``Parser/myreadline.c`` dosyalarına bakın." + +#: faq/extending.rst:276 +msgid "" +"However sometimes you have to run the embedded Python interpreter in the " +"same thread as your rest application and you can't allow the :c:func:" +"`PyRun_InteractiveLoop` to stop while waiting for user input. A solution is " +"trying to compile the received string with :c:func:`Py_CompileString`. If it " +"compiles without errors, try to execute the returned code object by calling :" +"c:func:`PyEval_EvalCode`. Otherwise save the input for later. If the " +"compilation fails, find out if it's an error or just more input is required " +"- by extracting the message string from the exception tuple and comparing it " +"to the string \"unexpected EOF while parsing\". Here is a complete example " +"using the GNU readline library (you may want to ignore **SIGINT** while " +"calling readline())::" +msgstr "" +"Ancak bazen gömülü Python yorumlayıcısını geri kalan uygulamanızla aynı _thread_ (iş parçacığı) " +"içerisinde çalıştırmanız gerekir ve :c:func:`PyRun_InteractiveLoop`un " + +"kullanıcı girdisini beklerken durmasına izin veremezsiniz. Çözümlerden biri, " +"alınan dizeyi :c:func:`Py_CompileString` ile derlemeye çalışmaktır. Eğer " +"hatasız derlenirse, :c:func:`PyEval_EvalCode` çağrısı ile dönen kod " +"nesnesini çalıştırmayı deneyin. Aksi takdirde girdiyi daha sonrası için " +"saklayın. Derleme başarısız olursa, bunun bir hata mı olduğunu yoksa daha " +"fazla girdi mi gerektiğini öğrenin - istisna tuple'ından mesaj string'ini " +"çıkararak ve \"ayrıştırma sırasında beklenmedik EOF\" dizesiyle " +"karşılaştırarak. İşte GNU readline kütüphanesini kullanan tam bir örnek " +"(readline()'ı çağırırken **SIGINT**'i göz ardı etmek isteyebilirsiniz)::" + +#: faq/extending.rst:401 +msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" +msgstr "" +"Tanımlanmamış g++ sembolleri __builtin_new veya __pure_virtual'ı nasıl " +"bulabilirim?" + +#: faq/extending.rst:403 +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 "" +"G++ uzantı modüllerini dinamik olarak yüklemek için Python'u yeniden " +"derlemeli, g++ kullanarak yeniden bağlamalı (Python Modules Makefile'da " +"LINKCC'yi değiştirin) ve uzantı modülünüzü g++ kullanarak bağlamalısınız " +"(örneğin, ``g++ -shared -o mymodule.so mymodule.o``)." + +#: faq/extending.rst:409 +msgid "" +"Can I create an object class with some methods implemented in C and others " +"in Python (e.g. through inheritance)?" +msgstr "" +"Bazı yöntemleri C'de, bazı yöntemleri Python'da (örneğin miras yoluyla) " +"uygulanan bir nesne sınıfı oluşturabilir miyim?" + +#: faq/extending.rst:411 +msgid "" +"Yes, you can inherit from built-in classes such as :class:`int`, :class:" +"`list`, :class:`dict`, etc." +msgstr "" +"Evet, :class:`int`, :class:`list`, :class:`dict`, vb. gibi yerleşik " +"sınıflardan miras alabilirsiniz." + +#: faq/extending.rst:414 +msgid "" +"The Boost Python Library (BPL, http://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 Kütüphanesi (BPL, http://www.boost.org/libs/python/doc/index." +"html) bunu C++'dan yapmanın bir yolunu sağlar (yani BPL'yi kullanarak C++'da " +"yazılmış bir uzantı sınıfından miras alabilirsiniz)."