Run a .bat file using python code

rajeshkumar created the topic: Run a .bat file using python code

from subprocess import Popen
p = Popen(“batch.bat”, cwd=r”C:\Path\to\batchfolder”)
stdout, stderr = p.communicate()
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Perforce Python Script Collection.

rajeshkumar created the topic: Perforce Python Script Collection.

Implement a script that will do following:

1. Read config file. This file will contain following settings:
a. For mail delivery (SMTP)
b. For access to perforce server
2. Get from perforce a list of changes made since last script run time and get all updated files
3. Invoke script that will ‘build’ the changes – it will be located in the working folder of the
script(build.bat/build.sh). Script itself should come from perforce as well during step 2.
4. If running of build script is successful, add/update contents of folder named ‘bin’ in the perforce
repository (it is expected that build script will put there a product of its work)
5. In case of error of invocation, send out an email with the list of changes retrieved in p.2 and all outputs of
build script (both stdout/stderr), in which case contents of ‘bin’ folder should not be updated to perforce

Solution
Script details:
master.py – This file is the main file which should be excuted to get the all desired output as per the task
build.bat – This is a Build file which will be executing during compilation phase in master.py. config.ini: Following key should be modified as the environment specification

Sender
Receivers
Message
Host
p4port
p4user
p4client
p4passwd
Scenario to create fail Build:
Remove comment line from “REM mkdir raj” in build.bat

How to use?
Change the config.ini file appropriately and fire master.py script. If you find any issues, please follow the log error message accordingly.

File is as attached

File Attachment:
File Name: build.bat.txt
File Size:0 KB

File Attachment:
File Name: config.ini.txt
File Size:0 KB

File Attachment:
File Name: Index.txt
File Size:0 KB

File Attachment:
File Name: master.txt
File Size:4 KB
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

How do I convert a python program to a windows executable from Linux?

rajeshkumar created the topic: How do I convert a python program to a windows executable from Linux?
I use Linux and Windows with some friends a few programs I like python with pygame module math, and how the built GTK will try. (It seems that I can use Windows that I’m not is a copy of.)

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Any Possible Software/Plugin FoR SCM Workflow

pankaj2252369@gmail.com created the topic: Any possible Software/plugin for SCM workflow?
Hey Team, Thanks for lot of information on the site. wonderful work.

Any idea on SCM workflow software/framework ? which would help me to complete the SDLC lifecycle.

For E.g: When ever developers are done with their changes/check-ins, they would request CM team to build (via Email), And when CM builds and deploy , they will email to Testing Team, finally when its been tested they will let CM/RM team inform about the bugs, etc. finally product will be released.

All this was happening manually(via emails). If we have a workflow software, so that we can have everything in process oriented and SCM would be very easy.

Any Suggestion are welcome.

If know of any plug-ins , we can extend our programs to make it work to our systems.

Thanks in Advance!

rajeshkumar replied the topic: Re: Any possible Software/plugin for SCM workflow?
I would suggest following in Commercial | Opensource:-
SCM Workflow consisit of following..
SCM Tools |Scripting |Build / WorkFlow Mgmt Tools |
| Release / Dep Tools | Security | Testing Tools |
Test Coverage | Source-code Analysis | Issue Tracking Tools | IDEs Integration |Virtualization |

Please find list of tools and find you combination based in your project requirement and budget

Build / WorkFlow Mgmt Tools

AnthillPro
Apache Continuum
Bamboo
CruiseControl
Hudson
LuntBuild
OpenMake Meister
TeamCity
Team Foundation Server
Electric Cloud

SCM Tools

AccuRev
ClearCase
CA Harvest
CVS
Dimensions
Git
MKS Source Integrity
Mercurial
Perforce
PVCS
StarTeam
Subversion
Synergy
Team Foundation Server
Vault
ViewVC
VSS

Scripting

Ant
Groovy
Make
Maven
MSBuild
NAnt
Shell Scripts
Perl Scripts
Visual Studio

Release / Dep Tools
Cruise
Rational Team Concert
Manual

Security

Active Directory
Kerberos
LDAP
Single Sign-on
RSA SecurID

Testing Tools
Clover
Cobertura
Emma

Source-code Analysis

Checkstyle
CodeSonar
Coverity
FindBugs
Fortify
Klocwork
PMD
Sonar

Issue Tracking Tools

Bugzilla
ClearQuest
HP Quality Center
JIRA
PVCS Tracker
Team Foundation Server
TeamTrack
VersionOne

