help!!

z00z ghostofmatrix at gmail.com
Thu Jun 10 08:43:18 EDT 2010


On Jun 10, 1:33 am, Steven D'Aprano <steve-REMOVE-
T... at cybersource.com.au> wrote:
> On Wed, 09 Jun 2010 16:44:10 -0700, z00z wrote:
> > ok when my code is like this everything works well
>
> > #/usr/bin/python
> > input = raw_input(">> ").replace(',','\n')
> > a=open("file","w")
> > a.write(input)
> > a.close()
> > import sys,os,time,subprocess,threading,readline,socket,ifc
>
> Your hash-bang line is broken, missing the exclamation mark.
>
> What is "ifc" module?
>
> > but the problem is i have to import the libraries before the code so my
> > code should be like this
>
> > #/usr/bin/python
> > import sys,os,time,subprocess,threading,readline,socket,interfaces
> > input = raw_input(">> ").replace(',','\n')
> > a=open("file","w")
> > a.write(input)
> > a.close()
>
> The hash-bang line is still broken, and the import ifc is replaced by
> interfaces. What is interfaces?
>
> > when i execute the above code no error message is given but no file is
> > written.
>
> Apart from not having the interfaces module, it works for me. Are you
> sure that's the code you're actually running?
>
> --
> Steven
yeah sorry about that
interfaces is ifc and its a module (written by me) to detect the
network interface.



More information about the Python-list mailing list