![]() ![]() In some cases you will be asked to text back a 1 or 2 for specifying the direction, when you are at a transitway stop or loop that services both directions. It will shortly reply with a GPS adjusted schedule. Basically you text 560560 your stop number, like 7595, with the option to specify a bus, like the number 18. Ottawa’s OC Transpo service provides real-time bus schedules through text-messages on your cell phone. Woohoo! I really should be doing my job and instead I spent part of my morning having fun and learning Python. Review the goal 4 or 5 times, make an outline of how I think it will work, look up a bunch of things, learn new things, poke around in IDLE until I can get a step to work, code it. Totally the opposite! I’ve learned a ton of new things, and i’ve got a better feel for how to get to the answer without all the distractions around it. I felt like I was slogging through each Bite.īy now you’re wondering if I should abandon this as it’s not sounding like fun. and the 4th is similar to it but just enough of a difference to throw you off. Yes, you can discuss your solution with others once you give up or solve it. The second one? Well, as i’ve told my kids, “ Programming is constant failure with the occasional success.” That one I got so frustrated I gave up and read the solution. I was confused! Eventually I figure out how to get it to work. I have expectations of seeing stuff print on screen but it never happened. It’s simple and does the job.Īs to the Bites themselves? Hey, i’ve done 3 successfully! The first was hard as I really had no idea what I was doing and how the interface worked. ![]() Once they pass, I copy and paste the code into the web interface. Wheee! For now i’m going to stick to using the Python Interpreter on the command line to try things out until it works, then code in BBEdit and run the tests on the command line. Fiddling with python versions, installing stuff, tweaking settings. They’re a great distraction from working on Bites. VS Code and P圜harm are both good, along with downloading the Bites and the tests, using git and Github to store your code (and revisions!!!) from which you can then submit your answers. Working in the browser is nice, but i’m used to using an editor on my own Mac along with all the tools it brings. I got really really stuck I went and talked to those folks and they pointed me in the right direction. But the best has been the Pybites Slack forum. The team at RealPython made some fantastic tutorials which definitely helped me understand dicts enough to finish that Bite. Stackoverflow has answers for everything but can be hard to make heads or tails of. The python documentation has lots of examples. and with that under my belt, here’s a few things that are making it easier as I go along: I bounce around Google a lot trying to figure things out. I’ve managed to complete 3 out of the 4 Intro Bites. Did I mention i’ve tried getting into Python a few times? I promptly discovered I had setup an account a year ago. I like their style and the project intrigued me so I went and had a look and found Bites of Py Exercises. Recently I listened to another fine episode of Talk Python to Me, this time with Michael, Bob and Julian describing their latest course/adventure, 100 Days of Web. Working with teams of software developers and tech support I have accumulated a lot of “ what programming is and how it works” over the years, so this is not all new. The shell scripts, Applescript and even the Hypercard stacks I made back in the day are very useful but not quite enough any longer. Learning Python has been on my radar for many years. Though I still don’t know what to do to fix it it makes me feel like I have a better handle on it. and also tells me the module I have issue with. it explains the error, points to the line I need to fix. ImportError: cannot import name 'Request' from 'urllib' NameError: name 'Request' is not definedįile "wff-selenium-no-login.py", line 24, in With practice I will get better at making sense of things like this: Traceback (most recent call last):įile "wff-selenium-no-login.py", line 6, in When a script crashes in Python you get a traceback, which seems to be a backwards listing of the things that caused the crash. But, as I mention in the title, I seem to be better at writing bugs than functional code. Currently I am working slowly towards scraping my favorite wallpapers from and downloading them. ![]() Small wins are good!Īlong the way i’ve discovered, thanks again to the Python Bytes podcast, a new way to see crashes in my scripts. I posted recently that I had started on Bites of Py Exercises, and i’m glad to say I have finished a few more. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |