[BangPypers] DBF error

2009-11-19 Thread Ranganath s
HI all,

i have installed the DBF module and  just wrote a small program as
follows :-
from dbfpy import dbf


def OpenFile(tblName):
   '''fpath = os.path.join(local.DB_DIR,tblName)'''
   '''f=open(tblName,ab+)'''
   db=Dbf(tblName,True)
   db.addField(
   (NAME,C,15),
   (SName,C,15),
   )
   for(n ,s ) in (
  (john,miller),
   ):
  rec=db.newRecord()
  rec[NAME]=n
  rec[SNAME]=s
  rec.store()
   db.close()

OpenFile(test.dbf)

=
This programs gives error as follows
=
cur...@cursor:~/SchoolManagementSystem$ python test.py
Traceback (most recent call last):
  File test.py, line 23, in module
OpenFile(test.dbf)
  File test.py, line 9, in OpenFile
db=Dbf(tblName,True)
NameError: global name 'Dbf' is not defined
=

 Can some one point out like where am i going wrong.

Thank you
Ranganath.S




-- 
I blog at http://ranganaths.wordpress.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Anand Balachandran Pillai
On Thu, Nov 19, 2009 at 4:24 PM, Ranganath s rangana...@gmail.com wrote:

 HI all,

i have installed the DBF module and  just wrote a small program as
 follows :-
 from dbfpy import dbf


 def OpenFile(tblName):
   '''fpath = os.path.join(local.DB_DIR,tblName)'''
   '''f=open(tblName,ab+)'''
   db=Dbf(tblName,True)
   db.addField(
   (NAME,C,15),
   (SName,C,15),
   )
   for(n ,s ) in (
  (john,miller),
   ):
  rec=db.newRecord()
  rec[NAME]=n
  rec[SNAME]=s
  rec.store()
   db.close()

 OpenFile(test.dbf)

 =
 This programs gives error as follows
 =
 cur...@cursor:~/SchoolManagementSystem$ python test.py
 Traceback (most recent call last):
  File test.py, line 23, in module
OpenFile(test.dbf)
  File test.py, line 9, in OpenFile
db=Dbf(tblName,True)
 NameError: global name 'Dbf' is not defined
 =


 Dbf != dbf

 You are importing module as dbf so how do you expect name Dbf
  to be there ?

 These are silly errors. If you need to post to a forum for resolving them,
 there is something wrong with your way of coding.



  Can some one point out like where am i going wrong.

 Thank you
 Ranganath.S




 --
 I blog at http://ranganaths.wordpress.com
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers




-- 
--Anand
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Ranganath s
well i did check for it. But if you look in to the dbf.py in the dbf module
may be you can understand. Here is my imports on interpreter,

@anand,These are silly errors. If you need to post to a forum for resolving
them,
 there is something wrong with your way of coding.
 Yep, i do know there is some thing wrong with this code. just requesting
geeks out there in python to just help out  thats it..

==
==
 from dbfpy import dbf
 from dbfpy import Dbf

Traceback (most recent call last):
  File pyshell#1, line 1, in module
from dbfpy import Dbf
ImportError: cannot import name Dbf
 db = dbf(abcd,True)

Traceback (most recent call last):
  File pyshell#2, line 1, in module
db = dbf(abcd,True)


-Ranganath.S

On Thu, Nov 19, 2009 at 4:36 PM, Anand Balachandran Pillai 
abpil...@gmail.com wrote:

 On Thu, Nov 19, 2009 at 4:24 PM, Ranganath s rangana...@gmail.com wrote:

  HI all,
 
 i have installed the DBF module and  just wrote a small program as
  follows :-
  from dbfpy import dbf
 
 
  def OpenFile(tblName):
'''fpath = os.path.join(local.DB_DIR,tblName)'''
'''f=open(tblName,ab+)'''
db=Dbf(tblName,True)
db.addField(
(NAME,C,15),
(SName,C,15),
)
for(n ,s ) in (
   (john,miller),
):
   rec=db.newRecord()
   rec[NAME]=n
   rec[SNAME]=s
   rec.store()
