Will IronPython / WPF work on Mac OS X?

2014-08-04 Thread danwgrace
Hello, I am thinking of using IronPython to build an Python application. Using WPF in Visual Studio to draw the GUI and create the XAML. Can I then run this Python application on a Mac OS X (10.8)? Thanks. -- https://mail.python.org/mailman/listinfo/python-list

How to pack a string variable of length 1 as a char using struct.pack?

2014-08-05 Thread danwgrace
Hi, How to pack a string variable of length 1 as a char using struct.pack? The following works fine: p = struct.pack('c', b'1') Whereas this causes an error "char format requires a bytes object of length 1": s = '1' p = struct.pack('c', s) I need to pack a variable rather than a literal. Thanks.