Home Download Buy Blog Forum Support

No python select support in Windows?

No python select support in Windows?

Postby bgreenlee on Tue Feb 14, 2012 5:51 am

I recently pushed an update to my sublime-github plugin, and I updated it to use the Requests module (http://docs.python-requests.org/), which uses urllib3, which uses select. It's my understanding that select is available on Windows, but it needs to be explicitly compiled in to the python build. Is there a reason it isn't? Is there anything I can do other than rewrite it to not use select?
bgreenlee
 
Posts: 22
Joined: Wed Jul 20, 2011 8:02 pm
Location: Seattle, WA

Re: No python select support in Windows?

Postby wbond on Tue Feb 14, 2012 3:58 pm

You can always do your share of testing and include the necessary files for the select module with your plugin. I do this for ssl on Linux for the SFTP plugin. I also do this for ctypes for Linux on a yet to be unreleased plugin.

For the ssl module I require the user to explicitly enable the module, which isn't a big deal since it is only required by FTPS connections, which tend to be rare. Luckily with Windows you should really only need to worry about getting your hands on a 32bit and 64bit to test with. For the ssl module I had to have 32 and 64 bit for multiple different versions of libssl.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: No python select support in Windows?

Postby bgreenlee on Sun Feb 19, 2012 3:30 pm

Thanks. Turned out that I could effectively ignore the lack of select on Windows and it would still work. I wasn't really up for attempting to do what you did for SSL on Linux. I peeked at your SFTP code and was impressed. Have you considered licensing that SSL code so other ST plugin developers could use it? I had the same issue on Linux, but took the low road of requiring curl to be present and using that.
bgreenlee
 
Posts: 22
Joined: Wed Jul 20, 2011 8:02 pm
Location: Seattle, WA


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests