python - Alfred Workflow not working at all -


this kind of specific question, directed mac users use alfred + powerpack & familiar workflow development.

i trying create alfred workflow , failing miserably reason. workflow supposed password generator based on gist made. copies whole python script trying run instead of password. can't figure out why happening.

here's download link workflow: download

here follows python script using.

thanks in advance.

ps: aware alfred's website has it's own forum discussing topic have register & hate registering stuff use once in lifetime.

#!/usr/bin/env python import string import random  q = {query}  try:     pattern = list(q)     password = ""      x in pattern:         if x == "a":             password += random.choice(list(string.lowercase))         elif x == "a":             password += random.choice(list(string.uppercase))         elif x == "%":             password += random.choice(list(string.digits))         elif x == "#":             password += random.choice(list(string.punctuation))         else:             password += x finally:     print(password) 

are running code within run script action? goal copy clipboard? if so, replace print(password) return password. then, add copy clipboard output connects run script action. ought want.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -