Я установил IronPython через Nugget Manager VisualStudio
мой код C#
Код: Выделить всё
class PY_command
{
const string pygame_file = "PY/pygame_window.py";
const string tkinter_file = "PY/tkinter_window.py";
public void PygameWindow()
{
var engine = Python.CreateEngine();
engine.ExecuteFile(pygame_file);
}
}
Код: Выделить всё
import pygame
window = pygame.display.set_mode((600, 600))
while True:
window.fill((40, 130, 50))
pygame.display.update()
Код: Выделить всё
IronPython.Runtime.Exceptions.ImportException: 'No module named 'pygame'
Подробнее здесь: https://stackoverflow.com/questions/791 ... me-library
Мобильная версия