On May 6, 4:43 am, notbob <[EMAIL PROTECTED]> wrote: > "Here is an example of a user-defined function that has a parameter: > > def print_twice(bruce): > print bruce, bruce > ****ME**** > ok, I try and follow the above, but where is he getting the script? So, I > make a script called chap03.py and put it in ~/pyth/chap03/.
Did you copy the function definition into chap03.py? Because the error sounds a lot like you're trying to import something from an empty file. I think you may have missed the following line that occurs in the paragraph just before the import example: "To see how this works, assume the print_twice function is defined in a script named chap03.py." If you copy the code provided for 'print_twice' into your 'chap03.py' file, the example should work. Hope this helps. - alex23 -- http://mail.python.org/mailman/listinfo/python-list