Crypto headaches.

2009-02-18 Thread SamG
-out org-file BTW, decryption using a python code works well. But i m of the impression a file encry with one program should/can be decrypt with another program (in my case openssl) using the same parameters. Pls help. SamG -- http://mail.python.org/mailman/listinfo/python-list

Re: Crypto headaches.

2009-02-18 Thread SamG
On Feb 18, 7:10 pm, M.-A. Lemburg m...@egenix.com wrote: On 2009-02-18 14:23, SamG wrote: Hi, Using the python's Crypto.Cipher.Blowfish is create and encrypted file in the CBC mode. Now... when try to decrypt it with OpenSSL i get an error stating bad magic number. Are you getting

Threading and wx.....

2008-08-08 Thread SamG
Hi, Im trying my hand at threading with wx applications. I have written the following code... import wx from threading import Thread, Lock class createWindow(Thread): def __init__(self): Thread.__init__(self) self.lock = Lock() self.app=None def run(self):

Re: Threading and wx.....

2008-08-08 Thread SamG
On Aug 8, 12:01 pm, SamG [EMAIL PROTECTED] wrote: Hi, Im trying my hand at threading with wx applications. I have written the following code... import wx from threading import Thread, Lock class createWindow(Thread): def __init__(self): Thread.__init__(self

Problem obtaining an object reference...

2008-08-07 Thread SamG
I have two windowing classes A and B. Inside A's constructor i created an instance B to display its Modal window. Only on clicking OK/ Closing this modal window do i proceed to display the A's window. All that is fine. Now the problem is i would like to write a python script to test the this GUI

Re: os.system question

2008-08-07 Thread SamG
On Aug 7, 6:07 am, Kevin Walzer [EMAIL PROTECTED] wrote:   import os   foo = os.system('whoami') kevin   print foo 0   The standard output of the system command 'whoami' is my login name. Yet the value of the 'foo' object is '0,' not 'kevin.' How can I get the value of 'kevin' associated

Re: OSError[Error 5]

2007-05-23 Thread SamG
On May 23, 1:39 am, Miki [EMAIL PROTECTED] wrote: Hello SamG, I do this on PowerPC.. import os os.listdir('/usr/bin') And endup getting this ... OSError: [Error 5] Input/output error:/usr/bin What happens when you run ls /usr/bin in the terminal? HTH, -- Miki [EMAIL

OSError[Error 5]

2007-05-22 Thread SamG
Hi, I do this on PowerPC.. import os os.listdir('/usr/bin') And endup getting this ... OSError: [Error 5] Input/output error:/usr/bin I use python 2.4.4 (Framework edition) Could anybody help PS: I have clean listing with python 2.3.5 but my requirement is for python 2.4.4. Thanx in

enable-shared

2007-05-04 Thread SamG
How we do if find that python that we are using is compiled with the -- enable-shared option. There is can actually be done using distutils.sysconfig module but this modules is ported only with python- devel but not with standard python install. Is there another way apart from checking the

Re: How to find the present working directory using python.

2007-05-04 Thread SamG
On May 4, 12:03 pm, pradeep nair [EMAIL PROTECTED] wrote: how to find out the present working directory using python. os.system('pwd') works good. But i need some specific one in python rather than embedding shell command into python. os.path.getcwd() --

32 OS on 64-bit machine

2007-05-03 Thread SamG
If anyone has a x86_64 machine and is running a 32bit OS on top of that could you tell me what output would you get for the following program #== import platform print platform.processor() print platform.architecture() #== Thanks in advance : )~ --

Re: 32 OS on 64-bit machine

2007-05-03 Thread SamG
On May 3, 2:58 pm, Harald Karner [EMAIL PROTECTED] wrote: SamG wrote: If anyone has a x86_64 machine and is running a 32bit OS on top of that could you tell me what output would you get for the following program #== import platform print platform.processor

Try problem

2007-04-13 Thread SamG
import sys try: s=1 if s==1: sys.exit(0) else: sys.exit(1) except SystemExit,s: if (s==0): print s else: print Hello How come i always end up getting the Hello printed on the screen as logically i should a '0' printed? --

Re: Try problem

2007-04-13 Thread SamG
On Apr 13, 2:25 pm, [EMAIL PROTECTED] wrote: On Apr 13, 5:14 pm, SamG [EMAIL PROTECTED] wrote: import sys try: s=1 if s==1: sys.exit(0) else: sys.exit(1) except SystemExit,s: if (s==0): print s else: print

redirecting stdout to a file as well as screen

2007-04-12 Thread SamG
How could i make, from inside the program, to have the stdout and stderr to be printed both to a file as well the terminal(as usual). -- http://mail.python.org/mailman/listinfo/python-list

Re: redirecting stdout to a file as well as screen

2007-04-12 Thread SamG
On Apr 12, 1:00 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 12 Apr 2007 04:14:32 -0300, SamG [EMAIL PROTECTED] escribió: How could i make, from inside the program, to have the stdout and stderr to be printed both to a file as well the terminal(as usual). A very minimal example

Re: redirecting stdout to a file as well as screen

2007-04-12 Thread SamG
On Apr 12, 12:40 pm, Ant [EMAIL PROTECTED] wrote: On Apr 12, 8:14 am, SamG [EMAIL PROTECTED] wrote: How could i make, from inside the program, to have the stdout and stderr to be printed both to a file as well the terminal(as usual). One way would be to create a custom class which has

Re: redirecting stdout to a file as well as screen

2007-04-12 Thread SamG
On Apr 12, 3:16 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 12 Apr 2007 06:01:18 -0300, SamG [EMAIL PROTECTED] escribió: On Apr 12, 1:00 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 12 Apr 2007 04:14:32 -0300, SamG [EMAIL PROTECTED] escribió: How could i make

Re: redirecting stdout to a file as well as screen

2007-04-12 Thread SamG
On Apr 12, 3:42 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: En Thu, 12 Apr 2007 07:23:43 -0300, SamG [EMAIL PROTECTED] escribió: How could i make, from inside the program, to have the stdout and stderr to be printed both to a file as well the terminal(as usual). class Tee(file

Capturing the entry point of a script

2007-04-12 Thread SamG
If a function does not have main function defined and there is only a if __name__=__main__: how do i make a call to that using profile.runcall( ...) in my profiling script. Is there a way to find the entry point of a script and indentify it with module method. --

Capturing the entry point of a script

2007-04-12 Thread SamG
If a function does not have main function defined and there is only a if __name__=__main__: how do i make a call to that using profile.runcall( ...) in my profiling script. Is there a way to find the entry point of a script and indentify it with module method. --