wxPython OGL future

2005-02-14 Thread PD
Hi Everyone,

I am sort of a new developer to python and working in an academic
environment. I climbed the learning curve on wxPython far enough to get
the functionality I want out of it so far... Now Im in need of a
diagramming library (something visio-like) to use for my software and
the only option I have seen is OGL. Yet I read that OGL is dead, no
longer maintained, obsucure and lacking documentation. Instead of
taking a leap of faith and walking off a cliff, Ide appreciate if some
people out there who have come across a similar problem have any
solutions or suggestions for me...

I am so disappointed at the moment I think Im about ready to throw in
the towel and crawl back to java. I love python, but it has some real
difficulties when it comes to making library choices on what _to_ and
_not to_ get yourself into.

I appreciate your guidance,
Pouya

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython OGL future

2005-02-14 Thread PD
Hi Tom,

OGL is a library that is part of wxPython (wx.lib.ogl). I am trying to
put together some kind of schematic editor. It would be a block diagram
of modules and sometimes a statemachine type of figure. Similar to
something Visio does, but about a gazillion times simpler.

Thanks
Pouya

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython OGL future

2005-02-14 Thread PD
Hi D H,

Thank you for the suggestions. I would be interested in Jython but I
had some rough runs with it and I think I would kind of want to stick
to wxWidgets since I think the GUI is kind of cleaner. Im trying to
avoid reinventing the wheel so pyxel is a too little of a framework for
me.

I looked at piccollo though, and that is very appealing to me. What has
your experience been with Jython? I personally had a bad run in with
jython when I tried to run some example code with Swing and got all
sorts of weird behaviour (this was in their demos by the way...) Have
you ever seen some serious projects written with jython that I could
look at maybe?

I greatly appreciate your help, Thank you
Pouya

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxPython OGL future

2005-02-14 Thread PD
Hi Peter,

I did look at the code, and did run several examples on it. It _is_
pretty well organized and easy to read through, and youre right, I
think i might be able to add missing functionality if need be.

I don't think I want that much out of it necessarily. I just feel
really weird writing new software with deprecated libraries. By the
time Im done with my project, I have to put all these disclaimers on
how the new versions of wxWidgets might not work. The thing I am really
concerened about is if wxPython decides to drop OGL because it is
deprecated... anyhow thats my 2 cents.

I actually saw several other discussions on OGL and think its such a
shame its been abandoned. It seems like a lot of people are interested
in having this kind of functionality present in the library. Who
knows... maybe if i decide to use it and get good at it, I should do my
share and contribute something back to the open-source community :)

Thank you,
Pouya

-- 
http://mail.python.org/mailman/listinfo/python-list


String backslash characters

2004-12-23 Thread PD
Hello,

I am new to python, but i am quite curious about the following.

suppose you had

print '\378'

which should not work because \377 is the max. then it displays two
characters (an 8 and a heart in my case...). What else does'nt quite
make sense is that if this is an octal why is an 8 accepted?

for instance is 378 really 11, 111, 1000 which is then the two
characters: <0001>,<000>. And why is this accepted?

I apologize if this has been discussed or if it is obvious. I would
appreciate it if someone could clear me up.

Yours,
PD

-- 
http://mail.python.org/mailman/listinfo/python-list


https client certificate validation

2006-10-23 Thread Yogesh Chawla - PD
Hello All,
I work for the State of Wisconsin and we are trying to
build a reference implementation using python.  Our
goals are this:

1) establish an HTTPS connection between our client
and ourselves

2) exchange client and server certificates to perform
mutual authentication

We only need to write the client in python.  The
client should check the server certificate, verify
that the date range and common name are valid.  Then
it should confirm that the server certificate is valid
according to a Certificate Revocation List.

After writing a basic script using HTTPSConnection, I
found this in the docs:

Warning: This does not do any certificate
verification!

I then tried to do the same using twisted, m2crypto
and a few other projects.

I am really hitting a wall here.  Can anyone point me
in the right direction?  I have a client cert, private
key and url I am trying to hit.  How can I fulfill the
requirements I have above using python?  I have done
most of this in Java, but we would prefer a python
implementation to distribute.

