cannot import csv

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mir nazim

    cannot import csv

    hi,
    i m unable to import csv module.
    it says:

    ImportError: no module named csv.

    plz help me.

    is csv module not a part of standard dist?
  • Peter Hansen

    #2
    Re: cannot import csv

    mir nazim wrote:
    [color=blue]
    > hi,
    > i m unable to import csv module.
    > it says:
    >
    > ImportError: no module named csv.
    >
    > plz help me.
    >
    > is csv module not a part of standard dist?[/color]

    c:\>python
    Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
    win32[color=blue][color=green][color=darkred]
    >>> import csv
    >>> csv.__file__[/color][/color][/color]
    'c:\\a\\python2 3\\lib\\csv.py'


    It surely is on Python 2.3, anyway.

    -Peter

    Comment

    • Mark McEahern

      #3
      Re: cannot import csv

      What version Python are you using? csv was introduced with 2.3 (I
      think).

      // m

      On Sat, 2004-05-22 at 07:58, mir nazim wrote:[color=blue]
      > hi,
      > i m unable to import csv module.
      > it says:
      >
      > ImportError: no module named csv.
      >
      > plz help me.
      >
      > is csv module not a part of standard dist?[/color]


      Comment

      • Skip Montanaro

        #4
        Re: cannot import csv


        Mark> What version Python are you using? csv was introduced with 2.3 (I
        Mark> think).

        Correct. Our goal when writing it was for it to be 2.2-compatible though,
        so you ought to be able to grab csv.py and _csv.c from the 2.3 distro and
        drop it into your 2.2 distro (with suitable setup.py or Modules/Setup.local
        mods of course).

        Skip

        Comment

        Working...