talkpython / mastering-pycharm-course

Course demos and handouts for Talk Python's Effective PyCharm course
https://training.talkpython.fm/courses/explore_pycharm/mastering-pycharm-ide
GNU General Public License v2.0
1.12k stars 716 forks source link

Package lesson text might add something about which directory #34

Closed hkokko closed 4 years ago

hkokko commented 4 years ago

It mentions: sys.path.extend(['/Users/mkennedy/Desktop/pak'])

Perhaps should mention users directory where he/she should point to...

mikeckennedy commented 4 years ago

Hi @hkokko Sorry about the confusion. I updated the readme. That text above is just the output of PyCharm when you press the Python console tab. It's not meant to be typed in. I added details that I hope make that clear. I know it wasn't before :)

From the updated readme.me

Use the Python Console in PyCharm to test this (it adds the necessary path adjustments to run the package). For example, when I run the Python console, I see this output prior to the >>> prompt.

import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/Users/mkennedy/Desktop/calcy_package'])

This is PyCharm automatically extending the Python path. You do not need to do anything to make this happen. It's just PyCharm making life easy on us.