I tried running python etc. from a bat file

Run C or python in a bat file

It's cold these days.

Why such a troublesome thing

e? why? Well, hey ... what is a dream? Oh, maybe it's easier to understand the detailed method if you google it yourself. Because I am self-sufficient.

I tried it

First from the bat file. Execution of c language ↓ (There is no choice but to rewrite options etc. at any time. ~~ or nobody uses ~~)

@echo off
gcc %1
a

Run python ↓

@echo off
python %1

The code I ran this time (C language & python)

//test.c
#include <stdio.h>

int main(){
    printf("OK!! this is c");
    return 0;
} 
#test.py
print("OK! this is python")

result

did it! I did it.

OK!! this is c
OK! this is python

Recommended Posts

I tried running python etc. from a bat file
I tried reading a CSV file using Python
I tried running alembic, a Python migration tool
[Python] I tried running a local server using flask
I tried reading data from a file using Node.js.
I tried Grumpy (Go running Python).
I tried running prolog with python 3.8.2.
I tried to convert a Python file to EXE (Recursion error supported)
I tried using UnityCloudBuild API from Python
I tried a functional language with Python
Create a deb file from a python package
I made a configuration file with Python
I made a python dictionary file for Neocomplete
I tried playing a typing game in Python
I tried Python! ] I graduated today from "What is Python! Python!"!
[Memo] I tried a pivot table in Python
I tried debugging from Python via System Console
I tried running faiss with python, Go, Rust
I tried running python -m summpy.server -h 127.0.0.1 -p 8080
Run a Python file from html using Django
I tried adding a Python3 module in C
I tried running Deep Floor Plan with Python 3.6.10.
Read line by line from a file with Python
I want to write to a file with Python
I tried running pymc
I tried Python> autopep8
I tried Python> decorator
I tried running TensorFlow
It's easier to iterate over a python file from a command prompt (cmd) .bat
I tried running two Jetson Nano hardware PWMs from the Jetson.GPIO Python library.
[Python] I tried to get the type name as a string from the type function
Make a copy of a Google Drive file from Python
I tried to touch the CSV file with Python
I tried to draw a route map with Python
I tried to implement a pseudo pachislot in Python
A memorandum to run a python script in a bat file
I want to randomly sample a file in Python
From buying a computer to running a program with python
I tried to automatically generate a password with Python3
I tried drawing a pseudo fractal figure using Python
I tried collecting data from a website with Scrapy
Python script to create a JSON file from a CSV file
I tried using Python (3) instead of a scientific calculator
Python: I tried a liar and an honest tribe
[Python] Start a batch file from Python and pass variables.
I tried fp-growth with python
I tried scraping with Python
I tried Python C extension
[Python] I tried using OpenPose
I made a python text
I tried gRPC with Python
I tried scraping with python
I tried to create API list.csv in Python from swagger.yaml
I tried using the Python library from Ruby with PyCall
I tried to implement a one-dimensional cellular automaton in Python
I tried sending an email from Amazon SES with Python
I tried running Movidius NCS with python of Raspberry Pi3
python Condition extraction from a list that I often forget
I want to start a lot of processes from python
[Markov chain] I tried to read a quote into Python.
I tried "a program that removes duplicate statements in Python"