Questions tagged [interpreter]

An interpreter is a program that executes, i.e. performs, instructions written in a programming language. The tag [interpreter] should be applied to questions concerning the programming of interpreters or for questions about the detailed inner workings of interpreters. Use [interpreter-pattern] (possibly with this tag) for questions about the Gang of Four design pattern.

An interpreter is a program that executes, i.e. performs, instructions written in a programming language.

An interpreter may be a program that either

  1. executes the source code directly
  2. translates source code into some efficient intermediate representation (code) and immediately executes this
  3. explicitly executes stored precompiled code1 made by a compiler which is part of the interpreter system

From wikipedia

2265 questions
0
votes
5 answers

Shortest code to create an error that isn't a NameError or SyntaxError

In Python, many statements can cause errors, but I would like to know what are the simplest statements that can cause an Error except for NameError and SyntaxError and their subclasses such as IdentationError Using the interactive Python shell, I…
0
votes
1 answer

persistent constant values - Crafting Interpreters

I am reading the "Crafting Interpreters" by Bob Nystrom on chapter 26 Garbage Collection. On the first page, he says with the following example: var a = "first value"; a = "updated"; // GC here. print a; Say we run the GC after the assignment has…
0
votes
0 answers

Unable to install autopy on PyCharm

I've been trying to install autopy (4.0 version) on PyCharm and I'm also using the latest version of Python. I believe I've followed the instruction to download it on terminal like…
Meg_21
  • 1
  • 1
0
votes
1 answer

VS Code and Jupyter notebook problems with the python interpreter

Im currently doing a project in VS Code using Jupyter Notebook, however I have some problems with the python interpreter. The problem seem to do with VS Code using two different interpreters. I have chosen, what I think is the right interpreter, in…
0
votes
0 answers

How do you share programming language interpreter state between threads for parallel interpretation?

How do you share programming language interpreter state between threads for parallel interpretation? I wrote a simple parallel multithreaded imaginary assembly interpreter that can communicate variables and method calls between threads - it sends…
Samuel Squire
  • 127
  • 3
  • 13
0
votes
0 answers

In Pycharm , Selecting Interpreter

Let's say that Python has virtual environments env1, env2. When working with files within env1, I select the env1 interpreter, and when working with env2, I repeat the task of switching to the env2 interpreter. Can't I skip this course? Because this…
Chya
  • 1
  • 1
0
votes
0 answers

How can I start pycharm with a specific interpreter from commandline

The title basically says it all. But to give some context. I want to start pycharm from a c# program and on startup I like to specify a particular interpreter. Is this possible to do in pycharm and if so, how?
AndersG
  • 81
  • 7
0
votes
0 answers

PyCharm Python Console raises exception when opening

I am running PyCharm 2022.2.3 CE Snap on Debian 11, with a project venv Python 3.10.8. When opening a Python Console the an exception is raised, and gets raised again when entering any input. Running code, debugging, code completion etc. in other…
tompi
  • 291
  • 3
  • 10
0
votes
1 answer

Debugger from VSCode in WSL does not work - interpreter not working (not loading), any solutions?

Can anyone tell me how to correct this problem? When i press F5 or Ctrl+F5 - you can see the errors. On bottom bar left side - does not appear the interpreter from the top and right side. Thank you in advance!
0
votes
1 answer

PyDev python interpreter argument/option field missing?

I have issue to configure PyDev Python interpreter with Eclipse in order to be able to run script with "-m" python interpreter argument/option. Does anybody know where exactly one could set that argument? In command line one would do like…
MWolf
  • 3
  • 1
0
votes
1 answer

Beanshell interpreter with javaFX

New to Beanshell interpreter. Why does the line that has comment Does not work not work? I have used the instance.method with success before. This is my first post on here, so excuse me if this is not the correct format. Also, I have tried to find…
0
votes
0 answers

Interpreter compile and run time

After tons of googling, it seems that an interpreter both translates code and execute that same line of code immediately once it is translated. From my understanding, compile time is the period in which source code is being translated. Whereas run…
Jackson
  • 17
  • 4
0
votes
1 answer

How compile time local array index is same as runtime time stack index

I am reading from Book Crafting Interpreters by Bob Nystrom. I am on chapter 22-Local Variable in which under the section Using Locals he said "At runtime, we load and store locals using the stack slot index, so that’s what the compiler needs to…
0
votes
0 answers

weird code generated by python while saving file

this is not really a question, I'm just curious: one time I was coding a simple program in python with tkinter and socket, and when a saved the file, it bugged out and saved the file like this:(I pressed ctrl+z I didn't lost the…
0
votes
0 answers

ansible execute python target with different interpreter

I have a playbook that has a task remote calling a python program in the name of another user on a remote system. This fails due python interpreter mismatch. - name: Run another python script on the other host become: yes become_method: sudo …
snailrider
  • 63
  • 9
1 2 3
99
100