Changes between Version 70 and Version 71 of ControlSystems/SoftwareTeam/IntroToPython
- Timestamp:
- Sep 4, 2017, 10:12:04 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/IntroToPython
v70 v71 287 287 Now that you seen the basics of the Python language, and have created your own functions. Its time to see what else is out there. It turns out there are A LOT of libraries out there for python that do pretty much everything you want, from advance machine intelligence, to 3D graphics, to yes controlling robots. These libraries were created by others and are offered for free, and others may be offered at a cost. 288 288 289 You can find these libraries 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.290 291 To use it in code, you use the !`import` keyword in Python like so: 289 You can find these libraries 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. 290 291 To use it in code, you use the !`import` keyword in Python like so: 292 292 293 293 {{ 294 295 #!python 296 294 #!python 297 295 import enchant 298 299 d=enchant.Dict("en_US") # Selects the US english dictionary 300 301 bad=check("Helo") 302 303 good=check("Hello") 304 296 d=enchant.Dict("en_US") # Selects the US english dictionary 297 bad=check("Helo") # Spell checks the given string, not correctly spelled, returns False 298 good=check("Hello") # Correctly spelled word returns True 305 299 }} 306 300 307 It would be a enormous effort to create your own spell check library, so this saves a lot of time. We'll be using this when we program robots because a lot of work has already been done. 308 301 It would be a enormous effort to create your own spell check library, so this saves a lot of time. We'll be using this when we program robots because a lot of work has already been done. 302 303 304 ---- 309 305 [[[wiki:ProgrammingReserve Programming]Archive | Programming Archive]]