473,883 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Syntax coloring in Python interpreter

Greetings -- as a long time user of both Python and Ruby interpreters,
I got used to the latter's syntax-coloring gem, wirble, which
colorizes Ruby syntax on the fly. Is there anything similar for
Python?

Nov 1 '07 #1
7 2515

On Nov 1, 2007, at 1:45 PM, braver wrote:
Greetings -- as a long time user of both Python and Ruby interpreters,
I got used to the latter's syntax-coloring gem, wirble, which
colorizes Ruby syntax on the fly. Is there anything similar for
Python?
I believe IPython can do this:

http://ipython.scipy.org/moin/

---
Lee Capps
Technology Specialist
CTE Resource Center
lc****@cteresou rce.org

Nov 1 '07 #2
On 2007-11-01, Lee Capps <lc****@ctereso urce.orgwrote:
>
On Nov 1, 2007, at 1:45 PM, braver wrote:
>Greetings -- as a long time user of both Python and Ruby
interpreters , I got used to the latter's syntax-coloring gem,
wirble, which colorizes Ruby syntax on the fly. Is there
anything similar for Python?

I believe IPython can do this:

http://ipython.scipy.org/moin/
IPython's syntax coloring doesn't work with Windows 2000 and up,
since (last I checked) it relies on a readline.py file, which
relies on ANSI.SYS, which is not supported by the Windows
console.

--
Neil Cerutti
Nov 1 '07 #3
On Nov 1, 2007 3:01 PM, Neil Cerutti <ho*****@yahoo. comwrote:
On 2007-11-01, Lee Capps <lc****@ctereso urce.orgwrote:

On Nov 1, 2007, at 1:45 PM, braver wrote:
Greetings -- as a long time user of both Python and Ruby
interpreters, I got used to the latter's syntax-coloring gem,
wirble, which colorizes Ruby syntax on the fly. Is there
anything similar for Python?
I believe IPython can do this:

http://ipython.scipy.org/moin/

IPython's syntax coloring doesn't work with Windows 2000 and up,
since (last I checked) it relies on a readline.py file, which
relies on ANSI.SYS, which is not supported by the Windows
console.
If you scroll down about half a page in the above link you'll find a
link to a readline implementation for Windows.
--
Neil Cerutti

--
http://mail.python.org/mailman/listinfo/python-list
Nov 1 '07 #4
On 2007-11-01, Chris Mellon <ar*****@gmail. comwrote:
On Nov 1, 2007 3:01 PM, Neil Cerutti <ho*****@yahoo. comwrote:
>On 2007-11-01, Lee Capps <lc****@ctereso urce.orgwrote:
>
On Nov 1, 2007, at 1:45 PM, braver wrote:
Greetings -- as a long time user of both Python and Ruby
interpreters , I got used to the latter's syntax-coloring gem,
wirble, which colorizes Ruby syntax on the fly. Is there
anything similar for Python?
I believe IPython can do this:

http://ipython.scipy.org/moin/

IPython's syntax coloring doesn't work with Windows 2000 and
up, since (last I checked) it relies on a readline.py file,
which relies on ANSI.SYS, which is not supported by the
Windows console.

If you scroll down about half a page in the above link you'll
find a link to a readline implementation for Windows.
That pyreadline.py appears to be an improvement on the Windows
support when I last looked (6 months or so ago). Thanks for the
heads up.

--
Neil Cerutti
Nov 1 '07 #5
Neil Cerutti wrote:
On 2007-11-01, Chris Mellon <ar*****@gmail. comwrote:
>On Nov 1, 2007 3:01 PM, Neil Cerutti <ho*****@yahoo. comwrote:
>>On 2007-11-01, Lee Capps <lc****@ctereso urce.orgwrote:
On Nov 1, 2007, at 1:45 PM, braver wrote:
Greetings -- as a long time user of both Python and Ruby
interpreter s, I got used to the latter's syntax-coloring gem,
wirble, which colorizes Ruby syntax on the fly. Is there
anything similar for Python?
>
I believe IPython can do this:

http://ipython.scipy.org/moin/
IPython's syntax coloring doesn't work with Windows 2000 and
up, since (last I checked) it relies on a readline.py file,
which relies on ANSI.SYS, which is not supported by the
Windows console.
If you scroll down about half a page in the above link you'll
find a link to a readline implementation for Windows.

That pyreadline.py appears to be an improvement on the Windows
support when I last looked (6 months or so ago). Thanks for the
heads up.
And it's worth looking at ipykit[1] which is a standalone
bundle of ipython py2exe-ed for Windows users.

TJG

