I am porting a Python-based web server from Linux to Windows. There is a call to socket.fromfd, which is only available in Unix and I've been trying to find a Windows-equivalent with no luck.
I came upon WinSock and WSADuplicateSocket, but these don't seem to be available in Python based on this post: Can I use the winsock api from python?
I know there is also DuplicateHandle, but it is not reliable for sockets. Is there any reliable way to reproduce socket.fromfd for Windows?
I think there is a patch for this issue, for python windows. I haven`t tried it personally, but this link might help :
http://bugs.python.org/issue1378
Related
I would like to know if there are any libraries that would be able to read blk00000.dat file. It can be either in Python or NodeJS libraries. Please recommend me some of the ones that you guys think is useful for working with blockchain.
For Python, bssdb, now deprecated, or the unofficial port for Python3, bssdb3, seem to be the only libraries for Berkeley DB in Python.
For NodeJS it seems the library for it is simply called berkeleydb
Also please note this is an off-topic post
There is a related question. The answer there suggests using PyInstaller. I'm looking at PyInstaller documentation. In the meanwhile, if somebody could specify how this could be done using bbfreeze that would be great, since we already have a deployment system in place that uses bbfreeze.
It is not terribly likely. If I were you I would try to use the Windows PY2EXE inside WINE. If it works, you are golden, if not head to your local used laptops flea market and get an old Windows XP machine to do the job.
I just installed Jython 2.5.1. I want to convert my Python file into Java class file and it is instructed on the website to use the jythonc command-line tool but I can't find it. Does anyone know where I could find it?
Basically what i was trying to accomplish is to get my Python code running client-side in a browser and the best way seemed to be by creating an applet using Jython. I don't want to create a desktop application and using Silverlight/IronPython is out of the question. Any other ideas are welcomed.
Cheers!
You can still compile your python-code to class-files:
import compileall;
compileall.compile_dir('Lib'); # to compile yor Lib-Dir
should work with 2.5 jython
i use it to create class-files to put in jars :-)
Jythonc was removed in Jython 2.2 and is no longer supported. The official way to embed Jython code in Java is to create an instance of the interpreter to run the Jython code directly. There is an article on this here.
Personally I preferred the jythonc method and hope it will be reinstated in a future version of Jython, even though it had a number of issues.
I am interested in the Python one. I wish to automate some GUI under Windows. What is the best open source library for that with no strings attached? Thanks.
Try pyWinAuto.
There's WATSUP, but I've not tried it yet myself.
I've also heard of pyWinAuto, although the link I have is to pyWinAuto on SourceForge.
I'm planning on using an embedded browser in my pygtk application and I'm debating between gtkmozembed and pywebkitgtk. Is there any compelling difference between the two? Are there any third options that I don't know about?
It should be noted that I won't be using this to access content on the web. I'm mainly using it for UI purposes.
My priorities are:
It needs to be stable.
It needs to be cross-platform.
It should be easy to use.
It should be actively maintained.
It should be extensible.
It should be fast.
gtkmozembed is not available on Windows, although you can use the gecko embedding interface directly. This would require you to write some C++ code.
As far as I know, the gtk webkit port is not available on Windows yet, and still appears to be undergoing a lot of change.
For an example of a cross-platform gecko embedding solution, check out Miro.
Miro is python, and they've written just a couple of C++ classes to embed gecko on Windows, while using gtkmozembed on linux.
if you judge by the web pages then definitely pywebkitgtk
pygtkmoz from this page
"Note: this project is no longer maintained. Please use gnome-python-extras (http://www.pygtk.org) instead. I apologize for any trouble this might cause, but this is better in the long run. Python bindings for GtkEmbedMozilla."
and pywebkitgtk looks like active project changes