Visualize the full chess board from the library python-chess on line command

0 votes

I am working a chess game based on this library: https://pypi.org/project/python-chess/ or https://github.com/niklasf/python-chess

On Jupyter Notebook, if I run this code:

import chess
board = chess.Board()
board

It will display a nice board (i.e. with colors, shape, looking like a chess board). If I run like this:

import chess
board = chess.Board()
print(board)

It will display the board in a much more rudimental way with letters.

The problem is that the only way of seeing the nice board, using the "board" command, is if I am using Jupyter Notebook. If I try to run on Visual Studio or line command the command "board" nothing will happen. It seems that the line command will not support the use of "board" (from their website: Supports Python 3.6+ and PyPy3.IPython/Jupyter Notebook integration).

Is there a way around this? In other words, can I still run "board" on command line and visualize the nice chess board?

Nov 22, 2022 in Python by sarit
• 1,830 points
1,141 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

Is it possible to run a function in Python using the command line?

Suppose your file name is demo.py and ...READ MORE

answered Jun 26, 2019 in Python by Neel
• 3,020 points
1,045 views
0 votes
1 answer

Can we download python from command line?

Open a command prompt window and navigate to the ...READ MORE

answered Aug 6, 2019 in Python by Mohammad
• 3,230 points
755 views
0 votes
1 answer

I am trying to install visualize on my python 3.8 but i end up with the followinf error.

Hi@Avinash, I think the module name is visualization ...READ MORE

answered Apr 27, 2020 in Python by MD
• 95,460 points
1,584 views
0 votes
1 answer

What is the purpose of ​#!/usr/bin/python​on the first line in the above code?

Hey, @Roshni, By specifying #!/usr/bin/python you specify exactly ...READ MORE

answered Jun 23, 2020 in Python by Gitika
• 65,770 points
11,200 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP