I’m going through Zed Shaw’s online course Learn Python the Hard Way and I ran into a study drill that gave me some trouble.
In lesson 15 the seventh study drill is a little tricky if you’re not familiar with the command line. Instead of opening a Python file, you’re instructed to enter the commands from the Python prompt.
open(example.txt) may not work because the Python interpreter only looks in the current folder to find the file. If you don’t start Python in the same folder, you need to tell the interpreter exactly where the file is is located. Here’s one way to do this:
>>> txt = open("/Users/Kevin/Dev/example.txt")
>>> print txt.read()
If you’re not sure if you’re in the right directory, you can double check your directory. First start Python:
Then type these two commands:
>>> import os
Remember to always import the os module before calling any os commands/functions.
Your result should look like this:
I just spent about an hour searching the internet trying to figure out the keyboard shortcut to tab (or move) between the split windows within a tab in Coda 2. After looking through the Apple shortcuts, I finally found one that works:
Control + Tab
It’s so simple. But there’s a catch. To get this to work you first must open another tab before opening the Terminal window.
1. Create a new tab/document
2. Add a new split Document or Preview window
3. Add a new split Terminal window
4. Close the second Document or Preview
At this point you should be able to Control + Tab between the Document window and the Terminal window. It’s not ideal, but it works when needed.
On a related note, I’m interested to see what Panic has up their sleeve for Coda 2.5. It should be released soon.
I help a family member run a website for a small business and we recently discovered that the contact form notification emails were not being delivered. The contact submissions were in the Feedback section of the dashboard, but the notification emails were not being delivered to the email address on the form.
Domain Registrar: Namecheap
Web host: Namecheap
cPanel Version: 11.40.1 (build 13)
DNS: Namecheap hosting servers
Email: Google Apps
Contact Form: Jetpack
Contact email: Generic Gmail account
I spent a couple hours playing around with the WP-Mail-SMTP plugin, Google App settings, cPanel settings and nothing was helping.
My initial thought was that the MX record shouldn’t affect outgoing email, but I was wrong. Finally, I found a Namecheap support page which explained the problem:
..to send emails from our server, domain should be added to it and have MX records pointed to the server where this domain is hosted.
To summarize: Email generated by the server will not be sent unless the domain is added to the hosting account AND the MX records point to the same location.
- Create a subdomain (because the subdomain isn’t setup with Google Apps)
- Install the WP-Mail-SMTP plugin
- In order to force outgoing emails to use the subdomain, configure the plugin as is explained on the Namecheap support page
Once I completed the setup, the email notifications were fixed. I had a hosting account on Bluehost for years and I never ran into this issue, so I’m assuming that they don’t have the same limitation on emails. Has anyone else run into this issue with other shared hosts?
I’m really excited about WordPress 3.9, which was released today.
There are so many great additions, especially to the post editor.
This video is shown on the update page and has a great overview of all the changes:
Both Post Status and WP Tavern have great recaps.
Check it out!
WordPress 3.8 Beta 1 dropped today. It looks great. I really love the new Admin Color Schemes options. In order to charge your color scheme, go to Users → Your Profile and select one of the four options.
I’m really digging the Midnight scheme.
See the full announcement here.
The final release date is December 12th, so start testing!