Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: file selector for deerpygui #16

Open
2 tasks done
mokurin000 opened this issue Sep 27, 2024 · 3 comments
Open
2 tasks done

Feature: file selector for deerpygui #16

mokurin000 opened this issue Sep 27, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@mokurin000
Copy link
Contributor

mokurin000 commented Sep 27, 2024

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar questions in the project's issue tracker to avoid duplicates.
  • I have searched existing issues to see if this question has been asked before.

Your Question

def main():
    parser = argparse.ArgumentParser(description="Web scraper with aria2c output")
    parser.add_argument("urls_file", type=Path, help="Input file containing URLs")
    parser.add_argument(
        "aria2c_file", type=Path, help="Output file for aria2c download links"
    )
    parser.add_argument(
        "--timeout", type=int, default=5000, help="Timeout per page (ms)"
    )
    parser.add_argument(
        "--max_workers", type=int, default=2, help="Maximum number of workers"
    )
    args = parser.parse_args()
    blocking_run(args)

I hope we could select input file and set output file path with native dialog, instead of typing path manually
AFAIK tkinter filedialog will be the native implementation

@mokurin000 mokurin000 added the question Further information is requested label Sep 27, 2024
@mokurin000
Copy link
Contributor Author

After looking into source code, I found type=argparse.FileType('w') for a TextIOWrapper,
but all I need is a file path.. so I could open it via async_open later
I will try to add hint for Path

@mokurin000 mokurin000 changed the title Question: How could I set an argument by save_file dialog Feature: file selector for deerpygui Oct 2, 2024
@FredHappyface
Copy link
Member

The default gui is dearpygui (changed after all the nonsense with pysimplegui (I plan on deprecating support for these gui options as an aside). And the dearpygui implementation I've seen involves opening a window as a child of the main window and then setting this in a callback. I had a quick play around a while back and couldn't get this to work. Though I'd like to revisit this when I have more time!

@FredHappyface
Copy link
Member

Implemented Path support in freepygui. Haven't taken another look at dearpygui yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants