๐Ÿ .NET์—์„œ Python์„ ๊ฐ€์žฅ ๊ฐ€๋ณ๊ฒŒ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•

Python ์ฝ”๋“œ๋ฅผ C# ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์—์„œ ์‹คํ–‰ํ•ด์•ผ ํ•˜๋Š”๋ฐ  ๋ณต์žกํ•œ ์„ค์ •๊ณผ ๋ณด์ผ๋Ÿฌํ”Œ๋ ˆ์ดํŠธ ์ฝ”๋“œ๊ฐ€ ๋ถ€๋‹ด๋˜์…จ๋‚˜์š”?

DotNetPy๋ฅผ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค: โœ… Zero Boilerplate - GIL ๊ด€๋ฆฌ๋‚˜ Source Generator ๋ถˆํ•„์š” โœ… AOT ์นœํ™”์  - Native AOT ์‹œ๋‚˜๋ฆฌ์˜ค๋ฅผ ์œ„ํ•ด ์„ค๊ณ„ โœ… ์ตœ์†Œํ•œ์˜ ๋Ÿฌ๋‹ ์ปค๋ธŒ - ๋ช‡ ์ค„๋กœ Python ์‹คํ–‰ โœ… Apache 2.0 ๋ผ์ด์„ ์Šค

Python ํ‘œํ˜„์‹ ํ‰๊ฐ€๋ถ€ํ„ฐ ๋ณต์žกํ•œ ๋ฐ์ดํ„ฐ ๊ตํ™˜๊นŒ์ง€,  pythonnet์ด๋‚˜ CSnakes๋ณด๋‹ค ํ›จ์”ฌ ๊ฐ€๋ฒผ์šด ๋Œ€์•ˆ์ž…๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์˜ˆ์‹œ: Python.Initialize(pythonLibraryPath); var executor = Python.GetInstance(); var result = executor.Evaluate("sum([1,2,3,4,5])"); Console.WriteLine(result?.GetInt32()); // 15

๐Ÿ”— GitHub: https://github.com/rkttu/dotnetpy

2

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/019a2fe3-94d2-720e-8310-48370d4d56fa on your instance and reply to it.