Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Add _tkinter module and gate
  • Loading branch information
arihant2math authored and youknowone committed Mar 23, 2025
commit 04b3454c1770065eb49485ac07211b6fa747fe10
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bz2 = ["stdlib", "rustpython-stdlib/bz2"]
sqlite = ["rustpython-stdlib/sqlite"]
ssl = ["rustpython-stdlib/ssl"]
ssl-vendor = ["ssl", "rustpython-stdlib/ssl-vendor"]
tkinter = ["rustpython-stdlib/tkinter"]

[dependencies]
rustpython-compiler = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ bz2 = ["bzip2"]
sqlite = ["dep:libsqlite3-sys"]
ssl = ["openssl", "openssl-sys", "foreign-types-shared", "openssl-probe"]
ssl-vendor = ["ssl", "openssl/vendored"]
tkinter = []

[dependencies]
# rustpython crates
Expand Down
7 changes: 7 additions & 0 deletions stdlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ mod termios;
)))]
mod uuid;

#[cfg(feature = "tkinter")]
mod tkinter;

use rustpython_common as common;
use rustpython_vm as vm;

Expand Down Expand Up @@ -192,5 +195,9 @@ pub fn get_module_inits() -> impl Iterator<Item = (Cow<'static, str>, StdlibInit
{
"_locale" => locale::make_module,
}
#[cfg(feature = "tkinter")]
{
"_tkinter" => tkinter::make_module,
}
}
}
6 changes: 6 additions & 0 deletions stdlib/src/tkinter.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pub(crate) use self::_tkinter::make_module;

#[pymodule]
mod _tkinter {

}