On Fri, Mar 11, 2011 at 3:54 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
On Wed, Mar 9, 2011 at 2:01 PM, Victor Subervi victorsube...@gmail.com
wrote:
titleMaya 2012: Transform At the Source/title
Yow. You're designing a Maya 2012 website to help some travel company
bilk gullible people
On Fri, Mar 11, 2011 at 4:26 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Thu, 10 Mar 2011 18:00:10 -0800 (PST), alex23 wuwe...@gmail.com
declaimed the following in gmane.comp.python.general:
He's comp.lang.python's version of Sisyphus. Or maybe Sisyphus'
boulder...I forget where I
On Wed, Mar 9, 2011 at 5:33 PM, Ian hobso...@gmail.com wrote:
On 09/03/2011 21:01, Victor Subervi wrote:
The problem is that it prints Content-Type: text/html to the screen
If you can see what is intended to be a header, then it follows that you
are not sending the header correctly.
Sorry
On Thu, Mar 10, 2011 at 8:50 PM, Benjamin Kaplan
benjamin.kap...@case.eduwrote:
print Content-Type: text/html
print
print '''
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
and this has worked
On Sun, Mar 6, 2011 at 12:00 PM, Noah Hall enali...@gmail.com wrote:
On Sun, Mar 6, 2011 at 3:11 PM, Victor Subervi victorsube...@gmail.com
wrote:
Ah. I thought I had to return something!
Well, based on what you asked, you would've, but based on the code,
all it was doing is printing
On Sat, Mar 5, 2011 at 11:11 PM, Littlefield, Tyler ty...@tysdomain.comwrote:
ourEmail = '
myemaila...@gmail.com'
ourEmail = '
q...@xxx.com'
You redefine this twice.
Right. The second definition, of course, overwrites the first. That is
deliberate. I simply comment out the second when
Hi;
How do I translate this PHP code?
if($ok){
echo returnValue=1;
}else{
echo returnValue=0;
}
In other words, when the email successfully sends, send back both the name
of the variable and its value.
TIA,
Beno
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Mar 6, 2011 at 10:53 AM, Noah Hall enali...@gmail.com wrote:
On Sun, Mar 6, 2011 at 2:45 PM, Victor Subervi victorsube...@gmail.com
wrote:
Hi;
How do I translate this PHP code?
if($ok){
echo returnValue=1;
}else{
echo returnValue=0;
}
From the code provided
Hi;
I have this code:
#!/usr/bin/python
import sys, os, string
import cgitb; cgitb.enable()
import cgi
cwd = os.getcwd()
dirs = string.split(cwd, '/')
dirs = dirs[1:-1]
backLevel = '/' + string.join(dirs, '/')
sys.path.append(cwd)
sys.path.append(backLevel)
import string
form =
On Fri, Mar 4, 2011 at 2:57 AM, Godson Gera godso...@gmail.com wrote:
You can use PyAMF http://pyamf.org
Thanks!
Beno
--
http://mail.python.org/mailman/listinfo/python-list
Hi;
I have an AS3 script that is supposed to communicate with a python script
and I don't think it is. The python script is to email. How can I
trouble-shoot this?
Beno
--
http://mail.python.org/mailman/listinfo/python-list
Hi;
I would like to build a component where the user can go to a page, say he'd
like to upload so many (x) number of photos, click a button and without
leaving the page have three sets of upload widgets pop up. I think this is
done with Json; however, I can't find much info or tutorials on the
Hi;
I have this code:
db = MySQLdb.connect(host, user, passwd, db)
cursor= db.cursor()
cursor.execute(sql, id)
db.commit()
It throws no errors and gives every indication that it executes the command.
I've printed out the command and the id and executed it successfully in
mysql...but not
Hi;
I have a function that calls the following class:
#!/usr/bin/python
import sys,os
sys.path.append(os.getcwd())
import MySQLdb
from login import login
import re, string
def buildTableColorShortOptions():
user, passwd, db, host = login()
database = MySQLdb.connect(host, user, passwd, db)
It's been too long since I've worked on this. Yep, I forgot to commit.
Thanks,
Beno
On Tue, Feb 15, 2011 at 5:21 PM, Jerry Hill malaclyp...@gmail.com wrote:
On Tue, Feb 15, 2011 at 3:24 PM, Victor Subervi victorsube...@gmail.com
wrote:
It builds the table but fails from the first insertion
On Sun, Nov 21, 2010 at 5:35 AM, FELD Boris lothiral...@gmail.com wrote:
I think the best way to do this is using css with specific media type.
Take a look at : http://martybugs.net/articles/print.cgi
Oh, man, this is perfect! Thanks!
beno
--
Hi;
I need to be able to print something from a Web page: not the entire page
but what I specify. I am writing the page and the client is surfing to it.
How do I do this?
TIA,
beno
--
http://mail.python.org/mailman/listinfo/python-list
Hi;
I have this code:
cursor.execute('insert into Passengers values (Null, %s, %s, %s, %s,
%s, %s, %s, %s, no, n/a)', (curr_flight, curr_customer, name, curr_sex,
curr_weight, price, curr_rt, curr_confirmation))
Now, when I print it out, add quotes where necessary and enter it in at a
/a |
+++-+-+--++---++--+--+---+
2 rows in set (0.00 sec)
Please explain why it does that!
TIA,
beno
On Fri, Sep 17, 2010 at 8:51 AM, Victor Subervi victorsube...@gmail.comwrote:
Hi;
I have this code:
cursor.execute('insert into Passengers
I rebooted MySQL and it now works fine ;)
On Fri, Sep 17, 2010 at 9:26 AM, Victor Subervi victorsube...@gmail.comwrote:
Here's some more data:
print 'insert into Passengers values (Null, %s, %s, %s, %s, %s, %s,
%s, %s, no, n/a)' % (curr_flight, curr_customer, name, curr_sex
On Thu, Sep 2, 2010 at 3:02 PM, Ian hobso...@gmaiil.com wrote:
On 02/09/2010 19:34, Victor Subervi wrote:
for some reason running the command through python *omits* this one data!!
The only difference is that a flag in spreadsheets (Temp) is set to 1. Why
on earth doesn't it work in python
This is an addendum to my last post. Please observe the following:
mysql select * from spreadsheets where Temp=1;
+-++---+-++--+
| ID | Client | Multi | Item| Markup | Temp |
On Fri, Sep 3, 2010 at 9:25 AM, Richard Arts arts.rich...@gmail.com wrote:
These are also mere suggestions.
The statements you use in your print statement and the one you use to
feed the cursor differ slightly. The latter is missing quotes around
your search criterium.
Isn't it possible to
Hi;
I have this code:
print 'select * from spreadsheets s join products p on p.Item=s.Item
join productsCategories pc on p.ID=pc.ProductsID join categories c on
pc.CategoryID=c.ID where s.Client=%s order by c.Category, c.Parent' %
(client,)
cursor.execute('select * from spreadsheets s
On Wed, Sep 1, 2010 at 9:26 AM, Shashwat Anand anand.shash...@gmail.comwrote:
On Wed, Sep 1, 2010 at 6:45 PM, Matt Saxton m...@scotweb.co.uk wrote:
On Wed, 1 Sep 2010 09:00:03 -0400
Victor Subervi victorsube...@gmail.com wrote:
Hi;
I have this code:
cursor.execute('describe
Hi;
I have this code:
cursor.execute('describe products;')
cols = [item[0] for item in cursor]
cols = cols.reverse()
cols.append('Delete')
cols = cols.reverse()
Unfortunately, the list doesn't reverse. If I print cols after the first
reverse(), it prints None. Please advise. Also, is
On Wed, Sep 1, 2010 at 9:17 AM, Shashank Singh
shashank.sunny.si...@gmail.com wrote:
reverse reverses in-place
l = [1, 2, 3]
r = l.reverse()
r is None
True
l
[3, 2, 1]
Ah. Thanks!
beno
--
http://mail.python.org/mailman/listinfo/python-list
Hi;
I have the following code:
cursor.execute('select MyTable from optionsDetails where Store=%s',
(store,))
options_tables = [item[0] for item in cursor]
for table in options_tables:
cursor.execute('select * from %' % table)
You can already see what my question is. One of
On Fri, Jul 16, 2010 at 10:09 AM, MRAB pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
Hi;
I have the following code:
cursor.execute('select MyTable from optionsDetails where Store=%s',
(store,))
options_tables = [item[0] for item in cursor]
for table in options_tables
On Wed, Jul 7, 2010 at 2:22 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote:
First, its always best to be explicit with insert statements. Meaning,
don't rely on the underlining structure of a table, as in:
INSERT INTO YourRandomTable VALUES (my, value, here);
Instead, do:
INSERT INTO
On Thu, Jul 8, 2010 at 10:45 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote:
On 7/8/10 6:20 AM, Victor Subervi wrote:
However, I now have another error. Here is my current command:
cursor.execute(insert into personalDataKeys (Store, User,
useFirstName, useLastName, usePhone
I've come to the realization that I don't need FKs at all here. Essentially,
what I need to do is consult personalDataKeys simply to determine what data
should be loaded into and retrieved from personalData. I was mistaken
because the data are not interdependent, it only appeared that way
Hi;
I have this code:
sql = 'insert into personalDataKeys values (%s, %s, %s)' % (store, user,
', %s'.join('%s' * len(col_vals))
cursor.execute(sql, col_vals)
Is this open to injection attacks? If so, how correct?
TIA,
beno
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 28, 2010 at 2:24 PM, Emile van Sebille em...@fenx.com wrote:
On 6/28/2010 9:10 AM Victor Subervi said...
Any other suggestions?
http://www.databaseanswers.org/tutorial4_db_schema/index.htm
Thanks. Good tutorial.
beno
--
http://mail.python.org/mailman/listinfo/python-list
Hi;
So I'm launching into a major rewrite of my shopping cart because I've
finally woken up to the challenge of injection attacks. One of my major
problems is that many column names are determined when the shopping cart is
built. For example, how many photos are to be uploaded is determined that
On Mon, Jun 28, 2010 at 12:11 PM, Stephen Hansen
me+list/pyt...@ixokai.iowrote:
On 6/28/10 9:10 AM, Victor Subervi wrote:
Hi;
So I'm launching into a major rewrite of my shopping cart because I've
finally woken up to the challenge of injection attacks. One of my major
problems is that many
On Fri, Jun 25, 2010 at 2:15 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Thu, 24 Jun 2010 09:59:41 -0430, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
I could have sworn the concept had been brought up some 8 months
ago
On Thu, Jun 24, 2010 at 1:56 AM, John Nagle na...@animats.com wrote:
On 6/23/2010 10:59 PM, Dennis Lee Bieber wrote:
On Wed, 23 Jun 2010 11:58:24 -0430, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
When I have this code
On Thu, Jun 24, 2010 at 9:34 AM, Stephen Hansen me+list/pyt...@ixokai.iowrote:
On Thu, Jun 24, 2010 at 4:47 AM, Victor Subervi
victorsube...@gmail.comwrote:
On Thu, Jun 24, 2010 at 1:56 AM, John Nagle na...@animats.com wrote:
Yes. Please post your CREATE statements, so we can see your
Hi;
I have this line:
cursor.execute('select clientEmail from clients where client=%s',
(string.replace(client, '_', ' ')))
clientEmail = cursor.fetchone()[0]
cursor.execute('select * from %s' % (client))
client = Lincoln_Properties
With the replacement, the interpreter complains that
On Wed, Jun 23, 2010 at 10:25 AM, Stephen Hansen
me+list/pyt...@ixokai.iowrote:
On 6/23/10 6:45 AM, Victor Subervi wrote:
Hi;
I have this line:
cursor.execute('select clientEmail from clients where client=%s',
(string.replace(client, '_', ' ')))
clientEmail = cursor.fetchone()[0
Ok, let's start all over again. When I have this code:
cursor.execute('select clientEmail from clients where client=%s',
(client.replace('_', ' '),))
clientEmail = cursor.fetchone()[0]
I get this error:
/var/www/html/globalsolutionsgroup.vi/mailSpreadsheet.py
67 /body
68 /html'''
On Wed, Jun 23, 2010 at 12:51 PM, Stephen Hansen ixo...@ixokai.io wrote:
The problem is not this line but:
File /var/www/html/globalsolutionsgroup.vi/mailSpreadsheet.py, line
38, in mailSpreadsheet
cursor.execute('select * from %s', (client,))
This one.
Yes, can't use the comma,
I really can't begin to thank you guys enough. Great information, goes
without saying. A lot to consider. I would like to explore rewriting the
shopping cart in Django. The reality of the matter may make it difficult.
Working literally from the time I awake to when I go to sleep and not having
On Mon, Jun 21, 2010 at 9:03 AM, Tim Chase python.l...@tim.thechases.comwrote:
On 06/21/2010 07:40 AM, Victor Subervi wrote:
I would like to explore rewriting the shopping cart in Django.
The reality of the matter may make it difficult. Working
literally from the time I awake to when I go
Hi;
I've caught a lot of flack (imagine that) about using CGI. I understand
there are several other options, to wit: mod_python, fastcgi and wcgi. I've
messed around with mod_python without luck. What are your suggestions?
TIA.
beno
--
http://mail.python.org/mailman/listinfo/python-list
Stephen Hansen suggests running this line before running or testing code:
python -m compileall -f .
Noted. Will do.
Stephen also mentions, along with many others, that using CGI these days is
silly (my word). Noted. I'll switch over, but not today. Got other things
more pressing ;)
DavidA
On Wed, Jun 16, 2010 at 2:09 PM, Dave Angel da...@ieee.org wrote:
Fix any one of them, and I'd probably have kept quiet.
Thanks for piping up ;)
beno
--
http://mail.python.org/mailman/listinfo/python-list
Stephen Hansen suggests I move the line:
new_passengers_curr_customers =
int(form.getfirst('new_passengers_curr_customers', 0))
from Script 3 (as he dubs it) to Script 2. Naturally (though he wouldn't
have known) that's how I had it at first. After sending the post that
finally cleared up the
On Sat, Jun 12, 2010 at 11:46 AM, Stephen Hansen
me+list/pyt...@ixokai.iowrote:
On 6/12/10 6:19 AM, Victor Subervi wrote:
You will note those very first lines. This also addresses two other
responders who believed perhaps I had called the variable from the form
in
question more than once
On Sat, Jun 12, 2010 at 1:58 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote:
The only suggestion I have is: try dumping all the .pyc's.
Interestingly,
ls -al
reveals *no* *.pyc files.
Yeah, that problem caught me once as well.
TIA,
beno
--
On Thu, Jun 10, 2010 at 2:07 PM, Stephen Hansen me+list/pyt...@ixokai.iowrote:
On 6/10/10 10:48 AM, Victor Subervi wrote:
Now, create_edit_passengers3() is called by the form/submit button in
(you
guessed it) create_edit_passengers2.py, the latter containing a var in it
which *should
On Fri, Jun 11, 2010 at 12:24 PM, Stephen Hansen
me+list/pyt...@ixokai.iowrote:
Sure, if you have some file that two separate scripts import, and in
said file you generate some value-- as long as that value will be the
same at all times, it'll appear that the two scripts are sharing some
Ok. Starting over. Here is the script that generates the variable
new_passengers_curr_customers:
#!/usr/bin/python
import cgitb; cgitb.enable()
import cgi
import sys,os
sys.path.append(os.getcwd())
import MySQLdb
from login import login
from Curr_Passengers_Table import Curr_Passengers_Table
Hi;
I have a script that calls values from the form that calls it. This script
imports another script:
from New_Passenger import New_Passenger
def create_edit_passengers3():
...
new_passengers_curr_customers = New_Passengers_Curr_Customers(customers,
flights)
if
On Thu, Jun 10, 2010 at 10:30 AM, Stephen Hansen (L/P) me+list/
pyt...@ixokai.io wrote:
On 6/10/10 7:14 AM, Victor Subervi wrote:
Hi;
I have a script that calls values from the form that calls it. This
script
imports another script:
from New_Passenger import New_Passenger
def
No, I think you've misunderstood because while I thought I was being clear I
probably was not. So here is the complete code of
create_edit_passengers3.py:
#!/usr/bin/python
import cgitb; cgitb.enable()
import cgi
import sys,os
sys.path.append(os.getcwd())
import MySQLdb
from login import login
Sorry, Dennis:
var = 'colorsShort'
var[0].upper + var[1:] = 'ColorsShort'
var.capitalize() = 'Colorsshort'
beno
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Jun 5, 2010 at 4:52 PM, Stephen Hansen apt.shan...@gmail.comwrote:
cur.execute(sql, [pkg, prodid, tmpTable, quantity] +
list(option_values))
Or:
cur.execute(sql, (pkg, prodid, tmpTable, quantity) + option_values)
I removed the explicit conversion-to-tuple in the first,
Hi;
I tried this:
cursor.execute('drop table tmp%s', tmpTable)
and got this error:
Traceback (most recent call last):
File /var/www/html/angrynates.com/cart/cart.py, line 196, in ?
cart()
File /var/www/html/angrynates.com/cart/cart.py, line 189, in cart
cursor.execute('drop
On Sun, Jun 6, 2010 at 11:40 AM, MRAB pyt...@mrabarnett.plus.com wrote:
As has been explained already, SQL might not (and here it clearly does
not) let you use placeholders for table or column names, only for
values.
Oops. Sorry. Thanks.
beno
--
On Thu, Jun 3, 2010 at 4:09 PM, John Nagle na...@animats.com wrote:
The real problem with this is not the Python. It's the approach
to SQL. What's going on here is that you have some collection of
named options that come in from some external source, and you're
trying to handle that by
Hi;
I have this:
for order in order_details:
store = order[0]
prodid = order[1]
pkg = order[2]
quantity = order[3]
if 'PatientID' in order_fields:
patientID = order[4]
try:
option_values = order[5:]
except TypeError:
Hi;
I have this code:
options = ''
our_options = []
our_options_string = ''
for op in ops:
options += '%s varchar(40) not null, ' % (op[0].upper() + op[1:])
our_options.append('%s' % form.getfirst('%s' % op))
our_options_string += '%s, ' % op
On Thu, Jun 3, 2010 at 12:25 PM, MRAB pyt...@mrabarnett.plus.com wrote:
So our_options is a list containing two values, which you're putting
into a tuple:
our_options = [first, second]
print len(our_options)
2
value_tuple = (our_options,)
print len(value_tuple)
1
In other words,
On Thu, Jun 3, 2010 at 1:48 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Thu, 3 Jun 2010 08:49:44 -0400, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
options += '%s varchar(40) not null, ' % (op[0].upper() + op[1
Hi;
I have a script in which I currently pass a number of variables to another
script through the url in a meta http-equiv tag. This seems both awkward and
hackable. I think it would be best to create a temporary mysql table, insert
them there, and pull them from the following script. The
On Thu, May 27, 2010 at 5:47 PM, Tim Chase python.l...@tim.thechases.comwrote:
On 05/27/2010 03:32 PM, Victor Subervi wrote:
On Thu, May 27, 2010 at 1:15 PM, Tim Chase wrote:
That should be:
', '.join(['%s'] * len(values)))
Or as I've done in the past:
', '.join('%s
On Fri, May 28, 2010 at 2:17 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Thu, 27 May 2010 23:22:24 +0100, MRAB pyt...@mrabarnett.plus.com
declaimed the following in gmane.comp.python.general:
Placeholders which are handled by .execute shouldn't be wrapped in
quotes, even is the
I still have this code:
sql = 'select * from options%s where ID=%%s', (opTable[0].upper() +
opTable[1:])
cursor.execute(sql, (id,))
which throws this error:
/var/www/html/angrynates.com/cart/enterOptionsPrices2.py
70 print 'All options prices have been successfully updated.'
Hi;
I have this code:
sql = insert into %s (%s) values ('%%s'); % (personalDataTable,
string.join(cols[1:], ', '))
#cursor.execute(sql, string.join(vals[1:], ', '))
cursor.execute('insert into %s (%s) values (%s);' %
(personalDataTable, string.join(cols[1:], ', '),
On Thu, May 27, 2010 at 8:34 AM, Victor Subervi victorsube...@gmail.comwrote:
Hi;
I have this code:
sql = insert into %s (%s) values ('%%s'); % (personalDataTable,
string.join(cols[1:], ', '))
#cursor.execute(sql, string.join(vals[1:], ', '))
cursor.execute('insert into %s (%s
On Thu, May 27, 2010 at 10:17 AM, Kushal Kumaran
kushal.kuma...@gmail.comwrote:
On Thu, 2010-05-27 at 08:34 -0400, Victor Subervi wrote:
Hi;
I have this code:
sql = insert into %s (%s) values ('%%s'); % (personalDataTable,
string.join(cols[1:], ', '))
#cursor.execute(sql
On Thu, May 27, 2010 at 12:11 PM, Kushal Kumaran
kushal.kuma...@gmail.comwrote:
Since I'm in a good mood today, here's a little present:
def insert(cursor, table, columns, values):
Insert a row into a table. columns must be a list of column
names. values must be a list of values for
On Thu, May 27, 2010 at 1:37 PM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Wed, 26 May 2010 08:29:21 -0400, Victor Subervi
victorsube...@gmail.com declaimed the following in
gmane.comp.python.general:
valueList = (%value1, %value2, %value3)
If I'd coded it correctly
On Thu, May 27, 2010 at 12:56 PM, MRAB pyt...@mrabarnett.plus.com wrote:
Kushal Kumaran wrote:
[snip]
Since I'm in a good mood today, here's a little present:
def insert(cursor, table, columns, values):
Insert a row into a table. columns must be a list of column
names. values
Hi;
But what about this?
sql = select pic%d from %s where ID='%%s'; % (pic, store)
cursor.execute(sql % id)
If I try and rewrite the last line like this:
cursor.execute(sql, id)
it doesn't work. What do?
How about this one:
cursor.execute(insert into categories (Store,
On Thu, May 27, 2010 at 2:54 PM, MRAB pyt...@mrabarnett.plus.com wrote:
Victor Subervi wrote:
Hi;
But what about this?
sql = select pic%d from %s where ID='%%s'; % (pic, store)
cursor.execute(sql % id)
If I try and rewrite the last line like this:
cursor.execute(sql, id
On Thu, May 27, 2010 at 1:15 PM, Tim Chase s...@thechases.com wrote:
On 05/27/2010 11:56 AM, MRAB wrote:
Kushal Kumaran wrote:
', '.join('%s' * len(values)))
That should be:
', '.join(['%s'] * len(values)))
Or as I've done in the past:
', '.join('%s' for _ in
On Wed, May 26, 2010 at 2:42 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
I was, for that example, assuming that the user input values was
being used in a select query and hence wrapped it with wildcard markers
so that the phrase would match anywhere in the data field.
In said thread
On Wed, May 26, 2010 at 11:25 AM, Kushal Kumaran
kushal.kuma...@gmail.comwrote:
On Tue, 2010-05-25 at 14:45 -0400, Victor Subervi wrote:
Hi;
I have this code:
clientCursor.execute('select ID from %s' % (personalDataTable))
upds = [itm[0] for itm in clientCursor]
print
On Tue, May 25, 2010 at 3:50 AM, Dennis Lee Bieber wlfr...@ix.netcom.comwrote:
On Mon, 24 May 2010 13:37:58 -0400, Victor Subervi
victorsube...@gmail.com declaimed the following in
Parameterized queries process the parameters to ensure that they are
safe for use in the SQL statement
Hi;
I have this code:
clientCursor.execute('select ID from %s' % (personalDataTable))
upds = [itm[0] for itm in clientCursor]
print input type='hidden' name='upds' value='%s' / % upds
The problem is that the values passed are 1L, 2L When I retrieve them on
the other end and try
Hi;
I have the following:
#sql = 'alter table %s alter column %s set default %%s;' % (store,
col)
#cursor.execute(sql, colValue)
cursor.execute('alter table %s alter column %s set default %s;' %
(store, col, colValue))
database.commit()
Now I don't like that third
On Fri, May 21, 2010 at 2:40 PM, Tim Chase python.l...@tim.thechases.comwrote:
On 05/21/2010 12:31 PM, Victor Subervi wrote:
cursor.execute('insert into Baggage values (Null, %s, %s, %s,
%s)', (flight_id, customer_id, weight, ticket_no))
You're trying to insert stuff
Hi;
A lister recently responded to my post concerning mysl commands of the
following type:
cursor.execute('insert into foo values (%s, %s)' % (bar, something))
stating that I need to eliminate the % to prevent injection attacks, thus:
cursor.execute('insert into foo values (%s, %s)', (bar,
Hi;
When I try to execute this code from my Python script, I get this error:
Traceback (most recent call last):
File
/var/www/html/creative.vi/clients/sea-flight/reservations/create_edit_bags3.py,
line 38, in ?
create_edit_bags3()
File
Hi;
I have this code:
#!/usr/bin/python
import cgitb; cgitb.enable()
import cgi
import sys,os
sys.path.append(os.getcwd())
import MySQLdb
from login import login
def create_edit_passengers4():
print Content-Type: text/html
print
print '''
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
On Thu, May 20, 2010 at 12:56 PM, MRAB pyt...@mrabarnett.plus.com wrote:
When performing SQL operations, don't insert the values using Python's
string formatting, because that makes it vulnerable to SQL-injection
attacks, ie don't do this:
cursor.execute(sql_command % values)
do this:
On Sat, Apr 10, 2010 at 3:14 PM, Tim Chase python.l...@tim.thechases.comwrote:
1) Preeminently, address second-order ignorance.
Tim, throughout this post, you're way out of line. The s/w I have already
built for this client works just fine. It's not a matter or not having the
tools or not
On Sun, Apr 11, 2010 at 4:29 PM, Tim Chase python.l...@tim.thechases.comwrote:
On 04/11/2010 02:53 PM, MRAB wrote:
Victor Subervi wrote:
Hi;
I send variables to a script. The script adds appropriate lines into a
database of an order to my shopping cart. When I refresh the screen
On Mon, Apr 12, 2010 at 9:03 AM, Victor Subervi victorsube...@gmail.comwrote:
On Sun, Apr 11, 2010 at 4:29 PM, Tim Chase
python.l...@tim.thechases.comwrote:
On 04/11/2010 02:53 PM, MRAB wrote:
Victor Subervi wrote:
Hi;
I send variables to a script. The script adds appropriate lines
On Mon, Apr 12, 2010 at 10:29 AM, Tim Chase
python.l...@tim.thechases.comwrote:
your own inaccurate assumptions and answer those, please.
Heh, my wife and I joke that in those can this marriage be saved
newspaper columns, every answer boils down to communication is key. Keep
the customer
Hi;
I send variables to a script. The script adds appropriate lines into a
database of an order to my shopping cart. When I refresh the screen, as no
doubt some customers will do, it re-ads those orders. Now, I can delete
them, but that's not the point. I don't want it to re-ad the orders. How do
Hi;
I'm working with my first client where I've developed a custom script. I way
underbid the project and I ate that as part of my learning experience. We
outlined as precisely as I knew how what functionality was needed. Then he
went to input data and lo and behold he needed more functionality. I
Hi;
I'm running Pexpect (no discussion list) with the following code:
#! /usr/bin/python
import pexpect
def runVpopmail(whatdo, acct, domain, newpw, oldpw=''):
if whatdo == 'vadduser':
child = pexpect.spawn('/home/vpopmail/bin/%s %...@%s %s' % (whatdo, acct,
domain, newpw))
elif whatdo
On Wed, Mar 10, 2010 at 10:16 PM, alex23 wuwe...@gmail.com wrote:
Victor Subervi victorsube...@gmail.com wrote:
There's a program (vpopmail) that has commands which, when called,
request
input (email address, password, etc.) from the command line. I
would
like to build a TTW interface
Hi;
There's a program (vpopmail) that has commands which, when called, request
input (email address, password, etc.) from the command line. I would
like to build a TTW interface for my clients to use that interacts with
these commands. It's easy enough for me to get the information from a
script,
Hi;
I have the following code:
def my_mail():
user, passwd, db, host = login()
database = MySQLdb.connect(host, user, passwd, db)
cursor= database.cursor()
ourEmail1 = 'mari...@globalsolutionsgroup.vi'
ourEmail1 = 'p...@globalsolutionsgroup.vi'
ourEmail2 = 'benoismyn...@gmail.com'
On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi victorsube...@gmail.comwrote:
Hi;
I have the following code:
def my_mail():
user, passwd, db, host = login()
database = MySQLdb.connect(host, user, passwd, db)
cursor= database.cursor()
ourEmail1 = 'mari...@globalsolutionsgroup.vi
1 - 100 of 517 matches
Mail list logo