Replies: 10 comments 6 replies
-
I don't know what this means |
Beta Was this translation helpful? Give feedback.
-
When I call I would like Check this out https://docs.python.org/3/c-api/init_config.html#c.PyConfig.argv However, you can achieve this by creating a .scr script and adding the appropriate arguments to it, so I leave it up to you to decide whether you want to bother with that. |
Beta Was this translation helpful? Give feedback.
-
I think .src is the only way, python is not initialized yet, and I don't know how to retrieve the command line args from the host |
Beta Was this translation helpful? Give feedback.
-
Actually, .NET has System.Environment.GetCommandLineArgs(); I don't know how to get it from C++ though |
Beta Was this translation helpful? Give feedback.
-
ah! static void AcRxPyApp_idoit(void)
{
int nArgs;
LPWSTR* szArglist;
szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
if (NULL == szArglist)
{
acutPrintf(L"CommandLineToArgvW failed\n");
return;
}
else
{
for (int i = 0; i < nArgs; i++)
{
acutPrintf(L"%d: %ls\n", i, szArglist[i]);
}
}
LocalFree(szArglist);
}
|
Beta Was this translation helpful? Give feedback.
-
task [#159] |
Beta Was this translation helpful? Give feedback.
-
Issue; to load a module, I.e.
_doit.py should be loaded in a command context, lisp functions must be loaded in a document context or they won’t be registered That’s a bummer, I was thinking it would be great for running unit tests |
Beta Was this translation helpful? Give feedback.
-
note: as a hack, I can use send string to execute for /ld to load files for ZwCAD and GStarCAD |
Beta Was this translation helpful? Give feedback.
-
I got it to work, just uploaded a fresh build |
Beta Was this translation helpful? Give feedback.
-
Loading from venv failed if zwcad was started with cmd args:
everything is fine when it runs without arguments. |
Beta Was this translation helpful? Give feedback.
-
Command line switches (and other arguments) are not added to
sys.argv
, but I think they should be. Host applications ignore invalid switches so they could be used by Python.Beta Was this translation helpful? Give feedback.
All reactions