Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
formatting
  • Loading branch information
arihant2math authored and youknowone committed Mar 23, 2025
commit f6fc4b304f0c266dda49985b60773911af07d5e6
15 changes: 5 additions & 10 deletions stdlib/src/tkinter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pub(crate) use self::_tkinter::make_module;
#[pymodule]
mod _tkinter {
use crate::builtins::PyTypeRef;
use rustpython_vm::{PyResult, VirtualMachine, function::OptionalArg};
use rustpython_vm::function::{Either, FuncArgs};

use rustpython_vm::{PyResult, VirtualMachine, function::OptionalArg};

use crate::common::lock::PyRwLock;
use std::sync::Arc;
use tk::cmd::*;
Expand Down Expand Up @@ -50,10 +50,7 @@ mod _tkinter {
}

#[pyfunction]
fn create(
args: FuncArgs,
_vm: &VirtualMachine,
) -> PyResult<TkApp> {
fn create(args: FuncArgs, _vm: &VirtualMachine) -> PyResult<TkApp> {
// TODO: handle arguements
// TODO: this means creating 2 tk instances is not possible.
let tk = Tk::new(()).unwrap();
Expand Down Expand Up @@ -86,10 +83,8 @@ mod _tkinter {
let tk = self.tk.read().unwrap();
Ok(tk.getvar(name).unwrap())
}

#[pymethod]
fn createcommand(&self, name: String, callback: PyObjectRef) {

}
fn createcommand(&self, name: String, callback: PyObjectRef) {}
}
}