Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some PDG gallery items / expression presets #1132

Closed
johnnyquest opened this issue Oct 11, 2020 · 1 comment
Closed

some PDG gallery items / expression presets #1132

johnnyquest opened this issue Oct 11, 2020 · 1 comment
Assignees

Comments

@johnnyquest
Copy link
Contributor

johnnyquest commented Oct 11, 2020

  • e.g. work items from space separated string attrib, etc
  • this should be H18+
@johnnyquest johnnyquest self-assigned this Oct 11, 2020
@johnnyquest
Copy link
Contributor Author

johnnyquest commented Oct 14, 2020

delimited strings to workitems w/ string attribute

strings = "0010 0030 0032 0033 0040 0060" # should be multi-line string parm
attribname = "shot" # parm
separators = "[,; \n]+" # parm

import re
strings = re.split(separators, strings)
i=0

for s in strings:
    shot = s.strip()
    if shot!="":
        item = item_holder.addWorkItem(index=i)
        item.setStringAttrib(attribname, shot)
        i+=1

johnnyquest added a commit to johnnyquest/qLib-johannes that referenced this issue Oct 31, 2020
johnnyquest added a commit to johnnyquest/qLib-johannes that referenced this issue Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant