Python Forum
Python function call font color
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python function call font color
#1
I'm quite new to Python, but I've noticed that writing code that uses a lot of function calls is quite difficult to read quickly, as no font distinction seems to be made between variables and functions. I'm not too sure if this is due to the IDEs that I'm using (Spyder and VS Code), but I've noticed that when I define a function in Python, then in the Spyder IDE the function's font is bold and black, and in VS Code using the Monokai color theme, the function's font is green. However, if I try and actually call the function, then its font is exactly the same as a normal variable's font. Is there any way that I can force a color change to take place when a Python function is called? I'm hoping to be able to have a similar format to C++ in VS Code, which gives function calls a different color to plain variables, and makes reading large bodies of code rather easy. Apologies, as this is a weird question to ask in the first place.
Reply
#2
Maybe this from VS Code docs helps: Customizing a Color Theme

Quote:To tune the editor's syntax highlighting colors, use editor.tokenColorCustomizations in your user settings settings.json file:
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python code for alignment and font size 1418 0 272 Jan-14-2024, 03:56 AM
Last Post: 1418
  Turtle Star Fill Color Yellow-White Interchanging Color Effect codelab 9 900 Oct-25-2023, 09:09 AM
Last Post: codelab
  How do I call sys.argv list inside a function, from the CLI? billykid999 3 752 May-02-2023, 08:40 AM
Last Post: Gribouillis
Photo Visual studio code unable to color syntax on python interpreter tomtom 4 6,677 Mar-02-2022, 01:23 AM
Last Post: tomtom
  how to call an object in another function in Maya bstout 0 2,042 Apr-05-2021, 07:12 PM
Last Post: bstout
  Load external font and does not show font in the window ATARI_LIVE 16 7,981 Feb-05-2021, 10:36 PM
Last Post: EthanPayne
  In this function y initially has no value, but a call to foo() gives no error. Why? Pedroski55 8 3,414 Dec-19-2020, 07:30 AM
Last Post: ndc85430
  Struggling for the past hour to define function and call it back godlyredwall 2 2,156 Oct-29-2020, 02:45 PM
Last Post: deanhystad
  list call problem in generator function using iteration and recursive calls postta 1 1,862 Oct-24-2020, 09:33 PM
Last Post: bowlofred
  function call at defined system time? Holon 5 3,154 Oct-06-2020, 03:58 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020