IDEs Integration

Eclipse
RAD
Visual Studio

Virtualization

VMWare Lab Manager
Microsoft
Amazon (Elastic Cloud)
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

pankaj2252369@gmail.com replied the topic: Re: Any possible Software/plugin for SCM workflow?
Thanks for the response. But this i snot actually i am looking for.. I have idea on the mentioned tools. But wanted to create one separate tool for our internal purpose. So i am just checking, if there are any SCM related plugins /frame works in market, So that i do not spend more time on the things that are available.

Anyways.. Thank you so much!

rajeshkumar replied the topic: Re: Any possible Software/plugin for SCM workflow?
Hi John,

May be i am getting confused from you questions. Framework which can help you to develop your internal tools????

You mean you would like to develop your own tools, Then you might want to identify the technology first using which you want your development work get started. There are plenty of framework in Java| C++ | Perl | Pythin| Php | Ruby on rails etc
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged : / / / / /

Top 10 Scripting Languages in DevOps | List of Best Scripting Languages

top-10-scripting-languages-in-devops
This is the time of DevOps in software industry and DevOps uses different different languages for deployment automation and for software development. This is the reason if you are a DevOps professional and want to be succeed in DevOps role than command on scripting languages is must. But, one can not be a master of all. Right? Therefore, In this article I am going to share a list of top 10 scripting languages which will be useful for your DevOps journey.
But before that let’s have a quick look on Scripting language.
Scripting languages are programming languages that communicate and integrate with other programming languages. In other words, scripting languages controlls interactive programs operations by giving it sequence of work to execute by one command at a time.
Now, let’s look on to the list of top 10 scripting languages

1. Microsoft PowerShell

Microsoft PowerShell

Microsoft powershell or powershell is belongs to Microsoft and an open source cross platform scripting language. If you have application infrastructure with windows than powershell is must for you. This scripting language is designed for system admins.
2. Puppet

Puppet

Puppet is a configuration management tool and it has it’s own declarative language to describe system configuration. It runs on Linux, Unix-like and also on Windows. This one is available under Apache 2.7.0 and General Pubic license.  Puppet uses a custom declarative language, it just needs to specify ‘what’ action needs to be performed on the resources.
3. Chef

Chef

Chef is basically known as configuration management which belongs to chef is also a scripting language which is designed by David Morgan. It makes programs look like cooking any food.
4. Bash

Bash

Bash is basically a command language which is available in open source and written by Brian Fox in the year 1989. It can read scripts and Bash is the most commonly used Unix shell. Bash supports Linux, Windows and Mac OS.
5. Ruby

Ruby

Ruby is amongst one of the best programming language but it is also a scripting language which is written by Yukihiro Matsumoto in the year 1995. Ruby supports cross platforms and it is available under GPL and BSD license. It supports multiple programming paradigms, including functional, object-oriented, and imperative.
6. Ansible

Ansible

Ansible is known as configuration management and application deployment tool but it is also amongst top scripting languages. This language is belongs to Ansible Inc. and written by their community members. It supports Linux, Unix-like and Windows operating system.
7. Perl

Perl

Perl is a scripting language which is used for advanced web applications development. Perl is written by Larry Wall and first released in the year 1987. Perl supports cross platforms. Perl is available under general public license.
8. Python

Python

Python is also amongst the top scripting languages which is used for high level of programming. It was first released in the year 1991 by Guido van Rossum. python is available under Python Software Foundation License. It’s supports Cross-platform.
9. Go language

Go language

Go scripting language belongs to the Internet giant Google. This scripting language is written by Robert Griesemer, Rob Pike and Ken Thompson and it was released in the year 2009. It supports  Linux, macOS, FreeBSD, NetBSD, OpenBSD, Windows, Plan 9, DragonFly BSD and Solaris operating systems. It is available in open source.
10. Groovy

Groovy

Groovy can be used as a scripting language and it is also consider as a top scripting languages for DevOps professionals. It was designed by James Strachan and developed by Guillaume Laforge, Jochen Theodorou, Paul King and Cedric Champeau. It was first released in the year 2003 and available under Apache license. It supports Java platform.
Do you agree with this list? If not than feel free to respond in the comment box with your own take on the most essential scripting languages. One more thing, I would like to add here, if you need help to learn all these scripting languages and DevOps courses than scmGalaxy can help you in this. scmGalaxy is a community of DevOps professionals who are well experienced in this domain.
Tagged : / / / / / / / / / / / / / / / / / / /