I’ve received a bunch of email’s requesting that I provide more sample Python code. Some people learn better by seeing somebody work through examples. So, here I’ll work through some simple to understand examples that should teach you a bunch about Python.
Note: They will start out simple and work up to file I/O (Reading and Writing to files)
Here I’ll go over a bunch more on Python. If you haven’t seen Part 1 of the Python How To Program Tutorial, read it first.
In this article I’ll cover functions, exception handling and general file i/o. I’ve read your comments, and yes I will be providing a bunch of Python sample programs and videos. They may already be done actually. Check the right side bar on this site where it says categories, click on Python How to. That will display every Python article. Well on with the article.
It is really a shame how many people get ripped off by malicious web designers. I’ve read a statistic recently that stated, after 3 months, 86% of people are unhappy with the traffic their sites are generating. What makes that fact even worse is that the average site cost $7,500!
In this article, I explain some of the ways I’ve found success at generating web site traffic. This will be information that you have never seen in just one article. And, from what I’ve seen personally 99% of websites do everything wrong!
There are numerous built in functions and library modules in Python. Definitely more than I can cover in one article, but I will go over many of them today.
I’ll specifically cover the most commonly used functions pertaining to mathematical operations and string manipulation. All also throw in some random issues that are sure to come up.
In this article, I’ll be covering Conditionals (IF and Conditional Expression) and Loops (FOR and WHILE). Once again Python does things a little differently from other languages. And, while Python doesn’t include a switch statement for performing Conditionals, I’ll show you how to create one as well.
Welcome to Part 2 of the Python How to Program series. I’m going to mainly focus on variable types specific to Python in this article. I also will go over many basic topics that make Python different than any other programming langauge.
How Python Handles White Space
If you have programmed in other languages, you are probably used to enclosing your code between brackets { }. Python instead separates it’s code segments through the use of white space. So if you where creating a function in Python you would indent all of the code that lies in that function (normally 4 spaces).
Welcome to the Python How to Program Tutorial. In a long series of articles, I will answer all of your Python questions. I’ve chosen to cover Python because I’ve received many requests pertaining to learning how to program with Python. I’ve also chosen to finally finish my automated website program with Python. By the end of this tutorial you’ll be able to:
It’s extremely easy to add a secure shopping cart to your website. Here I’ll show you how to make a shopping cart photo with Gimp, a free image editing application. I’ll also show you how to offer your visitors a Pay Pal Shopping Cart, and a bunch more.
Pay Pal makes it very easy to add an Add to Cart option. All you have to do is go on their site, add your price and shipping costs and then cut and paste some code. I describe how to do this step by step below.
I’m constantly asked for Sample Business Website Designs. So, I’m constantly compiling lists of the best in design. Here I present my top 65 favorite sample site designs of all time. I did my best to pick sites that didn’t look like the others on the list.
Do you have a favorite design not included here? Leave a comment below and I’ll add it to the list if I like it. If you like looking at Marketing Examples, you may also be interested in these fine articles:
Here is an enormous Yahoo Pipe. You can see it in it’s full size by clicking here Giant Yahoo Pipe.
I’m going to use it to explain how to perform many different data manipulations using Yahoo Pipes. Just so you know, Yahoo Pipes is used to pull data from websites, manipulate that data, create an RSS feed with that data, and then send it where ever you would like. For more information on Yahoo Pipes see my tutorial Yahoo Pipes Tutorial.
In the previous Yahoo Pipes Tutorial, I briefly described what every module does. In this article, I demonstrate how to do many useful things with Yahoo Pipes.
Remember, the ultimate goal is to create great custom feeds that will automatically get posted on our websites. I showed you how to do this in a previous article How to Make Money Blogging. With those techniques, I was able to make an extra $11 bucks, after all fees, for each site I made. Each site took less than 20 minutes to put together and then required no maintanence. With Yahoo Pipes pulling even better articles, I’m pulling in $26 on average.
On my mission to create a completely automated Money Making Blog, I discovered Yahoo Pipes. Yahoo Pipes provides you with the ability to take anything from any other site and use it however you see fit.
What really excites me about Yahoo Pipes is that it provides us a way to create an automated site! Imagine a site that is constantly updating with the most interesting stories and photos, and deals from all over the web. It’s not a fantasy anymore.
In a previous article, Post to WordPress, I showed you how you can post to your WordPress site by email. Yahoo Pipes will send you an email every time new information is gathered. See where I’m going? Now you just tell Yahoo Pipes what you want gathered, it gets it and then posts it directly on your website!
I was looking at alltop.com the other day. It’s a website that displays all the top headlines from many popular websites. You can see an example below, where I pulled the top 5 headlines from the New York Times.
Terry S asked, “How do I post to WordPress when I’m on the road? I need an easy way to post to WordPress from my Blackberry when I’m on the road. Can you help?”
There are many ways to post to WordPress, but I found you the perfect WordPress plugin for posting through your Blackberry. WordPress has a built in tool for posting to your WordPress account, but it is unsecure. I’ll tell you how to use it and then introduce a secure way to post to WordPress.
WordPress Post Via E-Mail Tool
This is a great tool except that if someone figures out your email, they can post to your WordPress site as well. If you choose to use it, you would need to follow these steps:
Click on Settings in your left side bar in WordPress
Click on the Writing link in the left sidebar
Scroll down till you see the title Post via e-mail
Create a random email address as it states in the description Ex. 38ZMSwbI@newthinktank.com
Enter your Mail Server, Port, Login Name, Password and Default Category you wish to associate with these posts
Now every time you send an email to this address, it will post directly to your WordPress site. Again, if someone gets this address, they can post to your WordPress account as well.
Post to WordPress Securely
There is a plugin that will allow you to post to WordPress securely. It’s called Postie. Postie will only except posts that come from specific email addresses. This makes it much more secure. Here is how you’d install Postie:
Login to your WordPress account
Click on Plugins in your left sidebar
Click on Add New
Search for Postie
Click on the Install Now link that is displayed
Click on OK, when you see the popup labeled, Are you sure you want to install this plugin?
Click Activate Plugin, once Postie is installed
Click on the link labeled, enter your email settings for it to work
How to Set Up Postie
Set up an email account, that you’ll only use to post to WordPress
Enter your port number for your web server. It’s probably 110
Enter your mail server address. You can get this from your web hosting company
Enter your userid
Enter your password
Define how often your WordPress system will check for a new email
Let the option labeled, Delete email after posting, set to yes
Click the Save Changes button
Click the Test Config button
Scroll down the page that opens and check that you see the line, Connect to Mail Host Yes
If there is a Yes, then everything is set up
Securing Postie
Click on the User tab, in the Postie Plugin page
Make sure, Allow Anyone To Post Via Email, is marked as No
In the box next to the words, Authorized Addresses, type in the email address you will be using
Click save changes
Setting Up Postie Message Defaults
By clicking on the Message tab, you can define the default:
Categories
Tags
Title
Whether to allow HTML, in the message
Many other options
Inserting Images with Postie
You can also define how images are handled. Click on the Image tab to define:
Whether to automatically insert image gallery
Whether to post images at the end of your post. I set this to no
I use the WordPress default for the template
I leave every other setting here, set to the default
Inserting Video and Audio
You can also insert any video and audio, that is attached. I use the medium_widescreen option for displaying video. If you choose simple_link, only a link to the video would be displayed. These options are totally up to you.
Defining Attachments
You can also attach files such as:
Word
Powerpoint
Excel
Pdf’s
If you click the Attachments tab, you can define what the icon’s will look like that link to these files.
Further Help with Postie
If you click the Help tab, you’ll find step by step directions on other ways to post to WordPress, with Postie.
Also you can copy articles from one site to yours using a tool called Press This. It can be found under tools, in your WordPress left side bar. Here is an article on Press This, Posting Articles with Press This.
That’s All Folks
I hope you enjoy this plugin. It provides a secure way to post to WordPress. If you have any questions or comments leave them below. If you want your specific question answered in a future article leave it below as well!
I’ve been asked many times to explain how to automate WordPress posting. You can see an example of what an automated WordPress site looks like by going to newjustin.com. This process should work no matter who hosts your site, but I’m going to explain how to do it using Go Daddy.
Special Note: This is the process taught by most of the internet gurus. You know the people who sell supposed get rich quick programs for a few thousand dollars?
How much money will this really make you? After a month, the site above generated about $18 in monthly revenue. I’m almost certain that the expensive programs generate almost as much money or less?
So, if you cut out the cost of hosting, $6.99 at Go Daddy, that is an extra $11 in your pocket per month. Multiply that times the number of sites you own and that number goes up significantly! Your welcome;) Note: After 3 months the blogs are now earning an average of $26.95!
If you don’t know what I mean by automating WordPress hosting? By installing a specific plugin called WP-O-Matic, you will be able to pull articles from any other site and have them post to your WordPress site. You do this by checking for changes in RSS feeds, but I found a way to pull data from sites that don’t have RSS feeds also. More on that later.
AutoBlogged is the professional feed grabber I talked about in the video. It is the best I have found, for the money.
Get and Set Up WP-O-Matic
If you don’t already have a WordPress site set up, watch the videos on this page How to Blog. Then just follow these steps to install the WP-O-Matic Plugin:
First Install SimplePie (Don’t worry about why)
In WordPress, click on Plugins in your left sidebar
Click on Add New in the left side bar
Search for SimplePie Core
Click on Install Now under SimplePie
If you get a popup that asks do you want to install SimplePie, click OK
Click Activate Plugin on the next page that pops up
Install WP-o-Matic
In WordPress, click on Plugins in your left sidebar
Click on Add New in the left side bar
Search for wp-o-matic
Click on Install Now under WP-O-Matic
If you get a popup that asks do you want to install WP-O-Matic, click OK
Click Activate Plugin on the next page that pops up
Under Settings, in your left side bar, click on WP-o-Matic
A setup screen opens
Yes SimplePie works on Go Daddy, but you can run the test if you’d like
You installed SimplePie in the last phase
Click next
Make sure your time zone is set and then click Next
Setting Up a Cron Job
Now don’t freak out. This sounds a lot more complicated than it is. You are basically just copying and pasting the code that is provided.
Copy the code that looks like this */20 * * * * /usr/bin/curl http://www.thewebdesignersite.com…
Login to your Go Daddy, or other hosting plan (The rest of the steps are specific to Go Daddy)
Click on My Account
Under My Products in your left sidebar, click on Hosting
Next to the hosting account you want to use, click Launch
Under Content at the top of your screen click on Cron Manager
Click on Edit, next to the Email Address heading and enter your email
Click save
Click Create Cron Job
Give the job a title
Paste in the command you got from WP-o-Matic
Set the frequency to zero for day and hour
Set minutes to 15 or whatever you’d like
Click Save
Create a Cache Folder in Go Daddy
Since you’re already in Go Daddy, you might as well set up a folder you’ll need later.
Click on the Home tab
Click on Your Files
Click on wp-content
Click on plugins
Click on wp-o-matic
Click on Create New Directory and give it the name cache
Click in the box next to the cache directory and click on the Permissions box
Click on the Advanced Permissions tab
Make sure all the box’s are ticked off under Owner Permissions, but leave the others alone
Click OK
Back to WP-O-Matic
Make sure the box is clicked next to the words “I’ll be using a cron job…”
Click Next
Click Submit
Set Up Options for WP-O-Matic
Click on the options link
Check off every box
Click Save
Link to a RSS Feed
Most websites you would want to take articles from have RSS feeds. The RSS feed just provides a list of the most recent articles and a brief description of the article.
You can find tons of feeds here Bloglines. Here are some of the most popular feeds:
Click on add campaign inside the WP-o-Matic plugin
Add a Title probably should be the name of the feed?
Click the Feeds tab and cut and paste the url for the chosen feed
Click the Categories tab and chose the category to associate the feed with
Use the Rewrite options if you’d like?
Under the Options tab set a custom template if you want?
Set your Frequency to 15 minutes
Leave everything as it is but make sure Post title links to source, is left unchecked
Click Submit and your done
Now What Happens?
Now every time your chosen feeds post new content, new content is posted on your blog. I think the revenue you are able to generate, is going to be heavily dependent on your domain name. So pick a good one and have it relate to the feeds you are pulling from.
How to Get Articles from Any Page
There is a tool at Feedity.com, that will turn any page into a feed. They have a free and pay plans at Feedity. The only difference lies in how often the feeds are updated and the number of feeds you can follow. I’m going to assume your using the free version. Here is how to create the new feed with Feedity:
Go to Feedity.com and set up a free account
I’m pulling every article with the term “dieting” in it from 212articles.com
Go to 212articles.com and type dieting in the search field
Copy the URL on the dieting page on 212articles.com
Click Create New Feed on the Feedity website
Click on Advanced Refine
I analyzed the code for the chosen page by clicking on View Source in my browser. Here is a sample of the code:
<div class=”Post”>
<div class=”PostHead”>
<h1><A href=’http://www.212articles.com/articles/11520/1/Dieting-For-Weight-Loss/Page1.html’>Dieting For Weight Loss</A>(Article)</h1>
</div>
<div class=”PostContent”>The most common reason that people cite for dieting today is weight loss While most of us would love to claim the noble mantle of dieting for health the vast majority of us are doing so for vanity</div>
</div><div class=”Post”>
I then pasted <div class=”PostHead”> into the area labeled Title Start, in Feedity. Because this HTML tag surrounded every title for every post.
Then I pasted <div class=”Post”> in the box labeled Block. This is the tag that surrounds both the title and the article description. Then click on Refine and the new feed is created for you.
Then you click on the Get Feed button after you chose an appropriate feed category.Feedity will provide a link to the new feed on the next page. It’s not wonderful, but it works?
Other Ways of Getting Feeds
Yahoo put out a service called Yahoo Pipes that allows you to pull information from sites. It is very interesting and I plan on covering it in a future article.
Yes There are Professional Feed Grabbers Better than WP-O-Matic
AutoBlogged is a professional feed grabber. It does pretty much everything you wish WP-o-Matic did:
It cuts the ads out of the feeds
It grabs additional content such as the article, video, images, etc.
It is extremely easy to use
If you want more info and a discount on AutoBlogged, click on the link below
I keep getting requests on how to create groups on Facebook. It’s actually very easy.Group creation on Facebook is also the only way I’ve seen people promote ideas or themselves successfully through Facebook.
Markus wrote in and said, “I’m having trouble finding nice looking Free WordPress Themes. What are the Best WordPress Themes? Can you also give me an easy way to install these themes?”
Here are the best Free WordPress Themes. These themes are free for use in anyway, as long as you don’t edit the footer area. If you don’t know what that means don’t worry about it.
I was asked by The Ripper, “I want to be able to pick the thumbnails used on YouTube. I’ve tried the math tricks for picking You Tube Thumbnails and they don’t work. How do you do it?”
Well Ripper, YouTube has made it hard for me to analyze this process completely by not allowing duplicate video uploads, but I did learn a good bit. And, I did find a way to increase the odds that you get a nice YouTube Thumbnail or Poster Frame using some common sense.