13 lines
358 B
JavaScript
13 lines
358 B
JavaScript
const { app, BrowserWindow, ipcMain } = require('electron')
|
|
const { exec } = require('child_process')
|
|
|
|
// MemPalace integration
|
|
ipcMain.handle('exec-python', (event, command) => {
|
|
return new Promise((resolve, reject) => {
|
|
exec(command, (error, stdout, stderr) => {
|
|
if (error) return reject(error)
|
|
resolve({ stdout, stderr })
|
|
})
|
|
})
|
|
})
|