2012-11-12 21 views
1

嘿我使用streamripper爲win32。 我已經設置了一個示例python腳本來顯示虛擬元數據。 Streamripper只是普通的不拿起來。我已經把它放在與例子相同的格式中: http://streamripper.sourceforge.net/history.php獲取外部元數據與python腳本streamripper爲win32

它只是不適合我。 任何人都知道如何解決?

import time 
while 1: 
    print 'TITLE=thisname\nARTIST=thisartist\n.\n' 
    time.sleep(10) 

我把腳本放在streamripper的根目錄下。 試了聯用:

script.py 
c:/program files/streamripper/script.py 
c:\\program files\\streamripper\\script.py 

例如:

CMD--> 
cd c:/program files/streamripper 
streamripper http://stream-114.shoutcast.com:80/smoothjazz_skyfm_mp3_96kbps -E script.py 

實在不行......

回答

1

的正確用法是:

streamrippper URL -E python "path to script" 

必須添加蟒蛇的環境變量perl方便地在win32 inst上已經做到了一切,但Python不

streamripper URL -E perl "path to script" 

而且在Python中,你必須立即刷新輸出 這工作:

import time 
import sys 

while 1: 
    print 'TITLE=thetitle\nARTIST=theartistname\n.' 
    sys.stdout.flush() 
    time.sleep(10)