[1] http://ipython.scipy.org/moin/IpyKit
Nov 2 '07 #6
On 2007-11-02, Tim Golden <ma**@timgolden .me.ukwrote:
Neil Cerutti wrote:
>On 2007-11-01, Chris Mellon <ar*****@gmail. comwrote:
>>On Nov 1, 2007 3:01 PM, Neil Cerutti <ho*****@yahoo. comwrote:
On 2007-11-01, Lee Capps <lc****@ctereso urce.orgwrote:
On Nov 1, 2007, at 1:45 PM, braver wrote:
>Greeting s -- as a long time user of both Python and Ruby
>interprete rs, I got used to the latter's syntax-coloring gem,
>wirble, which colorizes Ruby syntax on the fly. Is there
>anything similar for Python?
>>
I believe IPython can do this:
>
http://ipython.scipy.org/moin/
IPython's syntax coloring doesn't work with Windows 2000 and
up, since (last I checked) it relies on a readline.py file,
which relies on ANSI.SYS, which is not supported by the
Windows console.
If you scroll down about half a page in the above link you'll
find a link to a readline implementation for Windows.

That pyreadline.py appears to be an improvement on the Windows
support when I last looked (6 months or so ago). Thanks for the
heads up.

And it's worth looking at ipykit[1] which is a standalone
bundle of ipython py2exe-ed for Windows users.

TJG

[1] http://ipython.scipy.org/moin/IpyKit
I installed the new version and the coloring works out of the box
on Windows 2000 with Gary's PyReadline 1.4.4.

--
Neil Cerutti
If you throw at someone's head, it's very dangerous, because in the head is
the brain. --Pudge Rodriguez
Nov 2 '07 #7
On Nov 1, 12:45 pm, braver <delivera...@gm ail.comwrote:
Greetings -- as a long time user of both Python and Ruby interpreters,
I got used to the latter's syntax-coloring gem, wirble, which
colorizes Ruby syntax on the fly. Is there anything similar for
Python?
What's wrong with IDLE? There's a plug-in for Eclipse that does syntax
highlighting and more as well. So does ActiveState's ActivePython.
Even Notepad++ can do highlighting.

Mike

Nov 2 '07 #8

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

Similar topics

7
2859
by: Ruthless | last post by:
hello. I've got a simple question. I've searched on google for PHP scripts coloring syntax e.g. asm, c, c++, bash etc. I've only found some CGI, apps, modules for Apache - but i can't use them on my server (due to my restricted permissions - i can use only PHP and MySQL).
699
34417
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
11
1867
by: Xah Lee | last post by:
in some online documentations, for examples: http://perldoc.perl.org/perlref.html http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme-Z-H-17.html http://www.haskell.org/hawiki/HaskellDemo the codes are syntax colored. Is there a tool that produce codes in html with syntax coloring?
0
1220
by: Markk | last post by:
Hi. I would like to ask If somebody don't have any small sample to coloring XML syntax, e.g. in RichTextBox. It can be in VB.NET or C#. I watched on SharpDevelop, but I could not understand that code, which is coloring text. Thanks.
2
1591
by: Dan | last post by:
I'd like to show some XML text into an (editable) text box with some syntax coloring for tags, attributes etc. I don't need a full-blown commercial control, I'd just like to do some coloring on tags and the like. Is there any (possibly free!) C-Sharp control (based onto the RTF control, I imagine) or code sample for building a such control, or should I create my own from scratch? Thanks guys!
5
20362
by: DIBS | last post by:
I'm new to Python and I don't understand what I'm doing wrong. I'm running windows xp. In the command line window, I type: Python Sudoku.py and I get the response" SyntaxError: invalid syntax
3
1515
by: astromog | last post by:
I have some significantly extended syntax for Python that I need to create a reference implementation for. My new syntax includes new keywords, statements and objects that are sort of like classes but not really. The implementation is all possible using standard Python, but the implementation isn't the point of what I'm doing. Speed and having an extra step to run a program are not issues that I need to be concerned with. I'd like to...
3
1444
by: mosi | last post by:
Python matrices are usually defined with numpy scipy array or similar. e.g. I would like to have easier way of defining matrices, for example: Any ideas how could this be done? The ";" sign is reserved, the "" is used for lists.
3
2858
by: sandromani | last post by:
Hi all, I am writing a webbased notepad and want to include syntax-coloring. The approach I have used is to set the font color and background color of the textarea to transparent, and place the colored text in a pre behind the text area, so far so good. The code I use for coloring is the following one: function colorize(){ var inTag=false, inAttr=false; text=textarea.text();...
0
9787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11128
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7119
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5794
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.