473,583 Members | 2,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python syntax high-lighting and preservation on web

Hey guys,

Does anyone know where I can pick up a style sheet (css) and/or other
files/programs I might need to display python code on my website with
tab preservation(or replace with spaces) and colored syntax? I want
something similar to the python code on a page like this:

http://aspn.activestate.com/ASPN/Coo.../Recipe/303770

(I think this is a python-list question although maybe it belongs in a
css group?) I figure some of you guys would have experience with
this.

-----

Giving this issue some more thought, I suppose I could make or find a
css file anywhere that would work. The hard part would be getting all
of the div and class tags added to my python code. So I think what I
really need is a program that will do that, or advice on how to begin
writing such a program. (It might make a good wordpress plugin too)

Thanks,
'
Greg
Jul 19 '05 #1
2 1261
Gregory Piñero wrote:
Hey guys,

Does anyone know where I can pick up a style sheet (css) and/or other
files/programs I might need to display python code on my website with
tab preservation(or replace with spaces) and colored syntax? I want
something similar to the python code on a page like this:


see http://aspn.activestate.com/ASPN/Coo...n/Recipe/52298

css only won't help you as someone has to insert the span tags so that
the style sheet has something to match.

Daniel
Jul 19 '05 #2
This is perfect! Thanks!
On 6/29/05, Daniel Dittmar <da************ @sap.corp> wrote:
Gregory Piñero wrote:
Hey guys,

Does anyone know where I can pick up a style sheet (css) and/or other
files/programs I might need to display python code on my website with
tab preservation(or replace with spaces) and colored syntax? I want
something similar to the python code on a page like this:


see http://aspn.activestate.com/ASPN/Coo...n/Recipe/52298

css only won't help you as someone has to insert the span tags so that
the style sheet has something to match.

Daniel
--
http://mail.python.org/mailman/listinfo/python-list

Jul 19 '05 #3

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

Similar topics

699
33659
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...
19
4107
by: KefX | last post by:
I've been following the group a bit (somewhat loosely; discussions involving other languages or advanced concepts kind of lose me), and I see all this negativity (OMG Python's lambda is borken roflol, use teh othar langauge). I as a relative newcomer to Python pay little heed to the criticism, though. A few things in Python are...
58
3973
by: Svein Ove Aas | last post by:
Is anyone working on a python-to-native compiler? I'd be interested in taking a look. Come to think of it, is anyone working on a sexpr-enabled version of Python, or anything similar? I really miss my macros whenever I try to use it...
852
28237
by: Mark Tarver | last post by:
How do you compare Python to Lisp? What specific advantages do you think that one has over the other? Note I'm not a Python person and I have no axes to grind here. This is just a question for my general education. Mark
0
7896
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7828
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...
1
7936
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...
0
8197
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6583
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3821
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...
0
3847
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1436
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1160
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...

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.