Tag: python

.gitignore when developing Python and Django Applications on Windows

What should I change in my .gitignore file when I’m developing Python/Django applications using PTVS, naturally, on Windows?

Unable to automate git fetch && git checkout using python

I have automated the process of git checkout a particular branch which a user want to enter. I am using the following python code with subprocess to do so , from bitbucket.bitbucket import Bitbucket from sys import argv import subprocess prompt = ‘> ‘ print “Enter the name of branch you need to clone: ” […]

How to create a comment on a Bitbucket pull request

How do you programmatically make a comment (preferrably with Python) on a pull request hosted on Bitbucket? I have a Buildbot server continuously running tests on all my branches hosted on Bitbucket, and after it runs tests for a branch, I want it to check for any pending pull requests and automatically create a comment […]

I want to play a sound ( a song from my computer,preferred) on completion of my python program

First of all, I am new to python. I am trying to make a web crawler that keeps keeps checking a particular website until it finds a specific tv series keywords available. I have gone through the other answers many times by now, but nothing works for me. I am unable to install pygame as […]

Python's Popen + communicate only returning the first line of stdout

I’m trying to use my command-line git client and Python’s I/O redirection in order to automate some common operations on a lot of git repos. (Yes, this is hack-ish. I might go back and use a Python library to do this later, but for now it seems to be working out ok 🙂 ) I’d […]

Removed .py files, compiled .pyc files and git – how to?

I have removed some files (a.py and b.py) from project and committed my changes. My teammate pulled changes and program exited with errors. After some research we have found problem: Git removed a.py and b.py files, but compiled .pyc files remained and caused problems – program used old sources and get an errors. .pyc files […]

How do I restart a python script running inside of a screen using a bash script?

Okay here’s my situation: On a server I have a screen session (which was initiated using screen -S python-script) running a python script inside of it. I make changes to this project by pushing to a git repo. When I want to have the changes reflected on the project, I ssh into the server, screen […]

Ac2git giving Attribute Error

I am trying to use ac2git to convert my Accurev Depot to Git Repository. I followed the steps given here: https://github.com/NavicoOS/ac2git. I am getting this error when trying to run the python ac2git.py command and the operation is aborted: 2016-08-24 09:07:31,312 – ac2git – ERROR – The script has encountered an exception, aborting! Traceback (most […]

add python modules that depend on each other as git submodules

I have these 2 little modules in 2 separate git repositories: RepoA/A.py def foo(): return “Hello World” RepoB/B.py import sys try: import A except ImportError: print(“Dependency not available!”) sys.exit(1) def bar(): return A.foo() + ” EXTENDED!” You see that B currently assumes A is importable globally (either installed or in the script-execution directory). Both have […]

Trying to push my app to heroku gives me this error FileNotFoundError: No such file or directory: '/app/gettingstarted/media'

While trying to push my app I get the follwing error FileNotFoundError: [Errno 2] No such file or directory: ‘/app/gettingstarted/media’ But it does exist which confuses me.My file structure that leads to it is this src/gettingstarted/media Media is an empty directory. My pushes were working just last night. Heres the result of me running git […]

Git Baby is a git and github fan, let's start git clone.