db.close()
 
  OpenFile(test.dbf)
 
  =
  This programs gives error as follows
  =
  cur...@cursor:~/SchoolManagementSystem$ python test.py
  Traceback (most recent call last):
   File test.py, line 23, in module
 OpenFile(test.dbf)
   File test.py, line 9, in OpenFile
 db=Dbf(tblName,True)
  NameError: global name 'Dbf' is not defined
  =
 

  Dbf != dbf

  You are importing module as dbf so how do you expect name Dbf
  to be there ?

  These are silly errors. If you need to post to a forum for resolving them,
  there is something wrong with your way of coding.


 
   Can some one point out like where am i going wrong.
 
  Thank you
  Ranganath.S
 
 
 
 
  --
  I blog at http://ranganaths.wordpress.com
  ___
  BangPypers mailing list
  BangPypers@python.org
  http://mail.python.org/mailman/listinfo/bangpypers
 



 --
 --Anand
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers




-- 
I blog at http://ranganaths.wordpress.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Aravind Muthu
from dbfpy import dbf


def OpenFile(tblName):
  '''fpath = os.path.join(local.DB_DIR,tblName)'''
  '''f=open(tblName,ab+)'''
  db=dbf.Dbf(tblName,True)
  db.addField(
  (NAME,C,15),
  (SName,C,15),
  )
  for(n ,s ) in (
 (john,miller),
  ):
 rec=db.newRecord()
 rec[NAME]=n
 rec[SNAME]=s
 rec.store()
  db.close()

OpenFile(test.dbf)



sure it will work..check it out

On 11/19/09, Ranganath s rangana...@gmail.com wrote:
 well i did check for it. But if you look in to the dbf.py in the dbf module
 may be you can understand. Here is my imports on interpreter,

 @anand,These are silly errors. If you need to post to a forum for resolving
 them,
  there is something wrong with your way of coding.
 Yep, i do know there is some thing wrong with this code. just requesting
 geeks out there in python to just help out  thats it..

 ==
 ==
 from dbfpy import dbf
 from dbfpy import Dbf

 Traceback (most recent call last):
   File pyshell#1, line 1, in module
 from dbfpy import Dbf
 ImportError: cannot import name Dbf
 db = dbf(abcd,True)

 Traceback (most recent call last):
   File pyshell#2, line 1, in module
 db = dbf(abcd,True)
 

 -Ranganath.S

 On Thu, Nov 19, 2009 at 4:36 PM, Anand Balachandran Pillai 
 abpil...@gmail.com wrote:

 On Thu, Nov 19, 2009 at 4:24 PM, Ranganath s rangana...@gmail.com wrote:

  HI all,
 
 i have installed the DBF module and  just wrote a small program
  as
  follows :-
  from dbfpy import dbf
 
 
  def OpenFile(tblName):
'''fpath = os.path.join(local.DB_DIR,tblName)'''
'''f=open(tblName,ab+)'''
db=Dbf(tblName,True)
db.addField(
(NAME,C,15),
(SName,C,15),
)
for(n ,s ) in (
   (john,miller),
):
   rec=db.newRecord()
   rec[NAME]=n
   rec[SNAME]=s
   rec.store()
