Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix TypeError and better input handling
  • Loading branch information
WnP committed Feb 7, 2015
commit f7ce7d208804072db40afc69ab8bb9ff21b9e261
7 changes: 3 additions & 4 deletions stackit/stackit_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
import re


get_input = input
if sys.version_info[:2] < (3, 0):
get_input = raw_input
input = raw_input

NUM_RESULTS = 5
# API key is public, according to SO documentation
Expand All @@ -37,7 +36,7 @@
so.be_inclusive()

def promptUser(prompt):
response = get_input(prompt)
response = input(prompt)
return response

def focusQuestion(questions, count):
Expand Down Expand Up @@ -132,7 +131,7 @@ def getTerm(parser):
filename = (os.getcwd()).replace(' ','\ ') + "/" + commandlist[1]
process = subprocess.Popen(command + " " + filename, stderr=subprocess.PIPE, shell=True)
output = process.communicate()[1]
term += (output.splitlines()[-1] + bytes(" ", "ascii"))
term += (str(output.splitlines()[-1]) + " ")
return term

def getTags(parser):
Expand Down