homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients InfiniteHybrid, ned.deily, ronaldoussoren, serhiy.storchaka, terry.reedy
Date 2016年09月06日.07:36:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473147390.91.0.548742430402.issue27965@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is essentially a duplicate of 4832,ドル in which Ned Deily added 'defaultextension' in the code below. Saving works fine on Windows, The added default extension is not shown in the input box of the SaveAs dialog but it is visible in file listing or in the IDLE editor title bar. Ned said that with the his addition, it also worked on OSX. Are you sure there is no extension in a file listing or title bar if you don't add .py? What tcl/tk version are you using? (See Help => About IDLE.)
The relevant code in idlelib/iomenu.py (IOBinding before 3.6),
 filetypes = [
 ("Python files", "*.py *.pyw", "TEXT"),
 ("Text files", "*.txt", "TEXT"),
 ("All files", "*"),
 ]
 defaultextension = '.py' if sys.platform == 'darwin' else ''
...
 def asksavefile(self):
 dir, base = self.defaultfilename("save")
 if not self.savedialog:
 self.savedialog = tkFileDialog.SaveAs(
 parent=self.text,
 filetypes=self.filetypes,
 defaultextension=self.defaultextension)
 filename = self.savedialog.show(initialdir=dir, initialfile=base)
 return filename
History
Date User Action Args
2016年09月06日 07:36:30terry.reedysetrecipients: + terry.reedy, ronaldoussoren, ned.deily, serhiy.storchaka, InfiniteHybrid
2016年09月06日 07:36:30terry.reedysetmessageid: <1473147390.91.0.548742430402.issue27965@psf.upfronthosting.co.za>
2016年09月06日 07:36:30terry.reedylinkissue27965 messages
2016年09月06日 07:36:30terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /