GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CppCallPython/EmbedPython/EmbedPython.cpp at master · UlovHer/CppCallPython

Expand file tree

/

EmbedPython.cpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
43 lines (37 loc) · 1.09 KB
/

EmbedPython.cpp

Copy path

File metadata and controls

43 lines (37 loc) · 1.09 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
// EmbedPython.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "CallPython.h"
#include <iostream>
using namespace std;
int main()
{
//std::cout << "call python funciotn" << std::endl;
int addRes = callPythonAdd("call_python", "add");
//int callState = callPythonFunc("call_python", "cpp_call_python");
//python文件不要命名为test.py
//由于test.py是python内置python脚本文件,也就是python有自己的test.py文件,并且其优先级比自己创建的高
/*
if (callState > 0)
{
cout << "call python function success!" << endl;
}
else if (callState == -1)
{
cout << "call python function faile!" << endl;
}
else
{
cout << "call python script faile!" << endl;
}
*/
std::cout << "call python script file" << std::endl;
const char* scriptName = "call_python_file.py";
const char* scriptPath = "../PyrthonScripts/call_python_file.py";
// 绝对路径
wchar_t* argv[] = { L"E:/CppProject/EmbedPython/DataFile/google.mp4", L"1" };
//初始化宽字节字符指针数组,将其首地址赋值给二级指针
int callState = callPythonFile(scriptName, scriptPath, 2, argv);
system("pause");
return 0;
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.