[Tutor] list of strings

Shawn Matlock matlocs at odscompanies.com
Wed Feb 9 23:56:26 CET 2011


Hello All,

I'm doing something wrong.

This prints a list of data source names:

    # List all data sources
    dataSourceList = AdminConfig.list('DataSource') # .split(ls)
    if verbose == 'True':
        print 'DEBUG Data Source List: '
        print dataSourceList

DEBUG Data Source List:
"Facets Data Source(cells/Staging2Cell|resources.xml#DataSource_1267574027582)"
"Facets Extended DataSource(cells/Staging2Cell|resources.xml#DataSource_1267574091663)"
"Facets Reporting Database(cells/Staging2Cell|resources.xml#DataSource_1267574150361)"
CorpReports(cells/Staging2Cell|resources.xml#DataSource_1270069048670)
DefaultEJBTimerDataSource(cells/Staging2Cell/applications/cisNotesEar.ear/deployments/cisNotesEar|resources.xml#DataSour
ce_1216665969544)
DefaultEJBTimerDataSource(cells/Staging2Cell/nodes/pyxisNode01/servers/Agent01|resources.xml#DataSource_1000001)
DefaultEJBTimerDataSource(cells/Staging2Cell/nodes/pyxisNode01/servers/DBIC01|resources.xml#DataSource_1000001)


I expected this to print each data source name in the list. Instead, it is printing each character:

    # Modify the data sources so that the aged timeout is set correctly.
    for dataSource in dataSourceList:
        print 'DataSource: %s' % dataSource
        time.sleep(5)

DataSource: "
DataSource: F
DataSource: a
DataSource: c
DataSource: e


Thank you,
----------------------------------
Shawn Matlock
Lead Application Admin
ODS
(503) 228-6554
http://www.odscompanies.com<http://www.odscompanies.com/>

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110209/c35a739c/attachment.html>


More information about the Tutor mailing list