GIDForums  

Go Back   GIDForums > Computer Programming Forums > Python Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 24-Sep-2005, 00:39
admin's Avatar
admin admin is offline
Administrator
 
Join Date: Sep 2002
Posts: 858
admin will become famous soon enough
Arrow

GIDForums enables New [PY] (python) bbcode.


The GIDForums™ Team is proud to announce that GIDForums™ is now among one of the very first Webmaster / Programming forums to offer a custom-written Python Syntax Highlighter BBCode ([py] bb code) to it's valued members and readers.

Please use the [py] and [/py] tag pair to enclose any python code so that it appears like in the sample effect below:

Sample Effect of [py] BB Code Tag

Python Code:
# Example by python.org
# http://docs.python.org/lib/SMTP-example.html

import smtplib

def prompt(prompt):
    return raw_input(prompt).strip()

fromaddr = prompt("From: ")
toaddrs  = prompt("To: ").split()
print "Enter message, end with ^D (Unix) or ^Z (Windows):"

# Add the From: and To: headers at the start!
msg = ("From: %s\r\nTo: %s\r\n\r\n"
       % (fromaddr, ", ".join(toaddrs)))
while 1:
    try:
        line = raw_input()
    except EOFError:
        break
    if not line:
        break
    msg = msg + line

print "Message length is " + repr(len(msg))

server = smtplib.SMTP('localhost')
server.set_debuglevel(1)
server.sendmail(fromaddr, toaddrs, msg)
server.quit()
__________________
Custom BB codes you can use here:
[HTML] | [C++] | [CSS] | [JAVA] | [PY] | [VB]
  #2  
Old 24-Sep-2005, 21:09
crystalattice's Avatar
crystalattice crystalattice is offline
Aspiring author
 
Join Date: Apr 2004
Location: Japan (again)
Posts: 1,635
crystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nicecrystalattice is just really nice

Re: GIDForums enables New [PY] (python) bbcode.


Cool deal! Might have to "borrow" the bbcode for my site.
__________________
Start Programming with Python-A beginner's guide to programming and the Python language.
-------------
Common Sense v2.0-Striving to make the world a little bit smarter.
  #3  
Old 23-Feb-2010, 07:41
Alphablend's Avatar
Alphablend Alphablend is offline
New Member
 
Join Date: Feb 2010
Location: Bosnia & Herzegovina
Posts: 7
Alphablend will become famous soon enough

Re: GIDForums enables New [PY] (python) bbcode.


Now this is a cool thing. I will be needing this.
Thanks.
 
 

Recent GIDBlogInstall Adobe Flash - Without Administrator Rights by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GIDForums enables New [C] / [C++] bbcode. admin C++ Forum 20 25-Aug-2008 05:48
GIDForums enables New [JAVA] bbcode. admin Java Forum 10 19-May-2007 04:13
GIDForums enables New [KBD] bbcode. admin GIDForums™ 0 24-Jul-2003 06:26
GIDForums enables New [CSS] bbcode. admin GIDForums™ 0 01-Jun-2003 23:57

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 18:51.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.