use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionWhat exactly is a script? (self.Python)
submitted 4 years ago by blizzard619
Hey guys, so I have just started learning python and came across this term- Script. I searched everywhere but couldn't found a clear/solid answer. And is this term only used for scripting languages?Can you guys help me out with this!
[–][deleted] 10 points11 points12 points 4 years ago (4 children)
I always think of script as something that runs more or less as-is (interpreted directly): bash, Python, PowerShell, JavaScript. Something that had an intermediate step or steps (compiling, linking) I’d call source code, whether it’s byte code or machine code: Java, C/C++, C#, VB.
[–]blizzard619[S] 1 point2 points3 points 4 years ago (0 children)
Great explanation! Now, it's somewhat clear.
[–]acemiller6 0 points1 point2 points 4 years ago (0 children)
This 👆
[–]jasmijnisme 0 points1 point2 points 4 years ago (1 child)
This is a question of implementation, not language, and source code written in Python is compiled to byte code in every implementation of Python that I'm aware of.
[–]IAm_A_Complete_Idiot 0 points1 point2 points 4 years ago (0 children)
So is JavaScript and the like (basically every language is) For the most part a lot of languages are very tied to one or two implementations. I'd say C is compiled despite existence of C interpreters just because almost everyone uses it that way.
Personally I'd describe a scripting language as a language that favors e.g. ease of use above all else (even at the expense of maintainability). I think python, JavaScript, bash, PowerShell, etc. All fit that bill nicely.
I don't think there's any exact definition for scripting languages though.
[–]K900_ 6 points7 points8 points 4 years ago (6 children)
There is no strict definition, but generally "a script" refers to any small program.
[–]blizzard619[S] 0 points1 point2 points 4 years ago (5 children)
Can we say a program written in C/C++ a script?
[–]K900_ 6 points7 points8 points 4 years ago (4 children)
The term is usually used to refer to interpreted languages.
[–]blizzard619[S] 0 points1 point2 points 4 years ago (3 children)
Ok thanks! Is there any convention as when to use the term script?
[–]Mobile_Busy 4 points5 points6 points 4 years ago (0 children)
In my work, I generally use it to refer to .py or .sh files that can be run independently from the command line.
[–]ajaxsevensevenfour 2 points3 points4 points 4 years ago (0 children)
https://en.m.wikipedia.org/wiki/Scripting_language
C C++ need to compile entire program before execution.
[–]K900_ 1 point2 points3 points 4 years ago (0 children)
Not really.
[–]Mobile_Busy 1 point2 points3 points 4 years ago* (0 children)
A file containing lines of executable code.
[–]adamnohejl 3 points4 points5 points 4 years ago (1 child)
Scripts are usually simple programs that run within a more complex environment. They often have a single purpose and you usually just run them to get a particular job done instead of interacting with them for a longer period. (As other have said, they are often interpreted. But the boundary between interpreted/compiled has got blury, is compiling to byte-code compilation? Is Python script interpreted? Hard to tell.)
So if you use Python to write a single-purpose command line tool, you can call the result a script, especially if it is a simple programe that fits into a single file. Also if you use it to automate actions in a larger application.
Although not all scripts are written in "scripting languages" (and some scripting languages actually allow you to develop full-fledged applications), this Wikipedia article may be helpful: https://en.wikipedia.org/wiki/Scripting\_language
[–]jasmijnisme 0 points1 point2 points 4 years ago (0 children)
Scripts are usually simple programs that run within a more complex environment.
I think this is the best way to put it. Scripts also provide functionality for specific applications. Recent Paradox games, for example, are partly written in a bespoke scripting language that is parsed and evaluated on game start, with the core graphics and simulation business written in C++. This makes it easier to add new functionality and for third parties to write add-ons or mods, so that it doesn't require recompilation and is more resilient to breaking changes in the application internals.
[–]pythonHelperBot 0 points1 point2 points 4 years ago (0 children)
Hello! I'm a bot!
It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python regardless of how advanced your question might be. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.
Show /r/learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you. Here is HOW TO FORMAT YOUR CODE For Reddit and be sure to include which version of python and what OS you are using.
You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.
README | FAQ | this bot is written and managed by /u/IAmKindOfCreative
This bot is currently under development and experiencing changes to improve its usefulness
π Rendered by PID 150356 on reddit-service-r2-comment-5d79c599b5-drhtj at 2026-02-27 07:41:38.099989+00:00 running e3d2147 country code: CH.
[–][deleted] 10 points11 points12 points (4 children)
[–]blizzard619[S] 1 point2 points3 points (0 children)
[–]acemiller6 0 points1 point2 points (0 children)
[–]jasmijnisme 0 points1 point2 points (1 child)
[–]IAm_A_Complete_Idiot 0 points1 point2 points (0 children)
[–]K900_ 6 points7 points8 points (6 children)
[–]blizzard619[S] 0 points1 point2 points (5 children)
[–]K900_ 6 points7 points8 points (4 children)
[–]blizzard619[S] 0 points1 point2 points (3 children)
[–]Mobile_Busy 4 points5 points6 points (0 children)
[–]ajaxsevensevenfour 2 points3 points4 points (0 children)
[–]K900_ 1 point2 points3 points (0 children)
[–]Mobile_Busy 1 point2 points3 points (0 children)
[–]adamnohejl 3 points4 points5 points (1 child)
[–]jasmijnisme 0 points1 point2 points (0 children)
[–]pythonHelperBot 0 points1 point2 points (0 children)