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

Python subprocess fails to call ConEmu when the task name has space. #107

Closed
yanxyz opened this Issue Apr 19, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@yanxyz

yanxyz commented Apr 19, 2015

I try to launch ConEmu in SublimeText 3, but meet a problem. To simplify this problem, I try to run the Python script below from the ConEmu dir:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import subprocess

subprocess.call(['ConEmu.exe', '/cmd', '{Git Bash}']);

It is failed:

...

Command to be executed:
"C:\Windows\system32\cmd.exe" /C "{Git Bash}"

I try the task {cmd}, it's ok. It seams that the task name can't have space in it, so I rename the task {Git Bash} to {GitBash}, now it's ok.

How to resovle this problem if the task name has space?

OS info: win8.1 x64 Python3.4.1

@xylographe

This comment has been minimized.

Contributor

xylographe commented Apr 19, 2015

Have you tried subprocess.call(['ConEmu.exe', '/cmd', '"{Git Bash}"']); ?

@yanxyz

This comment has been minimized.

yanxyz commented Apr 19, 2015

yes, I did. However it is also failed:

Command to be executed:
"C:\Windows\system32\cmd.exe" /C "\"{Git Bash}\""

I also tried subprocess.call(['ConEmu.exe', '/cmd', '{"Git Bash"}']), it is also failed. It seems that the only resolution is removing the space in the name of task.

@Maximus5

This comment has been minimized.

Owner

Maximus5 commented Apr 19, 2015

That's a crazy quotation issue. Following works

subprocess.call(['ConEmu.exe', '/cmd', '{Git', 'Bash}']);
@yanxyz

This comment has been minimized.

yanxyz commented Apr 19, 2015

Oh, that's so crazy! Thank you very much, @Maximus5

@yanxyz yanxyz closed this Apr 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment