[issue27965] Automatic .py extension when saving with IDLE on OSX

2020-06-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE does not supply a default ext of .py on Windows or OS X 
for new file saves

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27965] Automatic .py extension when saving with IDLE on OSX

2016-09-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: automatic .py extension -> Automatic .py extension when saving with IDLE 
on OSX
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27965] automatic .py extension

2016-09-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

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

--
components: +Tkinter
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27965] automatic .py extension

2016-09-05 Thread Martin Panter

Changes by Martin Panter :


--
assignee:  -> terry.reedy
components: +IDLE
nosy: +terry.reedy
type: performance -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27965] automatic .py extension

2016-09-05 Thread Marcquise Washington

Changes by Marcquise Washington :


--
type: behavior -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27965] automatic .py extension

2016-09-05 Thread Marcquise Washington

New submission from Marcquise Washington:

I am experiencing an issue where when I finish coding a program and I go to 
save file, just before running the program, I have manually add the .py 
extension, instead of the extension being already embedded with the file name, 
given that I am saving the file through the (IDLE/python) 
script/interpreter/compiler. On other systems it seems to automatically ad the 
.py extension when saving files, but not on my Macbook Pro (Running OS X El 
Capitan V 10.11.6). Please help

--
components: Macintosh
messages: 274511
nosy: InfiniteHybrid, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: automatic .py extension
type: performance
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com