python 2.7 - How to pass a string as an argument? -


i have line of code as:

y="win_"+x[0:4]+x[5:7]+x[8:10]+"_"+x[11:13]+"_"+x[14:16]+"_"+x[17:19]+"_"+"pro.jpg" 

print y gives long string i.e. win_20170910_23_27_11_pro.jpg

now have next line of code as

img_url ='y' result = cf.face.detect(img_url) 

but shows invalid img_url

remove quotes around y in line: img_url = y

you might have other issues finding img ("prefixing img_url './' mean current directory can help")


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -