[Zope] IDE for ZOPE

Chris McDonough chrism@zope.com
17 May 2002 08:56:36 -0400


--=-JaiS24mEmSEVDh1ix2a1
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi Raj,

Use the attached module under xmlrpclib as a "transport" for XML-RPC
basic auth.

HTH,

- C


On Fri, 2002-05-17 at 05:37, Raj NS wrote:
> 
> Hi 
> 
> Thanx for your response david ... .though i was
> excpecting better responce from other zopists in this
> mail list , but i suppose they are happy with there
> dreamweaver/emacs/ or plain zope ... anyway i keep up
> with my work ...
> 
> well u mentioned it would b easy to make wyswyg in
> windows platform easier; i seriously dont belive
> itthough there are many resons. I still adhere to
> making it platform independent ... well if u wanna
> play with some codes www.manning.com/grayson -- it has
> the source codes of the "Python and Tkinter " book .
> see the GUI building on cross platforms ... itz really
> astonishing ..
> 
> As of now , i have Tkinter in my pocket , which comes
> with every python installation ... so no problem
> making a GUI . I want to concetrate more on interation
> of Zope and ur IDE ...
> 
> My main hurdle is lack on Documentation on zope ( DC
> are u listening? ) .. most of the stuffs has to b read
> and understood from the source itself .... yesterday -
> whole day i was wondering which is a way to taking the
> object values to make a tree widget ..
> 
> 1.via zope itself calling manage_menu which inturn
> calls Treetag.py ( inside
> <zope>\lib\python\TreeDisplay ) .. thats how zope
> draws ur tree in manage panel... reasons why i discard
> it is that it gives me the HTML tags ( most of which
> are only understood by zope itself like icons ) i dont
> want HTML i want something like a list/tuple of object
> , its url , itz icon .
> 
> 2. so i jumped to XMLRPCserver ...well though itz a
> think client .. im still stuck how to get
> authenticated in XMLRPC ( im sure there is a way to
> get it .. but dunno how ) ... authentication is
> requred to access http://zope:8080/manage_menu
> 
> 3.FTP / WebDav : On Guesses for this , though
> 
> i hope to get a ans soon on this .. in the mean time
> .. i need some smart answers ;) 
> 
> -Raj 
> 
> 
> 
> 
> 
> 
>  --- David Burton <eloquence@eloquent-designs.f2s.com>
> wrote: > Depending on your wishes or requirements to
> make
> > this platform agnostic, it may potentially prove
> > easiest to write something WYSIWYG as a Windows-only
> > 
> > system in VB or Delphi, using M$'s DHTMLEdit control
> > to handle generation of XHTML for pages. That would
> > make the WYSIWYG very much like 
> > FrontPage...
> > 
> > It sounds like this would be substantially different
> > from your current plan, but it would take care of
> > most of the WYSIWYG elements, but you could use the 
> > Windows Scripting Host to embed Python code within
> > the program, to leverage your Python knowledge.
> > 
> > That's the way I'd consider doing things if WYSIWYG
> > is important over platform-agnosticism. If you are
> > interested in exploring doing an IDE in this manner,
> > let 
> > me know as I'd be interested in helping develop such
> > a system (so long as the licence is suitably
> > LGPL-like to allow commercial distribution).
> > 
> > Yours,
> > David Burton
> > 
> > 15/05/2002 13:59:13, Raj NS <rnshas@yahoo.co.in>
> > wrote:
> > 
> > >Hello
> > >
> > >I'm trying to write a COMPLETE INTEGRATED
> > DEVELOPMENT
> > >ENVIRONMENT for zope . I'll soon be out with a
> ---------------------------------------------------
> Raj Shastrakar < shastrakar@hbcse.tifr.res.in >
> 
> 
> ________________________________________________________________________
> Everything you always wanted to know about cars and bikes,now
>  at: http://in.autos.yahoo.com/cricket/tracker.html
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


--=-JaiS24mEmSEVDh1ix2a1
Content-Disposition: attachment; filename=BasicAuthTransport.py
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-python; name=BasicAuthTransport.py; charset=ISO-8859-15

###########################################################################=
###
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved=
.
#=20
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#=20
###########################################################################=
###
"""
$Id: BasicAuthTransport.py,v 1.1.1.1 2002/05/16 19:44:55 chrism Exp $

XML-RPC Basic Authentication Transport.

"""
__version__ =3D "$Revision: 1.1.1.1 $"[11:-2]

import xmlrpclib, base64

class BasicAuthTransport(xmlrpclib.Transport):
    def __init__(self, username=3DNone, password=3DNone):
        self.username=3Dusername
        self.password=3Dpassword
        self.verbose =3D 0

    def request(self, host, handler, request_body, verbose=3D0):
        # issue XML-RPC request

        h =3D self.make_connection(host)
        if verbose:
            h.set_debuglevel(1)

        self.send_request(h, handler, request_body)
        self.send_host(h, host)
        self.send_user_agent(h)
        self.send_auth(h, self.username, self.password)
        self.send_content(h, request_body)

        errcode, errmsg, headers =3D h.getreply()

        if errcode !=3D 200:
            raise ProtocolError(
                host + handler,
                errcode, errmsg,
                headers
                )

        self.verbose =3D verbose

        return self.parse_response(h.getfile())

    def send_auth(self, connection, username, password):
        if username is not None and password is not None:
            auth_string =3D base64.encodestring('%s:%s' % (username, passwo=
rd))
            auth_string =3D auth_string.replace('\012', '')
            connection.putheader("Authorization", "Basic %s" % auth_string)



--=-JaiS24mEmSEVDh1ix2a1--