0

Which one is correct:

The client part was also implemented in Python which runs on a web browser with the help of the Brython translator.

or,

The client part was also implemented in Python which runs in a web browser with the help of the Brython translator.

?

1

2 Answers 2

0

In general, "in" sounds more natural when talking about a web browser. A browser is conceived of as a place you inhabit while consuming web content. However, "on" can be used to emphasize the platform for software (e.g., "it runs on Windows"). In this case, the browser serves as the platform for code. So both sentences sound OK.

1

Generally on is used to describe the hardware on which a program runs:

The program is written in Java, and as such it can be run on Windows PCs, Macs, and *nix machines.

In is used to describe where exactly the program runs, in the context of a single machine:

The script is executed in userspace.
JavaScript runs in a specific browser tab.

(The line can get a little blurred in the context of a virtual machine, which is a piece of software which emulates an entirely different piece of hardware; I think saying "the program is running in/on a virtual machine" would both be idiomatic.)

In your case I would say that the Python program runs in a browser window, if it is the case that closing the browser window will terminate the Python program—that is, it is not being executed as its own distinct process, but only as a child process of the browser program.

2
  • I hate to be pedantic, but "Windows, Mac, and Linux" are operating systems, (software) not hardware. If you meant operating system, you could say "The program is written in Java which runs under Windows, Mac, and Linux" . Or if you really meant hardware then " .... which runs on PCs, Apple MacBooks and IBM AIX machines" Mar 25, 2022 at 21:40
  • @Peter: no need to apologize, I'm an incorrigible pedant myself. Edited.
    – randomhead
    Mar 25, 2022 at 22:00

You must log in to answer this question.