Re: Question about start using ZServerSSL on win box...
After reading and searching for a while i found that all about running ZService as service start from C:\Program Files\Plone 2\Data\bin\zopeservice.py But still i cannot fully understand where the server is called so that i replace it with z2s.py or what ever needed... Any ideas? Thomas G. Apostolou [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, Dear Ng Pheng Siong, thank you for your great job with M2Crypto. I have got and build 0.15 version on a win xp box recently and was reading your ZServerSSL HOWTO document so that i can start using https, xmlprc-over-https etc. I have to tell that i have installed from Plone 2.0.5 binary for windows witch comes with Zope 2.7.0 and Python 2.3.3 (i have patched SimpleHTTPServer.py as corrected for 2.3.5). As reading your ZServerSSL HOWTO i suppose that the corresponding $ZOPE is my C:\Program Files\Plone 2\Zope\lib\python because only there i can find $ZOPE/ZServer. Correct me if i am wrong with this... What i also need to know is that since i have installed so that Zope server runs as a service what is the corresponding steps for me in the section where you say : 1.. Copy $ZSSL/z2s.py into $ZOPE. 2.. Depending on your operating system, modify $ZOPE/start or $ZOPE/start.bat to invoke $ZOPE/z2s.py, instead of $ZOPE/z2.py. The files $ZSSL/starts and $ZSSL/starts.bat serve as examples. I do not have any $ZOPE/start or $ZOPE/start.bat or $ZOPE/z2.py, i only have a file named PythonService.exe into C:\Program Files\Plone 2\Zope\bin Do i HAVE to reinstall Plone and set it not to run as service? Thank you in advance... Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Question about start using ZServerSSL on win box...
Hello all, Dear Ng Pheng Siong, thank you for your great job with M2Crypto. I have got and build 0.15 version on a win xp box recently and was reading your ZServerSSL HOWTO document so that i can start using https, xmlprc-over-https etc. I have to tell that i have installed from Plone 2.0.5 binary for windows witch comes with Zope 2.7.0 and Python 2.3.3 (i have patched SimpleHTTPServer.py as corrected for 2.3.5). As reading your ZServerSSL HOWTO i suppose that the corresponding $ZOPE is my C:\Program Files\Plone 2\Zope\lib\python because only there i can find $ZOPE/ZServer. Correct me if i am wrong with this... What i also need to know is that since i have installed so that Zope server runs as a service what is the corresponding steps for me in the section where you say : 1.. Copy $ZSSL/z2s.py into $ZOPE. 2.. Depending on your operating system, modify $ZOPE/start or $ZOPE/start.bat to invoke $ZOPE/z2s.py, instead of $ZOPE/z2.py. The files $ZSSL/starts and $ZSSL/starts.bat serve as examples. I do not have any $ZOPE/start or $ZOPE/start.bat or $ZOPE/z2.py, i only have a file named PythonService.exe into C:\Program Files\Plone 2\Zope\bin Do i HAVE to reinstall Plone and set it not to run as service? Thank you in advance... Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list
Problem patching SimpleXMLRPCServer.py
Hello all, I use Python 2.3.3 and try to patch SimpleXMLRPCServer.py with the patch i got from Python.org. so after changing to the directory where both SimpleXMLRPCServer.py and SimpleXMLRPCServer.patch reside i run : patch -i SimpleXMLRPCServer.patch -b --verbose --dry-run SimpleXMLRPCServer.py and i get : Hmm...patch: unexpected end of hunk at line 47 The SimpleXMLRPCServer.patch file at lines 24-48 reads like : --- 107,128 import types import os ! def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): resolve_dotted_attribute(a, 'b.c.d') = a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. + + If the optional allow_dotted_names argument is false, dots are not + supported and this function operates similar to getattr(obj, attr). ! if allow_dotted_names: ! attrs = attr.split('.') ! else: ! attrs = [attr] ! ! for i in attrs: if i.startswith('_'): raise AttributeError( 'attempt to access private attribute %s' % i *** *** 156,162 The SimpleXMLRPCServer.py at lines 107-128 reads like : import types import os def resolve_dotted_attribute(obj, attr): resolve_dotted_attribute(a, 'b.c.d') = a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private attribute %s' % i ) else: obj = getattr(obj,i) return obj def list_public_methods(obj): Returns a list of attribute strings, found in the specified object, which represent callable attributes i am trying to understand what is wrong, trying to change 107-128 to 107-125 but it doesn't seem to work... any solution or explanation would be helpfull Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem patching SimpleXMLRPCServer.py
Its ok now, it seems the problem was that i had saved the file in UTF-8 format ??? I got it again and saved it in Greek(ISO) format and it now goes fine Thomas G. Apostolou [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I use Python 2.3.3 and try to patch SimpleXMLRPCServer.py with the patch i got from Python.org. so after changing to the directory where both SimpleXMLRPCServer.py and SimpleXMLRPCServer.patch reside i run : patch -i SimpleXMLRPCServer.patch -b --verbose --dry-run SimpleXMLRPCServer.py and i get : Hmm...patch: unexpected end of hunk at line 47 The SimpleXMLRPCServer.patch file at lines 24-48 reads like : --- 107,128 import types import os ! def resolve_dotted_attribute(obj, attr, allow_dotted_names=True): resolve_dotted_attribute(a, 'b.c.d') = a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. + + If the optional allow_dotted_names argument is false, dots are not + supported and this function operates similar to getattr(obj, attr). ! if allow_dotted_names: ! attrs = attr.split('.') ! else: ! attrs = [attr] ! ! for i in attrs: if i.startswith('_'): raise AttributeError( 'attempt to access private attribute %s' % i *** *** 156,162 The SimpleXMLRPCServer.py at lines 107-128 reads like : import types import os def resolve_dotted_attribute(obj, attr): resolve_dotted_attribute(a, 'b.c.d') = a.b.c.d Resolves a dotted attribute name to an object. Raises an AttributeError if any attribute in the chain starts with a '_'. for i in attr.split('.'): if i.startswith('_'): raise AttributeError( 'attempt to access private attribute %s' % i ) else: obj = getattr(obj,i) return obj def list_public_methods(obj): Returns a list of attribute strings, found in the specified object, which represent callable attributes i am trying to understand what is wrong, trying to change 107-128 to 107-125 but it doesn't seem to work... any solution or explanation would be helpfull Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem cmpiling M2Crypto
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thomas G. Apostolou wrote: I still get the error: SWIG/_m2crypto.c(80) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directory error: command 'C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe' failed with exit status 2 witch is -as Heikki Toivonen told- because of lack of Python.h I do not hane this file anywhere in my PC. Could anyone sujest of a package to install that contains Python.h and that would be of use for me later on? most standard Python installers come with this file (it's usually in ./include relative to the installation directory). I suggest installing a python.org release: http://www.python.org/ and using that to build the extensions. (make sure you get the same version as your Plone uses) /F So what you say is that the Python installed with Plone doesn't have Python.h in ./include but Python installers from Python.org do have the file? If yes i guess i should install the same version to the same location (over-writing). Is that so? Thanks again! -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem cmpiling M2Crypto under Plone
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thomas G. Apostolou wrote: So what you say is that the Python installed with Plone doesn't have Python.h in ./include but Python installers from Python.org do have the file? that's likely, given building didn't work for you. after all, Plone's an application that happens to include a Python interpreter, not a Python distribution. If yes i guess i should install the same version to the same location (over-writing). Is that so? to minimize the risk, I'd grab the corresponding python.org version, install it in a separate location, use the python.org version to build the extensions, and finally install them in the Plone tree. but maybe there's no risk for conflict; maybe someone from the Plone team can clarify ? The above sudgestion is right. Unfortunatelly i found out the problem the bad way... After installing the full package of python 2.3.3 on top of the plone's(2.0.5) python installation, the build and install of m2crypto went ok but the zope server service was refusing to start... I thought ok the installation kept a BACKUP directory so i can allways roll back... I did unistall it and there was realy a rollback option there witch i choosed. But still the service was refusing to start giving me an error witch i could read at windows EventViewer/Application that was saying : Python could not import the service's module File C:\Program Files\Plone 2\Data\bin\zopeservice.py, line 100, in ? from nt_svcutils.service import Service File C:\Program Files\Plone 2\Zope\lib\python\nt_svcutils\service.py, line 18, in ? import win32serviceutil exceptions.ImportError: No module named win32serviceutil Python could not import the service's module File C:\Program Files\Plone 2\Data\bin\zopeservice.py, line 100, in ? from nt_svcutils.service import Service File C:\Program Files\Plone 2\Zope\lib\python\nt_svcutils\service.py, line 18, in ? import win32serviceutil exceptions.ImportError: No module named win32serviceutil Good for me i had backups of everything (External Methods, Script(Python), and DTML-PT). So i unistalled Plone 2.0.5, reistalled it and restored my site. Of course i was not stupid enough and the problem was encountered in my development pc instead of the real site pc Now everithing is ok as i run python setup.py install and it ran ok... Time for me to learn about how to apply patches (there is one for python 2.3.3 for Connection.py and on for m2crypto named xmlrpclib.py.patch inside patches directory of mycrypto) After that i'll start with trying to use the whole thing compiling all this time... Thanks to the people imlementing m2crypto and all of you helping me with the compilation. PS: After all that strugling for building on windows i am sure that i am going to use the whole thing on linux box next time i set it up for someone else Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem cmpiling M2Crypto
Dear friend Heikki Toivonen, thank you for replying to my quest... C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' Hmm, I don't remember seeing that. But then again, I haven't compiled with the same setup as you either. I am in a quest to find where this comes from. But it is difficult to me as i am a newbie to python and totaly new to SWIG... anyway Then i open SWIG\_lib.i file and change all %name with %rename You don't need to change those, the name vs rename is just a warning. appart from this i can not find Python.h anywhere ni my pc (WinXp) I think that's your real problem. You need the python header(s) etc. to build M2Crypto. Seems like your Python distribution does not contain them. -- Heikki Toivonen After changing all %name to %rename the message about Python.h stoped appearing. I also took the steps described in the INSTALL file of m2crypto pack: Preparation ~ Read Sebastien Sauvage's webpage: http://sebsauvage.net/python/mingw.html; but this is about using mingw32, isn't it? What i get now is: 1) using python setup.py build C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' warnings.warn(msg) running build running build_py creating build creating build\lib.win32-2.3 creating build\lib.win32-2.3\M2Crypto copying M2Crypto\ASN1.py - build\lib.win32-2.3\M2Crypto copying M2Crypto\AuthCookie.py - build\lib.win32-2.3\M2Crypto . . . copying M2Crypto\_version.py - build\lib.win32-2.3\M2Crypto copying M2Crypto\__init__.py - build\lib.win32-2.3\M2Crypto creating build\lib.win32-2.3\M2Crypto\SSL copying M2Crypto\SSL\cb.py - build\lib.win32-2.3\M2Crypto\SSL . . . copying M2Crypto\SSL\__init__.py - build\lib.win32-2.3\M2Crypto\SSL creating build\lib.win32-2.3\M2Crypto\PGP copying M2Crypto\PGP\constants.py - build\lib.win32-2.3\M2Crypto\PGP . . . copying M2Crypto\PGP\__init__.py - build\lib.win32-2.3\M2Crypto\PGP running build_ext building '__m2crypto' extension C:\SWIG\swig.exe -python -ISWIG -Ic:\openssl\include -o SWIG/_m2crypto.c SWIG/_m2crypto.i SWIG\_lib.i(527): Error: Syntax error in input(1). error: command 'swig.exe' failed with exit status 1 2) using python setup.py build -cmingw32 C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' warnings.warn(msg) running build running build_py creating build creating build\lib.win32-2.3 creating build\lib.win32-2.3\M2Crypto copying M2Crypto\ASN1.py - build\lib.win32-2.3\M2Crypto copying M2Crypto\AuthCookie.py - build\lib.win32-2.3\M2Crypto . . . copying M2Crypto\PGP\RSA.py - build\lib.win32-2.3\M2Crypto\PGP copying M2Crypto\PGP\__init__.py - build\lib.win32-2.3\M2Crypto\PGP running build_ext warning: Python's pyconfig.h doesn't seem to support your compiler. Reason: couldn't read 'C:\Program Files\Plone 2\Pyth on\include\pyconfig.h': No such file or directory. Compiling may fail because of undefined preprocessor macros. building '__m2crypto' extension C:\SWIG\swig.exe -python -ISWIG -Ic:\openssl\include -o SWIG/_m2crypto.c SWIG/_m2crypto.i SWIG\_lib.i(527): Error: Syntax error in input(1). error: command 'swig.exe' failed with exit status 1 any help would be nice. i would like to buy the 0.13 but the matter is for me to LEARN how to build those packages, read and write Python, use Plone etc. thanks to all of you people that have given so much of your time for a FREE world... Thomas G. Apostolou -- http://mail.python.org/mailman/listinfo/python-list
Re: Problem cmpiling M2Crypto
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thomas G. Apostolou wrote: C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' Hmm, I don't remember seeing that. But then again, I haven't compiled with the same setup as you either. I am in a quest to find where this comes from. google can provide a hint, at least: http://www.mail-archive.com/distutils-sig@python.org/msg00084.html That was realy some help! Thank you. I changed %rename back to %name as Heikki Toivonen sujested and changed the setup.py to read as: m2crypto = Extension(name = '__m2crypto', sources = ['SWIG/_m2crypto.i'], include_dirs = include_dirs, library_dirs = library_dirs, libraries = libraries, extra_compile_args = ['-DTHREADING', '-DSWIG_COBJECT_PYTHON'], #swig_opts = [swig_opts_str] # only works for 2.4 ) What i get now is the warnings about %name is deprecated - witch i think is better than the errors about Syntax error in input(1). The message about C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' is gone. I still get the error: SWIG/_m2crypto.c(80) : fatal error C1083: Cannot open include file: 'Python.h': No such file or directory error: command 'C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe' failed with exit status 2 witch is -as Heikki Toivonen told- because of lack of Python.h I do not hane this file anywhere in my PC. Could anyone sujest of a package to install that contains Python.h and that would be of use for me later on? Thanks in advance Thomas G. Apostolou /F -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Problem cmpiling M2Crypto
Hello all. i am trying to make some win32 binaries of M2Crypto 0.15 What I use is: Python 2.3.3 openssl-0.9.7i swigwin 1.3.27 I have build the openssl binaries and have installed the Swig binary python dir is C:\Program Files\Plone 2\Python openssl dir is c:\openssl Swig dir is c:\swig so I have modified the setup.py of m2crypto to : if os.name == 'nt': openssl_dir = 'c:\\openssl' include_dirs = [my_inc, openssl_dir + '/include'] swig_opts_str = '-I' + openssl_dir + os.sep + 'include' library_dirs = [openssl_dir + '\\lib'] libraries = ['ssleay32', 'libeay32'] when i execute python setup.py build from the command prompt i get the following erros: C:\Program Files\Plone 2\Python\lib\distutils\extension.py:128: UserWarning: Unknown Extension options: 'swig_opts' warnings.warn(msg) running build running build_py running build_ext building '__m2crypto' extension C:\SWIG\swig.exe -python -ISWIG -Ic:\openssl\include -o SWIG/_m2crypto.c SWIG/_m2crypto.i SWIG\_lib.i(527): Warning(121): %name is deprecated. Use %rename instead. SWIG\_lib.i(528): Warning(121): %name is deprecated. Use %rename instead. SWIG\_lib.i(529): Warning(121): %name is deprecated. Use %rename instead. SWIG\_lib.i(530): Warning(121): %name is deprecated. Use %rename instead. SWIG\_lib.i(531): Warning(121): %name is deprecated. Use %rename instead. SWIG\_lib.i(532): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(17): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(18): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(19): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(20): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(21): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(22): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(24): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(25): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(26): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(27): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(28): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(29): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(30): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(31): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(33): Warning(121): %name is deprecated. Use %rename instead. SWIG\_bio.i(34): Warning(121): %name is deprecated. Use %rename instead. SWIG\_rand.i(7): Warning(121): %name is deprecated. Use %rename instead. SWIG\_rand.i(8): Warning(121): %name is deprecated. Use %rename instead. SWIG\_rand.i(9): Warning(121): %name is deprecated. Use %rename instead. SWIG\_rand.i(10): Warning(121): %name is deprecated. Use %rename instead. SWIG\_rand.i(11): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(26): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(27): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(28): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(29): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(31): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(32): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(33): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(34): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(35): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(36): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(37): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(38): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(39): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(40): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(41): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(42): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(43): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(44): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(45): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(46): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(53): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(54): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(55): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(56): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(63): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(64): Warning(121): %name is deprecated. Use %rename instead. SWIG\_evp.i(65): Warning(121): %name is deprecated. Use %rename instead.