L
llothar
On windows everything is '.pyd' but there seems to be two ways to get
this on unix?
Why and what is the rule?
this on unix?
Why and what is the rule?
llothar said:On windows everything is '.pyd' but there seems to be two ways to get
this on unix?
> python -vv -c "import spam" 2> out.txt
> findstr spam out.txt
)
Why and what is the rule?
llothar said:My question was: Why does setup.py generated sometimes a pyd and
sometimes a so file?
setup.py picks an extension that happens to work on the platform you're
running setup.py on. doing otherwise would be pretty pointless.
</F>
llothar said:> I ship an application that compiles an python interpreter and
> extension on a remote system.
> It also needs to copy this created items around. So if i use setup.py
> to create an
> extension i need to know the file name of the generated file.
> Unfortunately as pointless as the answers i got so far.
Right, so you think people aren't trying to help you?llothar said:Unfortunately as pointless as the answers i got so far.
Okay i try it one more time:
I ship an application that compiles an python interpreter and
extension on a remote system.
It also needs to copy this created items around. So if i use setup.py
to create an
extension i need to know the file name of the generated file.
Damned this is trivial and a fundamental question and it is not
documented anywhere.
I have a clue at the moment that it might be ".so" when python is
compiled without shared library
and ".pyd" otherwise (configure option --enable-shared) . But this is
just a guess. Does anybody know?
And by the way: I think this is a bug and should be fixed. If the
platform does allow renaming the
extension of a DLL (does HP/UX allow this?) it should always be
".pyd"
Steve said:You display your ignorance here. The ".pyd" extension is used on Windows
as an alternative to ".dll", but both are recognized as shared
libraries. Personally I'm not really sure why they even chose to use
".pyd", which is confusing to most Windows users. In UNIX/Linux
environments ".so" is the standard extension for a shared library.
You display your ignorance here. The ".pyd" extension is used on Windows
as an alternative to ".dll", but both are recognized as shared
libraries. Personally I'm not really sure why they even chose to use
".pyd", which is confusing to most Windows users.
To depart from the platform standard would be unhelpful and confusing to
the majority of users. It's know use telling us what you think: tell us
instead the compelling reasons why your opinion is correct. Opinions,
after all, are so cheap that everyone can have one.
There are ways to build distributions of Python extensions (modules or
packages involving binary code from languages like C or C++), but you
will want to understand a bit more about computing in general
(and work on your social skills ;-)
llothar said:I don't think so. I asked a pretty simple question and as usual on
usenet nobody read the question
Well your researches can't have been that extensive: the developers liveUnfortunately there is no python.core mailing list that i know so i
ask here.
Fredrik said:and for the record, Python doesn't look for PYD files on any of the Unix
boxes I have convenient access to right now. what Ubuntu version are
you using, what Python version do you have, and what does
$ python -c "import imp; print imp.get_suffixes()"
print on your machine?
I wouldn't claim to be an Ubuntu guru but it seems as though the UbuntuFredrik said:Fredrik said:and for the record, Python doesn't look for PYD files on any of the Unix
boxes I have convenient access to right now. what Ubuntu version are
you using, what Python version do you have, and what does
$ python -c "import imp; print imp.get_suffixes()"
print on your machine?
for reference, here's what I get on Ubuntu 7.10, with the standard
Python interpreter (2.5.1):
$ python -c "import imp; print imp.get_suffixes()"
[('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1),
('.pyc', 'rb', 2)]
any Ubuntu gurus here that can sort this one out?
I wouldn't claim to be an Ubuntu guru but it seems as though the UbuntuFredrik said:Fredrik said:and for the record, Python doesn't look for PYD files on any of the Unix
boxes I have convenient access to right now. what Ubuntu version are
you using, what Python version do you have, and what does
$ python -c "import imp; print imp.get_suffixes()"
print on your machine?
for reference, here's what I get on Ubuntu 7.10, with the standard
Python interpreter (2.5.1):
$ python -c "import imp; print imp.get_suffixes()"
[('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1),
('.pyc', 'rb', 2)]
any Ubuntu gurus here that can sort this one out?
Steve said:I wouldn't claim to be an Ubuntu guru but it seems as though the Ubuntufor reference, here's what I get on Ubuntu 7.10, with the standard
Python interpreter (2.5.1):
$ python -c "import imp; print imp.get_suffixes()"
[('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1),
('.pyc', 'rb', 2)]
any Ubuntu gurus here that can sort this one out?
team decide that you would be able to import extension module YYY either
from YYY.so or from YYYmodule.so. IF you are asking *why* then I'd have
to answer that I have no idea at all.
Believe me nobody needs to teach me anything about general programming
anymore.
Well, at least *I* learned something in this thread. I had missed thatFredrik said:Steve said:I wouldn't claim to be an Ubuntu guru but it seems as though the Ubuntufor reference, here's what I get on Ubuntu 7.10, with the standard
Python interpreter (2.5.1):
$ python -c "import imp; print imp.get_suffixes()"
[('.so', 'rb', 3), ('module.so', 'rb', 3), ('.py', 'U', 1),
('.pyc', 'rb', 2)]
any Ubuntu gurus here that can sort this one out?
team decide that you would be able to import extension module YYY either
from YYY.so or from YYYmodule.so. IF you are asking *why* then I'd have
to answer that I have no idea at all.
oh, the ".so" and "module.so" is standard Python behaviour (see my first
post in this thread). what I cannot figure out is how "llothar" has
managed to get setup.py to build extensions that an Ubuntu Python cannot
load, without noticing.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.