On 12/22/2009 10:57 AM Victor Subervi said...
Hi;
I have the following code:
print 'printTheForm: ', descrProds, '<br />'
This doesn't match what you say the below is the output from. There's
no <br /> below...
for value in descrProds:
print 'value: ', value, '<br />'
When I assign your result labeled printTheForm to descrProds and execute
the above I get the result you expect.
The why probably lies somewhere in between...
Emile
which prints this:
printTheForm: [['ID', 'tinyint', '5', '0', None], ['SKU', 'varchar',
'40', '', None], ['Category', 'varchar', '40', '', None], ['Name',
'varchar', '50', '', None], ['Title', 'varchar', '100', '', None],
['Description', 'mediumtext', '100', '', None], ['Price', 'float', '8',
'0.0', None], ['SortFactor', 'int', '4', '0', None], ['Availability',
'tinyint', '1', '0', '1'], ['OutOfStock', 'tinyint', '1', '0', '0'],
['ShipFlatFee', 'float', '5', '0.0', '0.00'], ['ShipPercentPrice',
'tinyint', '2', '0', '0'], ['ShipPercentWeight', 'tinyint', '2', '0',
'0'], ['Associations', 'varchar', '40', '', None], ['TempPrice',
'tinyint', '1', '0', None], ['LastDatePrice', 'date', '10',
'yyyy/mm/dd', None], ['Weight', 'float', '7', '0.0', None], ['Metal',
'enum', ['14k gold', '18k gold', 'white gold', 'silver', 'tungsten',
'titanium'], '', None], ['PercentMetal', 'tinyint', '2', '0', None],
['colorsShadesNumbersShort', 'set', [''], '', None]]
value: ['ID', 'tinyint', '5', '0', None]
value: ['SKU', 'varchar', '40', '', None]
value: ['Category', 'varchar', '40', '', None]
value: ['Name', 'varchar', '50', '', None]
value: ['Title', 'varchar', '100', '', None]
value: ['Description', 'mediumtext', '100', '', None]
value: ['Price', 'float', '8', '0.0', None]
value: ['SortFactor', 'int', '4', '0', None]
value: ['Availability', 'tinyint', '1', '0', '1']
value: ['OutOfStock', 'tinyint', '1', '0', '0']
value: ['ShipFlatFee', 'float', '5', '0.0', '0.00']
value: ['ShipPercentPrice', 'tinyint', '2', '0', '0']
value: ['ShipPercentWeight', 'tinyint', '2', '0', '0']
value: ['Associations', 'varchar', '40', '', None]
value: ['TempPrice', 'tinyint', '1', '0', None]
value: ['LastDatePrice', 'date', '10', 'yyyy/mm/dd', None]
You'll notice that the first print statement prints out several tuples
that don't get printed out in the last statement (they're truncated). Why?
TIA,
beno
--
http://mail.python.org/mailman/listinfo/python-list