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: 1,052
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,671
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.

Interested in pen & paper role playing games from the "golden age" of gaming? Visit Old School Role-Playing Games
  #3  
Old 23-Feb-2010, 08:41
Alphablend's Avatar
Alphablend Alphablend is offline
New Member
 
Join Date: Feb 2010
Location: Bosnia & Herzegovina
Posts: 6
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.
 


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 [JAVA] bbcode. admin Java Forum 12 18-Dec-2017 02:31
GIDForums enables New [C] / [C++] bbcode. admin C++ Forum 20 25-Aug-2008 05:48
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 · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 09:19.


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