py2exe and pysnmp problems Programming Software Development by LoveMyPadres … they seem to be incompatible, at least on the oneliner form I'm using. Pysnmp claims to be py2exe …Here's the code: [CODE] from pysnmp.entity.rfc3413.oneliner import cmdgen from pysnmp.entity import config from Tkinter import…;, line 6, in doCmd File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 116, in __init__ File "… pysnmp Programming Software Development by novice20 hi all.. am working with python 2.4.1 n have pysnmp 4.1.14a installed.. the statement from pysnmp.entity.rfc3413.oneliner import cmdgen gives me the following error: ImportError: No module named pysnmp.entity.rfc3413.oneliner can anyone pls give me the reason? eagerly awaiting any response. Thanx in advance Pysnmp for windows IDE Programming Software Development by novice20 … i am getting the import error. from pysnmp.entity.rfc3413.oneliner import cmdgen ImportError: No module named pysnmp.entity.rfc3413… y2exe and pysnmp Programming Software Development by LoveMyPadres … the same behavior) and py2exe. When I execute a pysnmp oneliner, like this: [CODE] errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().nextCmd…] I get this output: [CODE] File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 116, in __init__ File "pysnmp… Re: y2exe and pysnmp Programming Software Development by LoveMyPadres … :-) Here is the full code: [CODE] from pysnmp.entity.rfc3413.oneliner import cmdgen from pysnmp.entity import config from Tkinter import…", line 6, in doCmd File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 116, in __init__ File "pysnmp… Re: pysnmp Programming Software Development by TrustyTony …; for more information. >>> from pysnmp.entity.rfc3413.oneliner import cmdgen >>>[/CODE] Count domains with AWK Hardware and Software Linux and Unix by S1GNZ … results of that domain. The AWK needs to be a oneliner. [B]I really hope someone can help me with this… varBinds help Programming Software Development by novice20 … get on a USB key status from pysnmp.entity.rfc3413.oneliner import cmdgen #--query on ccmSDIDUKeyStatus errorIndication, errorStatus, errorIndex, varBinds = cmdgen… Re: Boolean logic Programming Software Development by TrustyTony …,1012,2000]: for message,func in (('Long',LeapYear),('Mine',ly),('Oneliner',ly2)): print i, message, func(i) print 'All same',…20 [/CODE] if you take out and True from your OneLiner, then it stays valid but the value is not Truth…is so: [CODE]1012 Long True 1012 Mine True 1012 Oneliner 12 All same [B]False[/B][/CODE] This is because… Re: (104, 'Connection reset by peer')- help Programming Software Development by novice20 …., whether it is a 4501 card) from pysnmp.entity.rfc3413.oneliner import cmdgen errorIndication,errorStatus,errorIndex,varBinds = cmdgen.CommandGenerator().getCmd( cmdgen…' and USBKey=='1' and USBOnline=='1'): from pysnmp.entity.rfc3413.oneliner import cmdgen from pysnmp.proto import rfc1902 errorIndication, errorStatus, errorIndex… Re: Pretty noob question regarding input Programming Software Development by roryne … I need to do is far more than just a oneliner to act as sed for me. Re: split path Programming Software Development by vegaseat As a oneliner ... [code=python]import os s = "C:\path1\path2\path3\path4" print os.sep.join(s.split(os.sep)[:2]) # C:\path1 [/code] Re: perl sees files as Barewords Programming Software Development by yair7190 … perl script i need to open files. Problem is, that oneliner (perl -e...) is faster and prints the file, as is… Re: Can an Xpath expression return a list of apired values? Programming Software Development by fpmurphy There is no such thing as an XSLT oneliner :-) This should work for you however [CODE] <?xml version=&… Re: Date string to date object, seconds to readable string Programming Software Development by TrustyTony … datetime from plural import plural ## plural snippet for practice (even oneliner) ## try..except removed by request def todate_m(datestring): ## month first… Re: how to display a merged list? Programming Software Development by TrustyTony … in (seq1, seq2) for value in sequence): print item print 'oneliner' print('\n'.join(str(value) for sequence in (seq1, seq2… Re: Python Caesar Cipher/ROT13 problem Programming Software Development by richieking … data for z in w: # This step could be done oneliner But i thought you may want to fx.append(z… Re: Sorting a large dictionary Programming Software Development by djidjadji … wanted to show the code can be written as a oneliner. A list comprehension is faster then a generator if you… Re: how to check for existence of particular word in file Programming Software Development by smrati.katiyar … | grep word | echo "$?" if the result of above oneliner is 0 it means the word is there in the… Re: how to check for existence of particular word in file Programming Software Development by thekashyap … | grep word | echo "$?" if the result of above oneliner is 0 it means the word is there in the… Re: A base class to define functors. Programming Software Development by TrustyTony Neat hack, at least if you do not consider that you can get same result as example use with oneliner: [CODE]import os from itertools import islice print('\n'.join(value[0] for value in islice(os.walk(os.path.expanduser("~")), 0, 100)))[/CODE] Thanks for the os.path.expanduser('~'). It actually works also in Windows. Re: A base class to define functors. Programming Software Development by Gribouillis … that you can get same result as example use with oneliner: [CODE]import os from itertools import islice print('\n'.join… Re: IP number conversion between dotnumber string and integer Programming Software Development by mrkbbk …, when I was discovering beauty of Python, I saw this oneliner (although it was made to convert ethernet MAC address to… Re: selecting the elements from one list and input them in another list Programming Software Development by slate Wow. That's kind of overkill for this simple task. A oneliner: >>> [s for s in sequence1 if s.lower() not in set(s2.lower() for s2 in sequence2)] You set n = len(sequence2) then you make a loop with n in range(len(sequence2)), which will never be true. Re: lab assignment HELP!! Programming Software Development by HiHe Using a oneliner seems to be very pythonic, but may be hard to … Re: Replace string with a '/' in the middle Programming Software Development by 2teez … function in perl. This can easily be achieved on a oneliner code too. Re: Help Programming Software Development by ddanbe @ Ketsuekiame: You win! I understand for the most part how your super "oneliner" works, but could you please explain what the lambda expression`( x => new string('1', x))` is doing? And why is the new keyword needed? Re: py2exe and pysnmp problems Programming Software Development by snippsat Dident get you pysnmp script to work. Here is a working py2exe kode. [CODE]from distutils.core import setup import py2exe import sys def py_exe(file_in=None): if len(sys.argv) == 1: sys.argv.append('py2exe') setup(options = {'py2exe': {'compressed': 1, 'optimize': 2, 'ascii': 1, 'bundle_files': 3}}, zipfile = None,… Re: py2exe and pysnmp problems Programming Software Development by LoveMyPadres When I run it, I have to type setup py2exe Perhaps that would execute it. I'll try yours, it looks much more complete. I'll also check into gui2exe. Re: py2exe and pysnmp problems Programming Software Development by snippsat [QUOTE]When I run it, I have to type setup py2exe[/QUOTE] You run it as every other python code. From your editor or command line [ICODE]python name_of_script.py[/ICODE]