The only way that I know of is to use a widget for the directory and one for the file, then os.path.join them... import os from gimpfu import * gettext.install("gimp20-python", gimp.locale_directory, unicode=True) def jbtest(project_directory, new_file): final_str = "Test Text..." output_file = open(os.path.join(project_directory, new_file), 'w') output_file.write(final_str) output_file.close() register( "jbtest", N_("Choose a Directory and Filename:"), "Create a new file in the specified directory", "Jerry Baker", "Jerry Baker", "11/14/2011", N_("jbtest"), "", [ # --- Parameters (PF_DIRNAME, "project_directory", _("Project Directory:"), ""), (PF_STRING, "new_file", _("File Name:"), _("new_file.txt")), ], [ # --- Results ], jbtest, menu="<Image>/_Dev", domain=("gimp20-python", gimp.locale_directory) ) main() -----Original Message----- From: Ofnuts <ofnuts laposte net> Cc: gimp-developer-list gnome org <gimp-developer-list gnome org> Subject: Re: [Gimp-developer] Python-fu: difference between PF_FILE and PF_FILENAME, and how to ask for a file name to *create* Date: Mon, 14 Nov 2011 21:53:25 +0100 OK, makes sense. Now, how can I prompt for the name of a file that doesn't exist (yet)? On 11/14/2011 01:32 PM, Jerry Baker wrote: PF_FILENAME: Only allows the user to choose a file. _______________________________________________ gimp-developer-list mailing list gimp-developer-list gnome org http://mail.gnome.org/mailman/listinfo/gimp-developer-list |