(VERY) New to Python. Need Help!

Discussion in 'Python' started by Don Bruder, Aug 5, 2003.

  1. Don Bruder

    Don Bruder Guest

    Greetings, oh scaly ones... :)

    I'm a Mac user with a fairly high level of computer literacy, including
    reasonable programming skills in BASIC, C, Pascal, and several flavors
    of ML, just trying to run a "canned" Python... Uhhh... Program? Script?
    Module? - Yeesh... I'm such a rookie at Python I'm not even sure of the
    right terminology to use here...

    At this point in the game, I'm not actually trying to *DO* anything in
    Python, I just want to run a program that's written in Python.
    Specifically, I'm trying to run a P2P package called "BitTorrent".

    So I've downloaded and installed a package calling itself "MacPython-OS9
    2.2.3", which claims to be functional back to MacOS 8.1. (I'm running
    8.6)

    That was fairly painless. Now that I've got it installed, I'm slamming
    face-first into a brick wall at high velocity - After diddling file
    types per the docs for MacPython, I double-click the
    "btdownloadheadless.py" file that the FAQ for BitTorrent says should run
    for me, and I get a window opening up with this:

    Python 2.2.3 (#139, Jun 1 2003, 23:11:08) [CW CARBON GUSI2 THREADS GC]
    on mac
    Type "copyright", "credits" or "license" for more information.

    Traceback (most recent call last):
    File "Megalon City
    I:Downloads:BitTorrent-3.2.1b:btdownloadheadless.py", line 6, in ?
    from BitTorrent.download import download
    File "Megalon City
    I:Downloads:BitTorrent-3.2.1b:BitTorrent:download.py", line 23, in ?
    from os import getpid, path, makedirs
    ImportError: cannot import name getpid

    and nothing further happens.

    Looks pretty obvious that something it wants can't be found. At this
    point in my Python "career", I don't have a freakin' clue what, where to
    tell it to look for it, or even *HOW* to tell it to look for it!

    Anybody wanna to throw this newbie a bone?

    Yes, I realize this is quite vague. Quite frankly, I don't know enough
    about the language to even properly describe the problem.

    So can Somebody please lend a hand here? Before you're forced to taunt
    me a second time! :)

    (Hey! Quit throwing those tomatoes! The docs said Monty Python
    references are not only acceptable, but *ENCOURAGED*! :) )

    --
    Don Bruder - <--- Preferred Email - unmunged, SpamAssassinated
    Hate SPAM? See <http://www.spamassassin.org> for some seriously great info.
    I will choose a path that's clear: I will choose Free Will! - N. Peart
    Fly trap info pages: <http://www.sonic.net/~dakidd/Horses/FlyTrap/index.html>
    Don Bruder, Aug 5, 2003
    #1
    1. Advertising

  2. Don Bruder

    Terry Reedy Guest

    "Don Bruder" <> wrote in message
    news:beLXa.8574$...
    > Any indication of whether there's a "getpid" function in the Carbon
    > version of MacPython? And how would I go about checking to see

    (aside
    > from the obvious "fire up the program - if it pukes, the function

    isn't
    > there") if an arbitrarily selected function is available in a

    particular
    > Python implementation?


    In the installation directory is a subdirectly Lib (at least for *nix,
    windows versions, don't know if mac is same). In that directory is a
    file called os.py which, when imported, becomes the os module. In
    that file are a number of definitions. Your BT program, by including

    >>> from os import getpid, path, makedirs


    is looking for those three particular names. So you could look thru
    the file to see if they are there. Running the program seems easier
    ;-), although looking will verify that os.py, path, and makedirs *are*
    present (and getpid present or not).

    If so, you could verify the that absence of getpid is exactly the
    problem by deleting it from import list and adding as the next line
    print 'got here'; raise SystemExit

    Terry J. Reedy
    Terry Reedy, Aug 5, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    451
    Raymond Hettinger
    Jul 27, 2003
  2. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,591
    Merrill & Michele
    Oct 19, 2004
  3. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    409
    jacob navia
    Oct 17, 2004
  4. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    498
    Dave Thompson
    Feb 14, 2005
  5. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,246
Loading...

Share This Page