[Ironpython-users] IronPython, Daily Digest 8/27/2014

CodePlex no_reply at codeplex.com
Thu Aug 28 09:26:36 CEST 2014


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New comment] "No module named ..." exception in multi threading environment
2. [New issue] import python module
3. [New comment] import python module
4. [New issue] b64encode(bz2.compress()) throws exception.

----------------------------------------------

ISSUES

1. [New comment] "No module named ..." exception in multi threading environment
http://ironpython.codeplex.com/workitem/35498
User slide_o_mix has commented on the issue:

"<p>I'm a little concerned by the extension of the lock because it means the lock will be in place during the event handler, who knows how long that will take?  I'll see if I can understand better why this occurs.</p>"-----------------

2. [New issue] import python module
http://ironpython.codeplex.com/workitem/35506
User dayian has proposed the issue:

"hi my project is ironpython in wpf I can use ironpython module my project is about digital sign and I should use from crypto and PIL python module in it. but i can not. please help me I do not have time and can not change my process.I am new in ironpython please guide me  thanks"-----------------

3. [New comment] import python module
http://ironpython.codeplex.com/workitem/35506
User dayian has commented on the issue:

"<p>this is my code:<br>            im=Image.FromFile(self.text2.Text)<br>            hashA = SHA512.New('my_picture')<br>            hashA.update(self.txt1.Text)<br>            hashoutA = hashA.hexdigest()<br>            key = DSA.generate(1024)<br>            K = random.StrongRandom().randint(1,key.q-1)<br>            signature = key.sign(hashoutA, K)<br>            seq = asn1.DerSequence()<br>            seq[:] = [ 0, key.p, key.q, key.g, key.y]<br>            exported_key = "-----BEGIN DSA PUBLIC KEY-----\n%s-----END DSA PUBLIC KEY-----" % seq.encode().encode("base64")<br>            im2 = stepic.encode(im, str(signature))<br>            im2.save('Secret.png','PNG')<br>            myFile = open('key.txt','w')<br>            myFile.write(exported_key)<br>            myFile.close()<br>            MessageBox.Show("Process Completed Successfully!")</p>"-----------------

4. [New issue] b64encode(bz2.compress()) throws exception.
http://ironpython.codeplex.com/workitem/35507
User hfoffani has proposed the issue:

"This works on CPython but on IronPython throws an exception in base64.b64encode.
from __future__ import print_function

import cPickle
import bz2
import base64

def serializa(o):
  s1 = cPickle.dumps(o)
  s2 = bz2.compress(s1)
  s = base64.b64encode(s2)
  return s

def deserializa(s):
  o = cPickle.loads(bz2.decompress(base64.b64decode(s)))
  return o

def procesa():
  l1 = [23,4,303,None,'.',32023.03,0]
  l2 = deserializa(serializa(l1))
  print(l1, l2)

procesa()

C:> ipy.exe x.py
Traceback (most recent call last):
File "x.py", line 23, in <module>
File "x.py", line 20, in procesa
File "x.py", line 10, in serializa
File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode
TypeError: expected str, got bytes


Pythons:

Python 2.7.8 (default, Aug 24 2014, 21:26:19) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information

IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit)
Type "help", "copyright", "credits" or "license" for more information."
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20140828/664bdaae/attachment.html>


More information about the Ironpython-users mailing list