Archived community.zenoss.org | full text search
Skip navigation
103003 Views 10 Replies Latest reply: Oct 16, 2009 6:45 PM by Matt Ray RSS
srossato Newbie 4 posts since
Jul 16, 2008
Currently Being Moderated

Feb 18, 2009 5:28 AM

development environment for zenoss

which is a good development environment for zenoss, do you use?
thanks
  • edahl Rank: Green Belt 402 posts since
    Feb 14, 2007
    Currently Being Moderated
    1. Feb 19, 2009 9:18 PM (in response to srossato)
    development environment for zenoss
    Most of us use macs but any linux box works.

    -EAD

    On Feb 18, 2009, at 5:28 AM, srossato wrote:

     

     

    which is a good development environment for zenoss, do you use?
    thanks







    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev


    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev
  • jwrober Rank: White Belt 41 posts since
    Dec 26, 2008
    Currently Being Moderated
    2. Mar 24, 2009 11:11 PM (in response to edahl)
    RE: development environment for zenoss
    For what it is worth, I have an ubuntu linux workstation with the eclipse ide and the pydev addon. It works great for me.
  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    3. Mar 25, 2009 10:25 AM (in response to jwrober)
    Re: development environment for zenoss
    Yeah, most of the devs are using Eclipse with PyDev.

    Thanks,
    Matt Ray
    Zenoss Community Manager
    community.zenoss.com
    mray@zenoss.com




    On Mar 24, 2009, at 10:11 PM, jwrober wrote:

     

     

    For what it is worth, I have an ubuntu linux workstation with the
    eclipse ide and the pydev addon. It works great for me.







    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev


    _______________________________________________
    zenoss-dev mailing list
    zenoss-dev@zenoss.org
    http://lists.zenoss.org/mailman/listinfo/zenoss-dev
  • back2backkiller Rank: White Belt 8 posts since
    Sep 24, 2009
    Currently Being Moderated
    4. Oct 5, 2009 9:56 AM (in response to Matt Ray)
    Re: development environment for zenoss

    Dear All

     

    Kindly communicate me the exact versions of

     

    1) python

    2) Zenoss

    3) Eclipse IDE etc

     

    When i compile simple python code then it executes. When i import the modules of Zenoss library then i get errors that you are using wrong API version etc.

     

    i tried to compile the following code :

     

    import locale
    from Globals import DTMLFile
    from Globals import InitializeClass
    from Products.ZenUtils.Utils import convToUnits
    from Products.ZenRelations.RelSchema import *
    from Products.ZenModel.ZenossSecurity import ZEN_VIEW, ZEN_CHANGE_SETTINGS
    from Products.ZenModel.DeviceComponent import DeviceComponent
    from Products.ZenModel.ManagedEntity import ManagedEntity
    from Products.ZenUtils.Utils import prepId
    from ZenModelRM import ZenModelRM
    currentVal = cacheRRDValue('toner_toner', default)

     

     

     

    and got following issues :

     

    /home/zenoss/zenoss/lib/python/ExtensionClass/__init__.py:105: RuntimeWarning: Python C API version mismatch for module _ExtensionClass: This Python has API version 1013, module _ExtensionClass has version 1012.
      from _ExtensionClass import *
    /home/zenoss/zenoss/lib/python/Acquisition/__init__.py:1: RuntimeWarning: Python C API version mismatch for module _Acquisition: This Python has API version 1013, module _Acquisition has version 1012.
      from _Acquisition import *
    /home/zenoss/zenoss/lib/python/ComputedAttribute/__init__.py:1: RuntimeWarning: Python C API version mismatch for module _ComputedAttribute: This Python has API version 1013, module _ComputedAttribute has version 1012.
      from _ComputedAttribute import *
    /home/zenoss/zenoss/lib/python/persistent/__init__.py:19: RuntimeWarning: Python C API version mismatch for module cPersistence: This Python has API version 1013, module cPersistence has version 1012.
      from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
    /home/zenoss/zenoss/lib/python/persistent/__init__.py:19: RuntimeWarning: Python C API version mismatch for module TimeStamp: This Python has API version 1013, module TimeStamp has version 1012.
      from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
    /home/zenoss/zenoss/lib/python/persistent/__init__.py:20: RuntimeWarning: Python C API version mismatch for module cPickleCache: This Python has API version 1013, module cPickleCache has version 1012.
      from cPickleCache import PickleCache
    /home/zenoss/zenoss/lib/python/zope/interface/interface.py:156: RuntimeWarning: Python C API version mismatch for module _zope_interface_coptimizations: This Python has API version 1013, module _zope_interface_coptimizations has version 1012.
      from _zope_interface_coptimizations import SpecificationBase
    /home/zenoss/zenoss/lib/python/AccessControl/ImplC.py:18: RuntimeWarning: Python C API version mismatch for module cAccessControl: This Python has API version 1013, module cAccessControl has version 1012.
      from cAccessControl import rolesForPermissionOn, \
    /home/zenoss/zenoss/lib/python/Record/__init__.py:59: RuntimeWarning: Python C API version mismatch for module _Record: This Python has API version 1013, module _Record has version 1012.
      from _Record import Record
    Traceback (most recent call last):
      File "/home/arahman/workspace/ASW/src/co.py", line 5, in <module>
        from Globals import DTMLFile
      File "/home/zenoss/zenoss/lib/python/Globals.py", line 23, in <module>
       
    import Acquisition, ComputedAttribute, App.PersistentExtra, os
     
    File "/home/zenoss/zenoss/lib/python/App/PersistentExtra.py", line 16, in <module>
        from class_init import default__class_init__
      File "/home/zenoss/zenoss/lib/python/App/class_init.py", line 15, in <module>
        from AccessControl.PermissionRole import PermissionRole
      File "/home/zenoss/zenoss/lib/python/AccessControl/__init__.py", line 17, in <module>
        from Implementation import setImplementation
      File "/home/zenoss/zenoss/lib/python/AccessControl/Implementation.py", line 98, in <module>
        setImplementation("C")
      File "/home/zenoss/zenoss/lib/python/AccessControl/Implementation.py", line 51, in setImplementation
        from AccessControl import ImplC as impl
      File "/home/zenoss/zenoss/lib/python/AccessControl/ImplC.py", line 18, in <module>
        from cAccessControl import rolesForPermissionOn, \
      File "/home/zenoss/zenoss/lib/python/AccessControl/SimpleObjectPolicies.py", line 82, in <module>
        from DocumentTemplate.DT_Util import TemplateDict
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/__init__.py", line 21, in <module>
        from DocumentTemplate import String, File, HTML, HTMLDefault, HTMLFile
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DocumentTemplate.py", line 112, in <module>
        from DT_String import String, File
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DT_String.py", line 19, in <module>
        from DT_Util import ParseError, InstanceDict, TemplateDict, render_blocks, str
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/DT_Util.py", line 19, in <module>
        from html_quote import html_quote, ustr # for import by other modules, dont remove!
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/html_quote.py", line 4, in <module>
        from ustr import ustr
      File "/home/zenoss/zenoss/lib/python/DocumentTemplate/ustr.py", line 18, in <module>
        nasty_exception_str = Exception.__str__.im_func
    AttributeError: 'wrapper_descriptor' object has no attribute 'im_func'


    Whats the problem i am facing? Kindly reply soon

     

    Regards

  • back2backkiller Rank: White Belt 8 posts since
    Sep 24, 2009
    Currently Being Moderated
    5. Oct 7, 2009 4:46 AM (in response to Matt Ray)
    Re: development environment for zenoss

    Hi Matt,

     

    Kindly communicate the exact versions of

     

    Pydev

    Python

    Eclipse

     

    I have done it many times but did not succeed. I added the correct library paths but still issues. Kindly give the most authentic way to debug zenoss code in Eclipse

     

    Regards

     

    Back2Back KIller

  • Ian McCracken ZenossEmployee 257 posts since
    Feb 26, 2007
    Currently Being Moderated
    6. Oct 7, 2009 10:52 AM (in response to srossato)
    Re: development environment for zenoss

    I don't know about Eclipse; I just use vim.

     

    Debugging involves nothing more than dropping breakpoints in the code:

     

    import pdb; pdb.set_trace()

     

    Then running Zope, or zenhub, or whatever relevant process in the foreground:

     

    $ zopectl fg

    $ zenhub run -v10

    $ zencommand run -v10

    ...

     

    Then stepping through it the usual pdb way.

     

    You'll get much more information out of Zope if you turn on debug mode, by adding to $ZENHOME/etc/zope.conf:

     

    debug-mode on

     

    I've never used an IDE that didn't just end up getting in the way more often than it helped.

     

    --Ian

  • back2backkiller Rank: White Belt 8 posts since
    Sep 24, 2009
    Currently Being Moderated
    7. Oct 7, 2009 3:48 PM (in response to Ian McCracken)
    Re: development environment for zenoss

    Hi Lan McCracken

     

    Thanks for the useful information. But i am trying to develop custom Zenpacks so doing this IDE will be pity easy. I am having Eclipse/Pydev integration issues. Again thanks so much.

     

    Hi ALL

    Kindly communicate me the exact versions of Pydev and Eclipse and an authentic way to integrate them. I am having this issue for a long time

     

    Regards

     

    Back 2 Back Killer

  • back2backkiller Rank: White Belt 8 posts since
    Sep 24, 2009
    Currently Being Moderated
    8. Oct 7, 2009 4:57 PM (in response to back2backkiller)
    Re: development environment for zenoss

    Hi All

     

    I again set up the Eclipse/Pydev. When i try to import a module then it is appearing in the dropdown list. But when i try to compile code, it says NO MODULE FOUND. I am attaching the snapshot file.

     

    Regards

     

    Back 2 Back Killer

    Attachments:
  • dcarmean Rank: Green Belt 86 posts since
    Aug 20, 2007
    Currently Being Moderated
    9. Oct 10, 2009 11:07 PM (in response to back2backkiller)
    Re: development environment for zenoss

    As with Ian's experience, although I haven't used an IDE since Turbo C, I find that a few xterms, a couple of instances of gvim, and zendmd do me fine.  Here's what I'm doing lately:

     

    1. I make heavy use of test-driven development, simultaneously editing my Unit Tests in one gvim session, and my code in another gvim session right next to it.
    2. As much as possible, I first develop the code that does not depend on any other zope or zenoss components first, and I bury any such module imports so they don't get pulled in until I need them.
    3. When it's time to talk to zope, I either:
      1. Make appropriate CIFS/NFS mounts so that I can edit the code on my workstation, and run it on a test Zenoss box, or
      2. write some ad-hoc shell scripts to scp the code over to the zenoss box for testing, or sometimes I even
      3. Do an svn commit on my workstation and an svn update on the target zenoss box, but that's ugly.
      4. If I used Linux as my main UI, I'd be developing directly on a zenoss test system, but I use cygwin/X under Windows.
    4. I make frequent use of zendmd to test ideas.
    5. In my unit test script, I pull in much of the framework that zendmd uses, so I can do pretty much anything there; I import pdb into my test scripts so that I can run them interactively for debugging.
    6. I make good use of the logging package, even going as far as adding my own logging levels below level 10 (DEBUG) that I call things like TRACE and SUPERTRACE
    7. Don't forget that, especially if you're developing for Enterprise with it's remote collectors, you may need to commit() between certain types of transactions, and not just at the end of your run.

     

    Make things easy on yourself and figre out how to get it working without an IDE first; then you'll at least know where the problem is if you insist on using and IDE.

     

    Oh, and if you're using ZenScriptBase, and also parsing your own command-line arguments, be sure to clear sys.argv[1:] before you grab a DMD, or because ZenScriptBase will parse them again (unless you want to pass them through intentionally).

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    10. Oct 16, 2009 6:45 PM (in response to srossato)
    Re: development environment for zenoss

    I've gotten Zenoss Developer Chip Holden's writeup for PyDev Install and Configure  Hope this helps!

     

    Thanks,

    Matt Ray

    Zenoss Community Manager

More Like This

  • Retrieving data ...