2.1.0 build
This commit is contained in:
@@ -2,6 +2,10 @@ import os
|
||||
import tempfile
|
||||
|
||||
def prompt(default=None):
|
||||
"""
|
||||
lets user paste input by opening a temp file in a text editor
|
||||
returns str (content of tmp file)
|
||||
"""
|
||||
editor = 'nano'
|
||||
with tempfile.NamedTemporaryFile(mode='r+') as tmpfile:
|
||||
if default:
|
||||
@@ -16,4 +20,4 @@ def prompt(default=None):
|
||||
else:
|
||||
os.waitpid(child_pid, 0)
|
||||
tmpfile.seek(0)
|
||||
return tmpfile.read().strip()
|
||||
return tmpfile.read().strip()
|
||||
|
||||
Reference in New Issue
Block a user