Thanks,
Yogesh Chawla 
-- 
http://mail.python.org/mailman/listinfo/python-list


SSL follow up

2006-10-23 Thread Yogesh Chawla - PD
Hi Paul and John,
Thanks for the SSL follow up messages.

I have 2 questions.  1) How do we get the Server cert
in python.  John wrote: "Nor does there seem to be a
way to get at the certificate itself from within
Python."  Perhaps pycurl will allow us to do this.  Is
there another method to get the server cert?

2) I like the idea of calling openssl in a subprocess.
 Do you have any of those openssl commands handy?  If
not, I can look through the documentation tommorrow.

Thanks!

Yogesh
-- 
http://mail.python.org/mailman/listinfo/python-list


FTP over TLS

2006-10-24 Thread Yogesh Chawla - PD
Hello All,
The state of wisc. wrote a script to do FTP over TLS
using pycurl.  I can post this here, but first need to
yank a bunch of password info out and get some
security clearance.  If someone is interested and
wants to email me offline, please do so at this
address.

Cheers,
Yogesh
-- 
http://mail.python.org/mailman/listinfo/python-list


SSL and confirming certs

2006-10-26 Thread Yogesh Chawla - PD
Hello All,
Here is a script I wrote to validate the cert sent by
the server.  It just makes system calls to open ssl. 
This is because python support is inadequate in this
area.  Let me know if this is helpful.  I monkeyed
with twisted, m2crypto, pyopenssl, and found myself
sinking into a deep depression:

import commands
import urllib

# Get a file-like object for the crl, this is a URL
for the CRL
f =
urllib.urlopen("http://devca.wijis.state.wi.us/certenroll/devca.wijis.state.wi.us.crl";)

# Read from the object, storing the page's contents in
's'.
s = f.read()
f.close()

#Write the CRL in DER format to a file   
outFile = open('./tempCerts/crlDER.crl', 'w')
outFile.write(s)
outFile.close()

#Convert the CRL using openssl to a PEM file
commands.getoutput('openssl crl -in
./tempCerts/crlDER.crl -out ./tempCerts/crlPEM.crl
-inform DER ')  

#Store the root and intermediary of the server cert in
a file
#called yourChain.cer, here it is WijisChain.cer
#Copy your CRL and your chair to tempCertChain.cer   
outFile = open('./tempCerts/tempCertChain.cer', 'w')
outFilePermCer = open('./tempCerts/WijisChain.cer',
'r')
outFileCRL = open('./tempCerts/crlPEM.crl', 'r')

outFile.write(outFilePermCer.read())
outFile.write(outFileCRL.read())
outFile.close()
outFilePermCer.close()
outFileCRL.close()  
 
#Now actually get the server cert, dont know if this
work on windows
#You must pass in your client cert and private key
#enter server port
bigString =  commands.getoutput('echo | openssl
s_client -connect SERVER:PORT  -key myserver.key 
-cert Yogesh02.cer')

#Get the server cert out by parsing the output of the
above openSSL command
blockBegin = '-BEGIN CERTIFICATE-'
blockEnd = '-END CERTIFICATE-'

beginOuter = bigString.find(blockBegin) 
if beginOuter < 0:
print 'Unable to continue: block begin string not
found'


beginInner = beginOuter + len(blockBegin)

endInner = bigString.find(blockEnd)
if endInner < 0:
print 'Unable to continue: block end string not
found'


endOuter = endInner + len(blockEnd)

blockWithDelims = bigString[beginOuter:endOuter]
blockWithoutDelims = bigString[beginInner:endInner]

#Write the server cert to a file
outFile = open('./tempCerts/server.cer', 'w')
outFile.write(blockWithDelims)
outFile.write('\n')

outFile.close() 

#Verify the server cert and check it against the CRL
as well
statusOutput = commands.getstatusoutput('openssl
verify  -CAfile ./tempCerts/tempCertChain.cer -purpose
sslserver -crl_check  ./tempCerts/server.cer')

#Look at the output and cry or rejoice, drink beer
here/repeat
print statusOutput

bruteForce.py
Description: 1437792454-bruteForce.py
-- 
http://mail.python.org/mailman/listinfo/python-list