Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Make color for string when print to console
#1
Hi Everyone.

I want to make color for text, string when print into the console window but could not.

I have searched on google but not lucky.

How to do that ?

My Python ver 3.7.4

Thanks in advance!
Quote
#2
(Oct-31-2019, 02:19 AM)hadoan Wrote: Hi Everyone.

I want to make color for text, string when print into the console window but could not.

I have searched on google but not lucky.

How to do that ?

My Python ver 3.7.4

Thanks in advance!

Hi!

It depends on which console you are using. You cannot do it with the Python 3.7.4 Shell. You could use for instance Cmder instead.

You also need to install and then import a module dedicated to use and format colour in python, and then make a program or use formatting according to the module you have installed.

More information here, where I compare different such modules and show some little programs on how to use their characteristics:

https://python-forum.io/Thread-colouring-strings

All the best,
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Quote
#3
(Oct-31-2019, 03:32 AM)newbieAuggie2019 Wrote:
(Oct-31-2019, 02:19 AM)hadoan Wrote: Hi Everyone.

I want to make color for text, string when print into the console window but could not.

I have searched on google but not lucky.

How to do that ?

My Python ver 3.7.4

Thanks in advance!

Hi!

It depends on which console you are using. You cannot do it with the Python 3.7.4 Shell. You could use for instance Cmder instead.

You also need to install and then import a module dedicated to use and format colour in python, and then make a program or use formatting according to the module you have installed.

More information here, where I compare different such modules and show some little programs on how to use their characteristics:

https://python-forum.io/Thread-colouring-strings

All the best,
Thanks you so much Bro :)
Quote
#4
(Oct-31-2019, 03:48 AM)hadoan Wrote: Thanks you so much Bro :)

You're welcome! Smile
hadoan likes this post
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Quote
#5
(Oct-31-2019, 05:04 AM)newbieAuggie2019 Wrote:
(Oct-31-2019, 03:48 AM)hadoan Wrote: Thanks you so much Bro :)

You're welcome! Smile

Hi Bro.

Sorry, I have another question.

1. How to run exe file which compacted from py file of python by cmder
2. Is there anyway to compact py file ( included cmder ) ... I want to copy folder after compacted into another PC and run exe python file on that by cmder.
Quote
#6
(Oct-31-2019, 07:14 AM)hadoan Wrote: 1. How to run exe file which compacted from py file of python by cmder
2. Is there anyway to compact py file ( included cmder ) ... I want to copy folder after compacted into another PC and run exe python file on that by cmder.

Hi again!

If I understand correctly, I would download and install on your other computer, Python 3.7.4 and Cmder directly from these sites:

https://www.python.org/downloads/release/python-374/

https://cmder.net/

and then, if you have already programs written in python in your original computer, I would copy in an USB memory those programs and then paste them on the python37 folder of your second computer.

I hope it helps.

All the best,
hadoan likes this post
newbieAuggie2019

"That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains."
Steve Jobs
Quote
#7
(Oct-31-2019, 11:47 AM)newbieAuggie2019 Wrote:
(Oct-31-2019, 07:14 AM)hadoan Wrote: 1. How to run exe file which compacted from py file of python by cmder
2. Is there anyway to compact py file ( included cmder ) ... I want to copy folder after compacted into another PC and run exe python file on that by cmder.

Hi again!

If I understand correctly, I would download and install on your other computer, Python 3.7.4 and Cmder directly from these sites:

https://www.python.org/downloads/release/python-374/

https://cmder.net/

and then, if you have already programs written in python in your original computer, I would copy in an USB memory those programs and then paste them on the python37 folder of your second computer.

I hope it helps.

All the best,
Hi Bro

Thanks you so much :)
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Print string in a single line RavCOder 8 184 Nov-08-2019, 09:45 AM
Last Post: perfringo
  modify the color a string of characters in python 3.6 atlass218 10 846 Feb-28-2019, 03:20 PM
Last Post: atlass218
  print console output to a csv deep_logic 3 455 Feb-21-2019, 06:41 PM
Last Post: deep_logic
  How to execute a string with multiple sqlite statements and print results? shanepy 0 401 Nov-20-2018, 10:19 PM
Last Post: shanepy
  Using for loops and indexing to read and string and print only select words Drone4four 3 691 Sep-13-2018, 02:51 PM
Last Post: buran
  [SOLVED] Print an int with a string Panda 2 711 Jun-09-2018, 12:46 PM
Last Post: Larz60+
  Spyder IDE - make variable explorer to follow the color scheme of the Editor Antonio 0 2,453 May-05-2018, 10:20 PM
Last Post: Antonio
  how to make a mathematical operation without the command "print" ewar2606 4 745 Mar-15-2018, 07:19 PM
Last Post: sparkz_alot
  Make a Function from Name String jge047 4 914 Dec-18-2017, 05:05 AM
Last Post: Terafy
  make a list of string in capital by using a function anancba 3 1,121 Nov-23-2017, 06:42 AM
Last Post: heiner55

Forum Jump:


Users browsing this thread: 1 Guest(s)