ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Python functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Python functions are as follows:
PythonAddPathAdds the path of a directory or the path of the virtual environment to search for Python modules.
PythonExecuteExecutes a function present in a Python module.
PythonInitializeSpecifies the location of the Python DLL to be loaded.
PythonTerminateUnloads the Python DLL and frees memory.
Related Examples:
WD Python Training (WINDEV): WD Python
[ + ] This example shows how to run Python code in WINDEV applications.
Prerequisite: Python 3 must be installed on the computer. To get Python 3, go to http://legacy.python.org/download/
Minimum version required
  • Version 27
This page is also available for…
Comments
IMPORTANTE
Hello Guys!

Para resolver a compilação do Python pelo Webdev voce tera que fazer o seguinte ajuste:

https://hostimage.windev.io/images/BUG64_c5a2a700bcd82b0dcceab7c195f4fad7.png

Na versao inglesa
C:\PCSOFT\WEBDEV 29\Programs\Engine

Na versão francesa
C:\PCSOFT\WEBDEV 29\Programmes\Moteur

Copiar tudo da pasta 64 e colar na pasta 32

C:\PCSOFT\WEBDEV 29\Programs\Engine\Win64x86
para
C:\PCSOFT\WEBDEV 29\Programs\Engine\Win32x86

Substituir tudo

Testar novamente o teu projeto Python vai funcionar.

Abri chamado informado do ocorrido quem sabe em futuras versoes isso esteja resolvido.

Por algum motivo o Python busca pela pasta 32 em vez de buscar pela pasta 64.

Espero ter ajudado.
Boller
25 May 2024
IMPORTANTE
IF PythonInitialize("C:\Programs\Python\Python39\python39.dll") THEN
PythonAddPath("C:\tmp\python-modules\")
PythonExecute("test_module", "id", 5)
END
Boller
13 May 2024
IMPORTANTE
PARA FUNCIONAR NO WEBDEV

É necessário setar corretamente o caminho do modulo python, para executar uma função em um módulo python:

sPythonModule is string

<IF ExecutionTarget=Windows>

sPythonModule = SysDir(srLocalAppData) + ..
[fSep]+"Programs\Python\Python39\python39.dll"

END
Boller
13 May 2024

Last update: 05/14/2024

Send a report | Local help