Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79384 > unrolled thread
| Started by | Sam Raker <sam.raker@gmail.com> |
|---|---|
| First post | 2014-10-21 08:34 -0700 |
| Last post | 2014-10-22 03:45 +1100 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.python
Pex import problems Sam Raker <sam.raker@gmail.com> - 2014-10-21 08:34 -0700
Re: Pex import problems Chris Angelico <rosuav@gmail.com> - 2014-10-22 03:04 +1100
Re: Pex import problems Sam Raker <sam.raker@gmail.com> - 2014-10-21 09:36 -0700
Re: Pex import problems Chris Angelico <rosuav@gmail.com> - 2014-10-22 03:45 +1100
| From | Sam Raker <sam.raker@gmail.com> |
|---|---|
| Date | 2014-10-21 08:34 -0700 |
| Subject | Pex import problems |
| Message-ID | <2aba47c0-f420-4f91-944b-1ce7e42817c6@googlegroups.com> |
Hi all, I'm trying to use Pex (http://pex.readthedocs.org/en/latest/index.html) to include requests in a little script to ping a server from a machine that doesn't come with pip (or much of anything, really) installed. I'm running into problems outputting a pex file that depends on a local script. I've got a command-line file, `client.py`, that can be called with a few command-line options. I can run `pex -r requests -o client.pex -- client.py`, but when I try `./client.pex -h` I get an error about "no such file or directory: '-h'". Ok, next attempt: `pex -r requests -o client.pex -e client` --> "ImportError: No module named client". I dug around in the code a bit, and from what I can tell, `-e FOO` boils down to `__import__(FOO)`, which I can do, both from the interpreter and from a test script. So what am I missing? The only other option I can think of would be: `pex -r requests -o client.pex` & then write a script that calls `client.py` from the pex environment (i.e., `./client.pex client.py -h` or whatever), and bundle the pex file, `client.py`, and the script together. But that seems like a misuse of the tool, at best. Alternatively/additionally: is there any mailing list/help source for pex? It seems like a great project, but I've not been able to find many resources out there, which is why I'm turning to you guys. (Why not just install pip/requests on the target machine? Because this is part of an effort to automate provisioning of a bunch of machines.) (Why not use pants? Because literally all we need is requests, and that seems like overkill.) (Also: anyone who's planning on chewing me out about formatting: I TRIED posting by email to comp.lang.python@googlegroups.com, but it wouldn't let me. Sorry for the extra whitespace.)
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-10-22 03:04 +1100 |
| Message-ID | <mailman.15032.1413907473.18130.python-list@python.org> |
| In reply to | #79384 |
On Wed, Oct 22, 2014 at 2:34 AM, Sam Raker <sam.raker@gmail.com> wrote: > (Also: anyone who's planning on chewing me out about formatting: I TRIED posting by email to comp.lang.python@googlegroups.com, but it wouldn't let me. Sorry for the extra whitespace.) That's because that isn't the mailing list's name. Sign up here: https://mail.python.org/mailman/listinfo/python-list ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Sam Raker <sam.raker@gmail.com> |
|---|---|
| Date | 2014-10-21 09:36 -0700 |
| Message-ID | <d98954f9-8f3d-4a35-b539-565ebf0c515e@googlegroups.com> |
| In reply to | #79385 |
On Tuesday, October 21, 2014 12:05:00 PM UTC-4, Chris Angelico wrote: > On Wed, Oct 22, 2014 at 2:34 AM, Sam Raker <sam.raker@gmail.com> wrote: > > > (Also: anyone who's planning on chewing me out about formatting: I TRIED posting by email to comp.lang.python@googlegroups.com, but it wouldn't let me. Sorry for the extra whitespace.) > That's because that isn't the mailing list's name. Sign up here: > https://mail.python.org/mailman/listinfo/python-list > ChrisA Thank you for your help.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-10-22 03:45 +1100 |
| Message-ID | <mailman.15033.1413909911.18130.python-list@python.org> |
| In reply to | #79386 |
On Wed, Oct 22, 2014 at 3:36 AM, Sam Raker <sam.raker@gmail.com> wrote: >> That's because that isn't the mailing list's name. Sign up here: > >> https://mail.python.org/mailman/listinfo/python-list > >> ChrisA > > Thank you for your help. No probs. Sorry I can't help with your main issue, as I'm not at all familiar with pex. ChrisA
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web