Clayton Kirkwood wrote:
> raw_table = ('''
> a: Asky: Dividend Yield
> b: Bid d: Dividend per Share
> b2: Ask (Realtime) r1: Dividend Pay Date
> b3: Bid (Realtime)q: Ex-Dividend Date
> p: Previous Close
> o: Open''')
> o: Open#why aren
Hi, I was wondering if you could help me with an assignment that I'm doing
involving Python? ___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listi
On 20/10/14 03:56, Taylor Ruzgys wrote:
Hi, I was wondering if you could help me with an assignment that I'm
doing involving Python?
Yes, we can help you do it. We won't do it for you.
You need to tell us what the assignment is, how you have tried
to solve it, including any code you've written
hello all, hope everyone is doing well.
The below code works, however I am going back and trying to enter the time
and date and I cant quite figure out how to do this without breaking the
code.
#!/usr/bin/python
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText imp
On Mon, Oct 20, 2014 at 2:34 PM, Bo Morris wrote:
> hello all, hope everyone is doing well.
>
> The below code works, however I am going back and trying to enter the time
> and date and I cant quite figure out how to do this without breaking the
> code.
>
> #!/usr/bin/python
>
> import smtplib
> f
I have this code (http://pastebin.com/Q21vQdHZ):
import sqlite3
db = sqlite3.connect('db.sqlite')
def create_db():
db.execute('''
CREATE TABLE TOPICS(
ID INT PRIMARY KEY NOT NULL,
URL VARCHAR NOT NULL,
AUTHOR VARCHAR NOT NULL,
MESSAGE VARCHAR NOT NULL
);
''')
d
Hi Juan,
On Mon, Oct 20, 2014 at 10:04 AM, Juan Christian
wrote:
> I have this code (http://pastebin.com/Q21vQdHZ):
>
> import sqlite3
[code cut]
> def insert_db(_id, url, author, message):
> db.execute("INSERT INTO TOPICS (ID, URL, AUTHOR, MESSAGE) VALUES ({},
> {}, {}, {})".format(_id,
Forwarding to list — please use Reply All… next time.
On Mon, Oct 20, 2014 at 6:28 PM, Crush wrote:
> Where does the ."format(time=t,date=d)" go?
>
> I would assume something like
>
> msgTime = MIMEText()
> msgTime.add_header('not sure what to put here?' '' .format(time=t))
> msgRoot.attach(msgTi
On Mon, Oct 20, 2014 at 1:04 PM, Juan Christian
wrote:
> I have this code (http://pastebin.com/Q21vQdHZ):
>
> import sqlite3
>
> db = sqlite3.connect('db.sqlite')
>
>
> def create_db():
> db.execute('''
> CREATE TABLE TOPICS(
> ID INT PRIMARY KEY NOT NULL,
> URL VARCHAR NOT NULL,
>
insert_db(12, "abc.com", "author", "message")
> INSERT INTO TOPICS (ID, URL, AUTHOR, MESSAGE) VALUES (12, abc.com,
> author, message)
>
> I've never used format like that. It looks like you need to quote the
> strings. I don't know if you can tell format to do that or if you
> have to e
Ok, new code using ?:
import sqlite3
db = sqlite3.connect('db.sqlite')
def create_db():
db.execute('''
CREATE TABLE TOPICS(
ID INT PRIMARY KEY NOT NULL,
URL VARCHAR NOT NULL,
AUTHOR VARCHAR NOT NULL,
MESSAGE VARCHAR NOT NULL
);
''')
def insert_db(_id, ur
On 20/10/14 18:04, Juan Christian wrote:
CREATE TABLE TOPICS(
ID INT PRIMARY KEY NOT NULL,
This means SQLite will automatically create the ID value,
you do not need to provide one.
URL VARCHAR NOT NULL,
AUTHOR VARCHAR NOT NULL,
MESSAGE VARCHAR NOT NULL
);
''')
def insert_db(_id, url, auth
On 20/10/14 18:04, Juan Christian wrote:
What's the problem? It's just a test script just to learn sqlite3 with
python.
If you are learning SQLite3 as well as how to access it from Python I
strongly recommend installing the sqlite3 interpreter and typing the SQL
commands directly into that.
Hey thanks for the help, it worked like a charm. I will post the complete code
soon, so others may benefit should they ever need it.
Thanks again.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.pyth
14 matches
Mail list logo