Ethereal-dev: [Ethereal-dev] omniidl problem in trying compile IDL using backends for ethereal

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Patnaik, Anjela" <APatnaik@xxxxxxxxx>
Date: Wed, 14 Aug 2002 16:16:46 -0400
Hello,
I added PYTHONPATH to my path. I am using Windows 2k
and running Cygnus. I get syntax errors.

I am also using Python22 distribution. Is this the right
version..

 omniidl -p ./ -b ethereal_be GlobalDefs.idl
'import site' failed; use -v for traceback
Traceback (innermost last):
  File "<string>", line 1, in ?
  File "c:\Python22\Lib\os.py", line 38
    return [n for n in dir(module) if n[0] != '
                ^
SyntaxError: invalid syntax

My directory under Python22 has this:

My directoryC:\Python22\Lib>dir
 Volume in drive C has no label.
 Volume Serial Number is 18E5-924C

 Directory of C:\Python22\Lib

08/09/2002  02:30p      <DIR>          .
08/09/2002  02:30p      <DIR>          ..
01/20/2001  02:54p              34,333 aifc.py
05/11/2001  02:27p               2,783 anydbm.py
04/08/2001  03:23a              10,897 asynchat.py
03/16/2002  12:30p              17,503 asyncore.py
01/20/2001  10:40p               1,430 atexit.py
08/13/2001  11:04a               7,734 audiodev.py
09/04/2001  03:14p               2,065 base64.py
03/13/2002  06:42p              17,019 BaseHTTPServer.py
01/20/2001  02:54p               5,721 Bastion.py
03/13/2002  06:42p              18,886 bdb.py
09/04/2001  03:14p              15,608 binhex.py
09/04/2001  03:14p               2,256 bisect.py
03/25/2002  02:25p               8,506 calendar.py
10/13/2001  02:38p              34,894 cgi.py
02/22/2002  08:22a              11,024 CGIHTTPServer.py
12/19/2001  09:27a               8,547 cgitb.py
05/11/2001  03:14p               5,515 chunk.py
03/25/2002  02:25p               9,715 cmd.py
09/18/2001  09:33a              10,459 code.py
03/13/2002  06:42p              20,167 codecs.py
08/17/2001  06:11p               6,091 codeop.py
01/20/2001  02:54p               3,308 colorsys.py
01/20/2001  02:54p               2,363 commands.py
04/17/2001  09:20p               5,111 compileall.py
08/09/2002  12:51p      <DIR>          compiler
03/16/2002  12:30p              17,703 ConfigParser.py
08/02/2001  03:15a              25,824 Cookie.py
03/13/2002  06:42p               9,794 copy.py
12/28/2001  10:48a               2,039 copy_reg.py
08/09/2002  02:30p               2,987 copy_reg.pyc
06/05/2001  01:33a                 422 dbhash.py
10/04/2001  01:36a              41,009 difflib.py
03/16/2001  03:29a               1,160 dircache.py
08/29/2001  02:02p               9,400 dis.py
08/09/2002  02:30p              11,449 dis.pyc
08/09/2002  12:51p      <DIR>          distutils
10/22/2001  10:21p              39,681 doctest.py
10/10/2001  12:16a              10,441 dospath.py
12/21/2001  12:29a               4,666 dumbdbm.py
08/09/2002  12:51p      <DIR>          email
08/09/2002  12:51p      <DIR>          encodings
05/09/2001  05:13p                 418 FCNTL.py
01/20/2001  06:34p              10,634 filecmp.py
10/24/2001  04:33p              10,206 fileinput.py
06/06/2001  02:24a               3,128 fnmatch.py
08/13/2001  10:55a              14,473 formatter.py
01/20/2001  06:34p               4,709 fpformat.py
03/13/2002  06:42p              27,843 ftplib.py
12/12/2001  01:20a               5,374 getopt.py
08/30/2001  11:07a               3,051 getpass.py
01/11/2002  01:37a              10,052 gettext.py
06/06/2001  02:24a               1,495 glob.py
02/16/2002  06:08p               5,775 gopherlib.py
10/13/2001  02:33p              13,356 gzip.py
11/13/2001  04:51p               3,144 hmac.py
08/09/2002  12:51p      <DIR>          hotshot
02/17/2001  10:30p              19,823 htmlentitydefs.py
05/11/2001  02:45p              11,144 htmllib.py
12/03/2001  12:09p              13,538 HTMLParser.py
03/25/2002  02:25p              31,670 httplib.py
02/09/2001  05:17a              17,635 ihooks.py
02/16/2002  06:08p              37,963 imaplib.py
01/24/2001  01:27a               3,562 imghdr.py
09/04/2001  02:39p              26,119 imputil.py
03/17/2002  01:51p              31,734 inspect.py
08/09/2002  02:30p              39,236 inspect.pyc
06/18/2001  08:26p               2,152 keyword.py
02/09/2001  04:46a               3,608 knee.py
08/09/2002  12:51p      <DIR>          lib-old
08/09/2002  12:51p      <DIR>          lib-tk
05/29/2001  12:27a               2,836 linecache.py
08/13/2001  10:50a              28,841 locale.py
10/10/2001  12:16a               6,824 macpath.py
02/09/2001  04:48a               3,194 macurl2path.py
03/13/2002  06:42p               9,578 mailbox.py
05/11/2001  02:47p               7,740 mailcap.py
10/26/2001  02:02p              11,270 markupbase.py
10/17/2001  01:59a              34,275 mhlib.py
02/23/2001  03:04p               6,720 mimetools.py
12/05/2001  10:58a              14,926 mimetypes.py
02/09/2001  04:34a               3,909 MimeWriter.py
07/04/2001  06:15a              15,355 mimify.py
10/05/2001  05:22p               5,416 multifile.py
02/17/2001  10:30p               1,780 mutex.py
03/25/2002  02:25p               4,134 netrc.py
02/16/2002  06:08p              19,351 nntplib.py
11/05/2001  04:25p              15,418 ntpath.py
08/09/2002  02:30p              13,323 ntpath.pyc
07/20/2001  02:52p               2,098 nturl2path.py
03/17/2002  12:49p              19,477 os.py
08/09/2002  02:30p              23,728 os.pyc
02/09/2001  06:28p              31,127 pdb.py
03/26/2002  12:42p              27,941 pickle.py
08/02/2001  03:15a              10,238 pipes.py
12/02/2001  08:32a               7,018 popen2.py
02/16/2002  06:08p               9,756 poplib.py
10/24/2001  06:03p               8,169 posixfile.py
10/10/2001  12:16a              12,892 posixpath.py
11/28/2001  12:49a              10,427 pprint.py
05/11/2001  03:20p              24,769 pre.py
12/05/2001  05:27p              22,017 profile.py
10/08/2001  02:28a              23,926 pstats.py
05/29/2001  02:06a               4,961 pty.py
10/24/2001  04:22p              11,789 pyclbr.py
03/25/2002  02:25p              86,616 pydoc.py
08/09/2002  02:30p             103,892 pydoc.pyc
02/11/2001  09:00p               3,076 py_compile.py
02/17/2001  10:30p               4,001 Queue.py
10/15/2001  02:44p               7,194 quopri.py
11/25/2001  04:12p              22,513 random.py
09/04/2001  03:10p                 851 re.py
08/09/2002  02:30p                 345 re.pyc
09/04/2001  11:18a               5,539 reconvert.py
02/17/2001  10:30p               1,946 regex_syntax.py
02/15/2001  05:15p               6,395 regsub.py
10/29/2001  05:25p               3,246 repr.py
08/09/2002  02:30p               5,003 repr.pyc
10/13/2001  02:34p              13,250 rexec.py
12/20/2001  10:54a              34,481 rfc822.py
02/15/2001  05:15p               4,265 rlcompleter.py
08/13/2001  10:43a               9,699 robotparser.py
02/15/2001  05:15p               4,166 sched.py
10/26/2001  02:02p              16,913 sgmllib.py
02/15/2001  05:15p               4,644 shelve.py
04/17/2001  01:20p               7,945 shlex.py
02/15/2001  05:15p               4,074 shutil.py
02/09/2001  05:26a               6,516 SimpleHTTPServer.py
09/29/2001  12:54a               8,602 SimpleXMLRPCServer.py
08/09/2002  12:51p      <DIR>          site-packages
12/17/2001  11:07a              10,700 site.py
08/09/2002  02:30p              11,103 site.pyc
11/03/2001  10:04p              18,442 smtpd.py
02/25/2002  05:52a              24,897 smtplib.py
07/31/2001  02:27a               6,199 sndhdr.py
02/16/2002  06:08p               8,044 socket.py
10/23/2001  05:42p              18,669 SocketServer.py
10/28/2001  03:15p              12,256 sre.py
08/09/2002  02:30p              14,505 sre.pyc
09/04/2001  03:10p              14,578 sre_compile.py
08/09/2002  02:30p              12,718 sre_compile.pyc
09/04/2001  03:10p               7,323 sre_constants.py
08/09/2002  02:30p               7,909 sre_constants.pyc
12/09/2001  11:13a              25,415 sre_parse.py
08/09/2002  02:30p              23,407 sre_parse.pyc
02/17/2001  10:30p               1,753 stat.py
08/09/2002  02:30p               3,330 stat.pyc
02/15/2001  05:15p               2,393 statcache.py
02/17/2001  10:30p                 794 statvfs.py
01/30/2002  11:16a              11,484 string.py
08/09/2002  02:30p              13,621 string.pyc
03/18/2002  11:57a               6,667 StringIO.py
02/09/2001  03:18p              12,789 stringold.py
01/14/2001  08:36p              16,989 sunau.py
01/14/2001  08:36p               1,276 sunaudio.py
10/17/2001  09:13a               1,820 symbol.py
07/12/2001  06:36p               7,979 symtable.py
08/07/2001  01:19p              10,709 tabnanny.py
02/16/2002  06:08p              19,721 telnetlib.py
03/17/2002  01:41p               8,369 tempfile.py
02/27/2001  04:51p                 430 TERMIOS.py
08/09/2002  12:52p      <DIR>          test
02/08/2002  03:47p               1,030 this.py
02/18/2002  10:02p              21,056 threading.py
08/13/2001  10:40a               3,095 toaiff.py
08/13/2001  11:48a               3,052 token.py
08/09/2002  02:30p               5,097 token.pyc
08/30/2001  04:51p              10,922 tokenize.py
08/09/2002  02:30p              10,626 tokenize.pyc
06/10/2001  02:58p              10,890 traceback.py
02/28/2001  11:27p                 915 tty.py
12/02/2001  07:08a               2,063 types.py
08/09/2002  02:30p               3,231 types.pyc
03/20/2001  01:36p               3,592 tzparse.py
12/17/2001  05:13a              26,051 unittest.py
04/07/2002  11:29p              52,094 urllib.py
02/22/2002  08:26a              37,570 urllib2.py
03/18/2002  11:57a               9,546 urlparse.py
03/30/2000  10:00a               1,511 user.py
11/05/2001  12:40p               2,125 UserDict.py
08/09/2002  02:30p               5,405 UserDict.pyc
06/09/2001  03:34a               3,600 UserList.py
05/15/2001  07:58a               8,051 UserString.py
08/17/2001  03:59p               6,007 uu.py
08/31/2001  01:46p               8,438 warnings.py
09/04/2001  03:14p              18,170 wave.py
11/06/2001  11:36a               7,559 weakref.py
01/07/2002  10:29a              10,310 webbrowser.py
10/24/2001  04:33p               2,134 whichdb.py
01/14/2001  10:34p               4,918 whrandom.py
08/16/2001  01:06p               7,636 xdrlib.py
08/09/2002  12:51p      <DIR>          xml
03/14/2001  12:03p              35,849 xmllib.py
12/19/2001  04:40p              32,744 xmlrpclib.py
12/06/2001  01:23a              25,147 zipfile.py
08/24/2001  01:13p               3,509 __future__.py
08/09/2002  02:30p               3,942 __future__.pyc
10/18/2001  02:49p                  65 __phello__.foo.py
             187 File(s)      2,334,986 bytes
              12 Dir(s)  28,970,403,328 bytes free





-----Original Message-----
From: Frank Singleton [mailto:frank.singleton@xxxxxxxxxxxx]
Sent: Wednesday, August 14, 2002 9:15 AM
To: Bernd Becker
Cc: Patnaik, Anjela; 'ethereal-dev@xxxxxxxxxxxx'
Subject: Re: [Ethereal-dev] omniidl problem in trying compile IDL


Bernd Becker wrote:
> 
> --On Tuesday, August 13, 2002 18:46:39 -0400 "Patnaik, Anjela"
> <APatnaik@xxxxxxxxx> wrote:
> > Frank & others:
> 
> > Now, when I try to use omniidl, i get this error:
> >
> > I have placed all IDL files in the same directory
> > where I have ethereal and all its scripts and c files
> >
> > $ omniidl -p ./ -b ethereal_be GlobalDefs.idl
> > omniidl: Could not import back-end `ethereal_be'
> > omniidl: Maybe you need to use the -p option?
> > omniidl: (The error was `No module named tempfile')
> >

Hmm. locate tempfile.py gives

/usr/lib/python1.5/tempfile.py
/usr/lib/python1.5/tempfile.pyc
/usr/lib/python1.5/tempfile.pyo
/usr/lib/python2.2/tempfile.py
/usr/lib/python2.2/tempfile.pyc
/usr/lib/python2.2/tempfile.pyo

on my linux box.

And cat tempfile.py shows

def TemporaryFile(mode='w+b', bufsize=-1, suffix=""):

So at least they are there on my system, and I have not
done anything special to load extra modules etc..


Are you sure that you have set PYTHONPATH to something
like /usr/lib/python1.5/

And that ethereal_*.py is either in the current directory
or in $PYTHONPATH/site-packages

OR as Bernd,suggested, do you really have a full python installation
or a partial one.

The latter may be the case if you cannot find tempfile.py

Regards / Frank

-- 
EUS/SV/Z Frank Singleton      ASO Americas BSS
Office : +1 972 583 3251      ECN 800 33251  
Mobile : +1 214 228 0874      Amateur Radio: VK3FCS/KM5WS   
Email : frank.singleton@xxxxxxxxxxxx

Hardware: HP Omnibook 4150 running Redhat Linux 7.3 (2.4.18-5 kernel).