我在终端运行此python script.py
,输出urls
rem_results = artist.search(name='rem')
rem = rem_results[0]
rem_blogs = rem.blogs
print 'Blogs about rem:', [blog.get('url') for blog in rem_blogs]
如何使用bash
命令输出每行一项?
答案 0 :(得分:1)
要将它保存在Python的上下文中,你不需要bash来做你正在做的事情,只需要你正在迭代的任何东西,并在新行上使用join,这样你的数据集合中的每个值都将被分开通过字符串中的新行:
Create or replace PROCEDURE IdentifyLockedAccounts(p_recordset OUT SYS_REFCURSOR) AS
BEGIN
OPEN p_recordset FOR SELECT USERNAME FROM DBA_USERS WHERE ACCOUNT_STATUS = 'LOCKED' OR ACCOUNT_STATUS = 'LOCKED(TIMED)';
END IdentifyLockedAccounts;
/