A forum for general discussion of the Python programming language.
working on windows.
using git bash
I'm trying to run git command from a python script (in git bash program).
- Code: Select all
>>> import os
>>> os.system("git status")
'git' is not recognized as an internal or external command,
operable program or batch file.
This works when running from cmd.exe BUT does not work when running from git bash
Last edited by stranac
on Sun Oct 20, 2013 11:12 am, edited 1 time in total.
Reason: First post lock. Made the letters readable.
- Posts: 1
- Joined: Sun Oct 20, 2013 10:40 am
You probably need to modify your bash PATH. There's probably a .bashrc file or something to do so, but I'm not sure if there's something special to doing it on bash on windows.
Join the #python-forum IRC channel on irc.freenode.net!
Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
- Posts: 1271
- Joined: Tue Feb 12, 2013 2:18 am
- Location: Mountain View, CA
Return to General Discussions
Who is online
Users browsing this forum: Baidu [Spider], Google Feedfetcher, Google [Bot] and 1 guest