db.close()
 
  OpenFile(test.dbf)
 
  =
  This programs gives error as follows
  =
  cur...@cursor:~/SchoolManagementSystem$ python test.py
  Traceback (most recent call last):
   File test.py, line 23, in module
 OpenFile(test.dbf)
   File test.py, line 9, in OpenFile
 db=Dbf(tblName,True)
  NameError: global name 'Dbf' is not defined
  =
 

  Dbf != dbf

  You are importing module as dbf so how do you expect name Dbf
  to be there ?

  These are silly errors. If you need to post to a forum for resolving
 them,
  there is something wrong with your way of coding.


 
   Can some one point out like where am i going wrong.
 
  Thank you
  Ranganath.S
 
 
 
 
  --
  I blog at http://ranganaths.wordpress.com
  ___
  BangPypers mailing list
  BangPypers@python.org
  http://mail.python.org/mailman/listinfo/bangpypers
 



 --
 --Anand
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers




 --
 I blog at http://ranganaths.wordpress.com
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Noufal Ibrahim
On Thu, Nov 19, 2009 at 4:53 PM, Ranganath s rangana...@gmail.com wrote:
 well i did check for it. But if you look in to the dbf.py in the dbf module
 may be you can understand. Here is my imports on interpreter,

Try
  from dbfpy.dbf import Dbf

I'd recommend you skim through the modules/packages sections of the
tutorial. The __init__.py business is something people often trip
over.



-- 
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Aravind Muthu
No need to change ur import  class..
make these changes in ur pgm.

 from dbfpy import dbf



 db=dbf.Dbf(tblName,True)

On 11/19/09, Noufal Ibrahim nou...@gmail.com wrote:
 On Thu, Nov 19, 2009 at 4:53 PM, Ranganath s rangana...@gmail.com wrote:
 well i did check for it. But if you look in to the dbf.py in the dbf
 module
 may be you can understand. Here is my imports on interpreter,

 Try
   from dbfpy.dbf import Dbf

 I'd recommend you skim through the modules/packages sections of the
 tutorial. The __init__.py business is something people often trip
 over.



 --
 ~noufal
 http://nibrahim.net.in
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] DBF error

2009-11-19 Thread Ranganath s
Thanks Aravind , Noufal..

-R

On Thu, Nov 19, 2009 at 5:21 PM, Aravind Muthu aravind.g...@gmail.comwrote:

 No need to change ur import  class..
 make these changes in ur pgm.

  from dbfpy import dbf



  db=dbf.Dbf(tblName,True)

 On 11/19/09, Noufal Ibrahim nou...@gmail.com wrote:
  On Thu, Nov 19, 2009 at 4:53 PM, Ranganath s rangana...@gmail.com
 wrote:
  well i did check for it. But if you look in to the dbf.py in the dbf
  module
  may be you can understand. Here is my imports on interpreter,
 
  Try
from dbfpy.dbf import Dbf
 
  I'd recommend you skim through the modules/packages sections of the
  tutorial. The __init__.py business is something people often trip
  over.
 
 
 
  --
  ~noufal
  http://nibrahim.net.in
  ___
  BangPypers mailing list
  BangPypers@python.org
  http://mail.python.org/mailman/listinfo/bangpypers
 
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers




-- 
I blog at http://ranganaths.wordpress.com
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] [Reminder] BangPypers monthly meetup on Sun November 22 4 pm at Thoughtworks on LLVM-py

2009-11-19 Thread Sriram Narayanan
A reminder/confirmation - I just called Mahadevan and confirmed the
following with him.

-- Sriram

-- Forwarded message --
From: Noufal Ibrahim nou...@gmail.com
Date: Mon, Nov 16, 2009 at 3:17 PM
Subject: Re: [BangPypers] BangPypers monthly meetup.
To: Bangalore Python Users Group - India bangpypers@python.org


So I guess it's settled then.
Time : 4:00 pm
Date : 22 Nov 2009
Venue : Thought Works, Diamond District.
Highlights : Mahadevan's talk on python bindings for llvm

Is this okay?

P.S. If any of the people attending have the conference recordings,
please bring them.

Thanks.



--
~noufal
http://nibrahim.net.in
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] [JOB] Twisted based ftp server

2009-11-19 Thread Nanolets nanolets
Server is a framework which may connect to any heirarchical data source
to give a folder view to it.

Job is a 3 months contract.

Email me offline if anybody is interested for discussion.

Regards
Srini.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers