Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Make consoles to start without an stderr file #5457

Merged
merged 7 commits into from
Oct 17, 2017
Prev Previous commit
Next Next commit
IPython console: Make stderr_file to be None if errors appear
  • Loading branch information
ccordoba12 committed Oct 13, 2017
commit 7a19d3f6e9274402d37848b0817466e7ec6dc36e
12 changes: 8 additions & 4 deletions spyder/widgets/ipythonconsole/client.py
Original file line number Diff line number Diff line change
@@ -156,15 +156,19 @@ def kernel_id(self):
@property
def stderr_file(self):
"""Filename to save kernel stderr output."""
stderr_file = None
if self.connection_file is not None:
stderr_file = self.kernel_id + '.stderr'
if self.stderr_dir is not None:
stderr_file = osp.join(self.stderr_dir, stderr_file)
else:
if not osp.isdir(TEMPDIR):
os.makedirs(TEMPDIR)
stderr_file = osp.join(TEMPDIR, stderr_file)
return stderr_file
try:
if not osp.isdir(TEMPDIR):
os.makedirs(TEMPDIR)
stderr_file = osp.join(TEMPDIR, stderr_file)
except (IOError, OSError):
stderr_file = None
return stderr_file

def configure_shellwidget(self, give_focus=True):
"""Configure shellwidget after kernel is started"""