Howdy Avinash,
Here is a simple example for you.
from smtplib import SMTP
HOST = "smtp.gmail.com"
PORT = 587
ACCOUNT = ""# put your gmail email account here
PASSWORD = "" # put your gmail email password here
def send_email(to_addrs, subject, msg):
server = SMTP(HOST,PORT)
s
Howdy Matthias!
The delete operation will set the rowcount member of your cursor.
Let's assume you have an sqlite3 database with a table called 'test'
with an id column. It does have a record with id=1. It does not have
a record with id=2.
>>> import sqlite3
>>> connection = sqlite3.connect('te
Peter here is an example. I just tried it and it works fine.
from smtplib import SMTP
HOST = "smtp.gmail.com"
PORT = 587
ACCOUNT = "" # put your gmail email account name here
PASSWORD = "" # put your gmail email account password here
def send_email(to_addrs, subject, msg):
server = SMTP(HO
Daniel I don't know if it would work for your situation or not, but if
you are using Python 2.5, you could use the now built-in sqlite3
module. If you didn't even want to create a temporary database file
you could use the special memory-only syntax like this:
>>> import sqlite3
>>> conn =sqlite3.
Howdy Kent,
Interesting question! Give this a shot:
import datetime
import time
import uuid
# get offset in seconds between the UUID timestamp Epoch (1582-10-15)
and
# the Epoch used on this computer
DTD_SECS_DELTA = (datetime.datetime(*time.gmtime(0)[0:3])-
datetime.datetime(1582, 10, 15)).day
Howdy kynnjo,
> Is it possible to buy the official Python docs in book form? If
> so, I'd very much appreciate the name(s) and author(s) of the
> book(s).
I haven't seen them in print form, but you can download PDF's from
here:
http://docs.python.org/download.html
--gordy
--
http://mail.pytho
Howdy Thushanthan,
Here is one that is hot off the press:
The Definitive Guide to Django: Web Development Done Right
http://www.apress.com/book/view/1590597257
--gordon
--
http://mail.python.org/mailman/listinfo/python-list
John try this:
from M2Crypto import SSL
That should put your SSL module in the namespace as you want.
--gordy
--
http://mail.python.org/mailman/listinfo/python-list
You could probably use the mysqldump command with the proper options to
export the contents of your mysql database to an ASCII text file that
contains the SQL insert statements. Then you could import that
information to a sqlite database file. You may have to massage the
export file if it contain