Support
Quality
Security
License
Reuse
kandi has reviewed twoway-view and discovered the below as its top functions. This is intended to give you an instant insight into twoway-view implemented functionality, and help decide if they suit your requirements.
A LayoutManager base class that greatly simplifies the development of custom layouts for RecyclerView
A collection of feature-complete stock layouts including:
List
Grid
Staggered Grid
Spannable Grid
A collection of stock item decorations including:
Item spacing
Horizontal/vertical dividers.
ListView-style pluggable APIs for:
Item click and long click support e.g. OnItemClickListener and OnItemLongClickListener.
Item selection (single and multiple) support e.g. setChoiceMode(), setItemChecked(int, boolean), etc.
Snapshot
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
compile 'org.lucasr.twowayview:core:1.0.0-SNAPSHOT@aar'
compile 'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT@aar'
}
Stable Release
<dependency>
<groupId>org.lucasr.twowayview</groupId>
<artifactId>twowayview</artifactId>
<version>0.1.4</version>
</dependency>
License
Copyright (C) 2013 Lucas Rocha
QUESTION
Correct way to run two Tk() mainloops independently, with second being started from first script?
Asked 2022-Apr-18 at 02:03script_a.py
from tkinter import *
from script_b import test
root = Tk()
var1 = stuff
var2 = stuff
def start_scriptb():
test([var1, var2])
Button(root, text="Start",
command=start_scriptb)
root.mainloop()
script_b.py
from tkinter import *
def test(x):
main = Tk()
Label(main, text=x)
Button(main, text="Exit", command=main.destroy())
main.mainloop()
This is a very basic version of what I'm trying to achieve. I actually am spawning a progress window that uses subprocess.Popen in script 2 with the passed through variables from script one and viewing the progess through a scrolled text widget on the 2nd program. I'm trying to spawn a new process, independent from the root GUI each time that button is hit from script_a.
It works fine in my tests so far, but I wanted to see if this could cause any issues or if this is actually spawning two processes?
I know there should only be one Tk()
per process.
Using a TopLevel()
window to show the progress works fine with the threading module, but the TopLevel()
window will freeze as well as root (and any other open TopLevels()) if root is doing any sort of processing that takes any length of time.
ANSWER
Answered 2022-Apr-18 at 02:03With many hours of testing, I did have success in running two Tk() loops, but it had potential to be problematic, as "Bryan Oakley" had posted in many threads about.
Ultimately, I decided when I was in need of running something alone, I'd start my GUI with arguments and process it in an entirely new process instead of passing any arguments directly. Seems like a safer option.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
Explore Related Topics
Save this library and start creating your kit