473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Color schemes

Hi,

Is anyone using a color scheme for his Python scripts? I suspect
most people are using a text editor which may or may not support
colorisation of scripts (like Apple's Script Editor does).

The page at
<http://interscript.sourceforge.net/interscript/doc/en_iscr_0328.html>
contains a colorized tokenizing script. I assume the script can
be used to make colour schemes and that a similar script is used
to create all the scripts shown on the website.

Do you use a similar script in a Python IDE or in your text
editor to colorize your Python scripts?

Mark

--

eHUG coordinator
http://home.wanadoo.nl/mark.sch
http://www.ehug.info

Jul 18 '05 #1
8 4083

Mark Schonewille <no****@nospam.com> wrote:

Hi,

Is anyone using a color scheme for his Python scripts? I suspect
most people are using a text editor which may or may not support
colorisation of scripts (like Apple's Script Editor does).
All editors that I would choose to use have built-in syntax highlighting.
Being color-sensitive, I find this a major win for productivity, similar
to having a 'find' dialog, multiple open documents, etc.

The page at
<http://interscript.sourceforge.net/interscript/doc/en_iscr_0328.html>
contains a colorized tokenizing script. I assume the script can
be used to make colour schemes and that a similar script is used
to create all the scripts shown on the website.
I would say that it is likely that such a script was _used to help
produce the web pages_ that present the source code of the modules at
the site. Whether or not the page authors used the web pages that had
been generated via this method as documentation themselves, in order to
help later work on the project, does not seem specified on the web page,
though it is both possible and likely.

Do you use a similar script in a Python IDE or in your text
editor to colorize your Python scripts?


Sych scripts are only necessary when one wants to post a "pretty"
version of Python source on a web site. Being that I have no desire,
nor need to post such things, I do not use it. Pure source without line
numbers is much easier to copy/paste. Sourceforge, on the other hand,
does present users with syntax highlighted text representations of code
when viewed through CVS. For example, here is the much loved asyncore.py
as viewed through Sourceforge's web CVS:
http://cvs.sourceforge.net/viewcvs.p...py?view=markup

Ahh, so pretty. They use, I'm sure, some variant or reimplementation of
a colorization script, though not necessarily the one that is offered on
the page you link.

- Josiah

Jul 18 '05 #2
Mark Schonewille <no****@nospam.com> wrote in message news:<41**********************@news.wanadoo.nl>...
Hi, Hello! Is anyone using a color scheme for his Python scripts? Yes. I suspect most people are using a text editor which may or may not support
colorisation of scripts. Good intuition, because some do and some don't :)
Many of the python editors out now are based on Scintilla.
Scintilla is a capable, colorizing, folding, text widget on 'roids. Do you use a similar script in a Python IDE or in your text
editor to colorize your Python scripts?

I use an editor that is based on Scintilla .
To convert python source to colorised html for webpages and documentation,
I have been writing a module called PySourceColor.
It is a based on token and tokenize.
If you are intrested you can find it here:
'http://bellsouthpwp.net/m/e/mefjr75/'
This is a new version and has many improvements.
Also there is a version of pydoc there that serves up colorized html.
HTH,
M.E.Farmer
Jul 18 '05 #3
Josiah and M.E.,

Thanks you for your replies. As I understand from your answers,
the colorised scripts on web sites have little to do with the
use of colorisation in script editors by Python programmers, but
those programmers who prefer an editor with colorisation
features probably apply colorisation rules similar to the pretty
looking scripts on websites and there probably is't a standard
colour scheme.

Best,

Mark

M.E.Farmer wrote:
Mark Schonewille <no****@nospam.com> wrote in message news:<41**********************@news.wanadoo.nl>...
Is anyone using a color scheme for his Python scripts?


Yes.
I suspect most people are using a text editor which may or may not support
colorisation of scripts.


Good intuition, because some do and some don't :)
Many of the python editors out now are based on Scintilla.
Scintilla is a capable, colorizing, folding, text widget on 'roids.
Do you use a similar script in a Python IDE or in your text
editor to colorize your Python scripts?


I use an editor that is based on Scintilla .
To convert python source to colorised html for webpages and documentation,
I have been writing a module called PySourceColor.
It is a based on token and tokenize.
If you are intrested you can find it here:
'http://bellsouthpwp.net/m/e/mefjr75/'
This is a new version and has many improvements.
Also there is a version of pydoc there that serves up colorized html.
HTH,
M.E.Farmer


--

eHUG coordinator
http://home.wanadoo.nl/mark.sch
http://www.ehug.info

Jul 18 '05 #4
On Sat, 06 Nov 2004 01:51:30 +0100, Mark Schonewille <no****@nospam.com> wrote:
....
those programmers who prefer an editor with colorisation
features probably apply colorisation rules similar to the pretty
looking scripts on websites and there probably is't a standard
colour scheme.


The scheme is more likely to be standardized across languages in the editor
than across editors for a language. Gnu Emacs, for example, defaults (on my
system) to red for comments and a kind of pinkish red for string constants
regardless of language.

/Jorgen

--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
Jul 18 '05 #5
Mark Schonewille <no****@nospam.com> wrote in message news:<41***********************@news.wanadoo.nl>.. .
Josiah and M.E.,

Thanks you for your replies.
You are welcome Mark and thanks for the followup.
It is always nice to know if the OP even got the reply ;)
As I understand from your answers,
the colorised scripts on web sites have little to do with the
use of colorisation in script editors by Python programmers, but
those programmers who prefer an editor with colorisation
features probably apply colorisation rules similar to the pretty
looking scripts on websites and there probably is't a standard
colour scheme.


Exactly!
PySourceColor *is* an attempt to colorize as well as Scintilla.
As far as I can tell there is not a default color scheme.
Maybe Idle or PythonWin.
And there are always Vim, and emacs......I am sure some one loves
those too.
I prefer the dark color scheme from PySourceColor, dark exactly
matches my editor. I bet most people feel most comfortable with
whatever they use most.
The colors develop associations.
If there is a concensus on the default color scheme I would be
intrested in knowing.
What is most liked or needed ?
Printing good colorized source is diffrent then viewing colorized
source.
I prefer light text on dark page on a monitor (bad eyes) , but dark
text on light page to print (saves ink).
Diffrent color schemes are needed for diffrent applications.

Now I have a question.
What are you trying to do, or is this just for general knowledge?
Just curious,
M.E.Farmer
Jul 18 '05 #6
M.E.Farmer:
As far as I can tell there is not a default color scheme.
Maybe Idle or PythonWin.
There is a bit of inheritance here: many environments that use Scintilla
start with the default colour scheme used by SciTE which was based on
PythonWin, and I think that PythonWin got the basics (blue keywords and
green comments) from Visual C++.
I prefer light text on dark page on a monitor (bad eyes) , but dark
text on light page to print (saves ink).
Diffrent color schemes are needed for diffrent applications.


It is not just the waste of ink. Most printers are very poor at printing
black or dark backgrounds, with ink bleeding into characters or light
streaks and other marks on laser printers.

Neil
Jul 18 '05 #7
"Neil Hodgson" <nh******@bigpond.net.au> wrote in message
There is a bit of inheritance here: many environments that use Scintilla
start with the default colour scheme used by SciTE which was based on
PythonWin, and I think that PythonWin got the basics (blue keywords and
green comments) from Visual C++.
Isn't PythonWin now based on Scintilla too? Circular refrences ;)
It is not just the waste of ink. Most printers are very poor at printing
black or dark backgrounds, with ink bleeding into characters or light
streaks and other marks on laser printers.

Neil


Good point, the one time I did print light on dark it looked horrible...streaks.
While I am at it i want to THANK YOU for your work. I benefit from it every day.
Scintilla is awesome, and so are you, thanks Neil!
M.E.Farmer
Jul 18 '05 #8
M.E.Farmer:
Isn't PythonWin now based on Scintilla too? Circular refrences ;)


Yes, but PythonWin first used RichEdit for syntax colouring which was
hard to make work well and so was turned off by default.

Neil
Jul 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: EthanStyle | last post by:
color schemes on a site are probably the hardest thing to do right. even if you know which colors go together you still have to orgainize them correctly. is it better to have a light color...
9
by: jorge | last post by:
Is there a way with javascript,php or something to get the client color scheme to make possible to generate the HTML with its own colors ? thanks in advance
3
by: AussieRules | last post by:
Hi, In XP you can set color schemes (olive green, silver, default blue). I have some controls(panels) on my form, and I would like to set the color as per the color of the scheme. Can this...
0
by: Henry S. Thompson | last post by:
W3C is pleased to announce the public launch of the XPointer Schemes Registry: http://www.w3.org/2005/04/xpointer-schemes/ The XPointer Recommendation reserved all simple (unprefixed) XPointer...
11
by: Maximus | last post by:
Hi all, Has anyone been able to reterive the gradient selection colors used in outlook 2003? Basically, I have a grid showing a list of records and my client wants the selected row to have the...
8
by: William Gill | last post by:
In the past I have not done enough to make my pages accessible, but want to make a better effort now. I thought it would be fairly easy, but so far I have only succeeded in producing a major...
6
by: =?Utf-8?B?cmZsYXphcm8=?= | last post by:
Hi All, We are trying to build an automation utility to configure OS. I found a way to automate the processes below via registry: Control Panel -Power Options -Power Schemes Tab: -Power...
0
by: ruthruth | last post by:
Wished to know in detail abt the below 1-what are the various compression strategies designed specifically for XML data.? 2- comparison between AXECHOP AND TREECHOP techniques to other XML...
3
by: Trixy | last post by:
I have a simple (currently) form app where I have a few draw string Graphics methods happening. To clear the drawn string I am simply doing a drawObj.Clear(System.Drawing.Color.Blue); Which clears...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.