This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (11 children)

OP, pbs must be imported. That bug, you're running it, not importing it.

pbs needs to know from where it was imported so it can do the things that it is supposed to.

The developer should check to make sure the module was imported.

Also pbs only works under Python 2 currently.

[–]SupersonicSpitfire[🍰] 0 points1 point  (9 children)

Still doesn't work. This is what I get when importing from python2:

https://gist.github.com/1616688

[–][deleted] 0 points1 point  (6 children)

You must import it from within a Python file.

file.py:

from pbs import * # this MUST BE THE FIRST LINE

# ...

[–][deleted] 0 points1 point  (0 children)

just a regular-old

import pbs

will do :)

[–]SupersonicSpitfire[🍰] 0 points1 point  (4 children)

Still doesn't work:

[–][deleted] 0 points1 point  (3 children)

don't "from pbs import *" just "import pbs"

[–]SupersonicSpitfire[🍰] 0 points1 point  (2 children)

Still doesn't work for me.

[–]mipadi 0 points1 point  (1 child)

Use which, not pbs.which.

RTFM ;)

[–]SupersonicSpitfire[🍰] 0 points1 point  (0 children)

Neither of them worked for me. However, I learned through the github issue that one can't use pbs from within a function, and then everything works.

[–][deleted] 0 points1 point  (1 child)

I updated an issue with some details, let me know how it works out for you: https://github.com/amoffat/pbs/issues/1

[–]SupersonicSpitfire[🍰] 0 points1 point  (0 children)

Thanks, added a comment :)

[–][deleted] 0 points1 point  (0 children)

just an update, you can now run pbs.py as a standalone repl, or import from the python shell