PathGetter - 6.5
josmiley / Luke spywoker (mutualaccount)
This is a function that allows the user to enter a valid file path like in a file browser.
It returns a string.
Browse with mouse or keyboard. It supports tab-completion.
You can also display a resizable and rotatable image preview.
Usage is very simple:
In a python script: PathGetter(path='',mode=None,caption='Path Getter')
mode = None ==> any path
mode = 1 ==> file path
mode = 2 ==> directory path
The code is executed in a separated window using the subprocess module.
Therefore, it's independent of the size of your window.
see example_pathgetter.py for example
thanks to Jouni Järvinen and spacemax for testing and optimization.
change call method
from toolbox.EasyGame import pathgetter
add caption arg.
# -*- coding: utf-8 -*-
from toolbox.EasyGame import pathgetter,confirm
confirm('select a source directory and then a target directory',mode=1)
source = pathgetter(caption="select a source directory",mode=2)
target = pathgetter(caption="select a target directory",mode=2)
click to view original size
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
Oct 28, 2014
Oct 21, 2014
Oct 20, 2014
Oct 16, 2014
Oct 9, 2014
Oct 8, 2014
Oct 7, 2014
Oct 4, 2014
Oct 1, 2014
Sep 19, 2014
Sep 17, 2014
Sep 9, 2014