summaryrefslogtreecommitdiff
path: root/docs/examples/tutorial/embedding/embedded.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/tutorial/embedding/embedded.pyx')
-rw-r--r--docs/examples/tutorial/embedding/embedded.pyx12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/examples/tutorial/embedding/embedded.pyx b/docs/examples/tutorial/embedding/embedded.pyx
new file mode 100644
index 000000000..2ed823945
--- /dev/null
+++ b/docs/examples/tutorial/embedding/embedded.pyx
@@ -0,0 +1,12 @@
+# embedded.pyx
+
+# The following two lines are for test purposes only, please ignore them.
+# distutils: sources = embedded_main.c
+# tag: py3only
+# tag: no-cpp
+
+TEXT_TO_SAY = 'Hello from Python!'
+
+cdef public int say_hello_from_python() except -1:
+ print(TEXT_TO_SAY)
+ return 0