Changes between Version 123 and Version 124 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 11:50:47 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v123 v124 291 291 You can find these packages by googling for with the term "<subject> python library". For example "spell check python library". This turns up [https://pythonhosted.org/pyenchant/ | PyEnchant] which describes how to use and access the library. There are probably others. You can also go to the [[https://pypi.python.org/pypi|Python Package Index]]. What ever you do, make sure you use the correct version of the library for the version of Python you're using (in our case, Python 3) 292 292 293 To use th is external package in code, you use the !`import` keyword in Pythonlike so:293 To use the pyenchant external package in your program, you use the !`import` keyword in Python at the beginning of your program like so: 294 294 295 295 {{{ … … 300 300 good=d.check("Hello") # Correctly spelled word returns True 301 301 }}} 302 303 This makes the library known to your code once its installed. 304 302 305 It would be a enormous effort to create your own spell check library, so reusing one saves a lot of time. We'll be using this when we program robots because a lot of the work we need to do to communicate with the parts of a robot has already been done. And we want to spend time making robots do things, not figuring out how to communicate with then. 303 306