Hi Techies, We build python from source adding certain MSVC import libs and binmode.obj during the link time of python.exe. I would like to get the list of libs used by triggering something like perl -V:libs just to make sure if the executable has been built with proper libs from command line. 'binmode.obj' forces all files to open in binary mode as default if mode-flags are not provided. In a C program we can get default mode by getting the value of 'fmode' from 'stdlib.h'. If there is someway even in Python to get the mode of file opened, I would like to know about that and the sample script.
Regards, Karthik. > -----Original Message----- > From: David Ascher [mailto:[EMAIL PROTECTED] > Sent: Monday, June 06, 2005 10:08 PM > To: Rajagopalan, Karthik > Cc: activepython@listserv.ActiveState.com > Subject: Re: Imitate Perl -V:libs in python > > > Rajagopalan, Karthik wrote: > > >Still the import library name that gets linked to Python executable > >remains the same though the version of dll that gets loaded > at runtime > >differs. > > > What you describe is true for libraries linked at compiled time. My > point was that modules (which I thought is what you were > referring to) > can be loaded at runtime even if they haven't been declared > at compile-time. > > >I would like to know the list of components linked to python > >executable as Perl -V:libs just to know if 'binmode.obj' (which opens > >file in binary mode always) has been used for building. If > there is a > >way to detect this through python script please provide me a sample. > > > > > I don't know anything about a file called binmode.* in the Python > source, and can't find any reference w/ a simple grep. Are you sure > you're talking about Python? As far as I know, the behavior > of opening > files in binary, text or "universal newlines" mode is purely > controlled > by the combination of platforms and flags to open(). I may be > misunderstanding you, though... > > Let's try to move higher up -- what actual question do you > need answered > (independent of how you think it should be answerable)? > > --David Ascher > > > > _______________________________________________ ActivePython mailing list ActivePython@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython