Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Integrating Python Debugging with Visual Studio Code in a Custom Application
Post: RE: Integrating Python Debugging with Visual Studi...
I do this in Python for AutoCAD
I have a function that tells debugpy to listen
https://github.com/CEXT-Dan/PyRx/blob/ma...RxDebug.py
Then setup a config in VS code
https://github.com/CEXT-Dan/PyRx/... |
|
PyDan |
Networking |
1 |
170 |
Yesterday, 06:04 AM |
|
|
Thread: Is CTkDesigner worth the price?
Post: RE: Is CTkDesigner worth the price?
yes! you need a may need a designer if you need to get work done.
I use dialog blocks to generate GUI’s for wxPython. Technically, I could do it by hand, but why |
|
PyDan |
GUI |
5 |
630 |
Apr-15-2024, 01:24 AM |
|
|
Thread: Python vs low level languages, (say C++)
Post: RE: Python vs low level languages, (say C++)
Learn both. IMHO, it’s great to know a compiled language and a scripting language.
There’s C++ bindings for python so you can learn to make them work together |
|
PyDan |
News and Discussions |
1 |
328 |
Apr-07-2024, 01:22 AM |
|
|
Thread: embedded Python scripts - is it worthwhile
Post: RE: embedded Python scripts - is it worthwhile
I think it can be worthwhile, especially if you have an API to wrap. I’ve embedded Python in AutoCAD, it’s pretty slick as it’s possible to load python functions as commands https://github.com/CEXT-Da... |
|
PyDan |
News and Discussions |
3 |
784 |
Feb-20-2024, 01:15 PM |
|
|
Thread: PyImport_ImportModule
Post: RE: PyImport_ImportModule
It’s not clear what your goal is.
https://python.readthedocs.io/en/latest/...dding.html
If you want to evaluate some simple expressions
Use 1.1. Very High Level Embedding
You can run PyRun_SimpleSt... |
|
PyDan |
General Coding Help |
2 |
489 |
Jan-20-2024, 07:11 AM |
|
|
Thread: When is it safe to compare (==) two floats?
Post: RE: When is it safe to compare (==) two floats?
For CAD stuff, I use a tolerance, Python has a math.isclose
https://docs.python.org/3/whatsnew/3.5.h...e-equality |
|
PyDan |
General Coding Help |
4 |
801 |
Nov-12-2023, 11:53 AM |
|
|
Thread: Pythonic from a C++ perspective
Post: RE: Pythonic from a C++ perspective
Thanks for the reply!
That’s exactly what I need. Now I need to figure out how to generate a named tuple in boost::python
I also learned that I can type annotate tuples, so I have a couple options. |
|
PyDan |
General Coding Help |
2 |
782 |
Sep-18-2023, 11:39 AM |
|
|
Thread: Pythonic from a C++ perspective
Post: Pythonic from a C++ perspective
In C++, entSel would look like
int acedEntSel(const ACHAR * str, ads_name entres, ads_point ptres );
where entres and ptres are out parameters, the return types is a success / fail code
My wrappe... |
|
PyDan |
General Coding Help |
2 |
782 |
Sep-15-2023, 12:45 AM |
|
|
Thread: Wrapping c/c++ dll
Post: RE: Wrapping c/c++ dll
I use boost::python for embedded, works really well
caveat, it’s part of boost which is quite big, pybind11 is header only, might be the way to go. |
|
PyDan |
General Coding Help |
2 |
759 |
Aug-25-2023, 10:35 PM |
|
|
Thread: Microsof announced Pyhon in Excel
Post: RE: Microsof announced Pyhon in Excel
Cool they chose python over .NET.. I was hoping that it would run local, as a replacement or alternative to VBA/VSTO.
I'm ok with the death of VBA **biggrin** |
|
PyDan |
News and Discussions |
3 |
1,058 |
Aug-23-2023, 11:32 PM |
|
|
Thread: flushing output buffers
Post: RE: flushing output buffers
Not sure if this helps, but I had to implement a flush, when redirecting in my embedded python.
In C++, it was enough to use std::endl…
maybe just end your print with a “\n” |
|
PyDan |
News and Discussions |
4 |
822 |
Aug-04-2023, 09:25 AM |
|
|
Thread: Database, embedded python
Post: RE: Database, embedded python
SQLite is already embedded in Python |
|
PyDan |
Game Development |
4 |
1,928 |
Jul-31-2023, 09:38 PM |
|
|
Thread: How to do "fixed size" (wrapping) math in Python?
Post: RE: How to do "fixed size" (wrapping) math in Pyth...
If you have the C code, or C++, it may be possible to write your own type and expose it to python, do the math on the C++ side
I do this with boost::python, classes like vector and matrix, provide the... |
|
PyDan |
General Coding Help |
13 |
1,977 |
Jul-19-2023, 12:51 AM |
|
|
Thread: How to start to learn and use python
Post: RE: How to start to learn and use python
this is the best TSP routine I've found so far, I use it in CAD to create the shortest polyline
https://developers.google.com/optimization/routing/tsp |
|
PyDan |
News and Discussions |
6 |
1,356 |
Jul-15-2023, 08:56 AM |
|
|
Thread: Visual Studio for Python
Post: RE: Visual Studio for Python
I use both VS code and Visual studio, I’m writing C++ wrappers for Python.. Both behave quite similar with Python
Visual studio is probably overkill for python alone, but it’s great if you’re doing ... |
|
PyDan |
News and Discussions |
3 |
69,118 |
Jul-11-2023, 08:15 AM |
|
|
Thread: New Users Introduce Yourself
Post: RE: New Users Introduce Yourself
Hi Dan here,
I’m a novice C++ programmer, attempting to write Python wrappers around AutoCAD’s ObjectARX API
I know like zero Python, and I’d like to gain a little insight on the “ZEN” or “Pythonic” ... |
|
PyDan |
Bar |
431 |
233,491 |
Jul-01-2023, 07:50 AM |