helasas.blogg.se

Bbedit for python
Bbedit for python













bbedit for python
  1. #Bbedit for python generator
  2. #Bbedit for python download

When you run this program, that it is what it will do. The fifth line tells Python to select a random element from the list named “numbers” and print it.

bbedit for python

The fourth line tells Python to select a random element from the list named “letters” and print it. The third line defines a list called “numbers” that is made up of numbers 1-5. The first line imports a function called “random” the second line defines a list called “letters” that is made up of the first five letters of the alphabet. Note that rando.py is only six lines long. If it doesn’t, right click it, select “open with” and open it TextWrangler or BBEdit.ġ1. It should automatically open with TextWrangler or BBEdit. Go back to the python folder on the desktop and double click the rando.py file. Now that we know it works, let’s look at rando.py in the text editor (TextWrangler or BBEdit) and see how.ġ0. This will run a simple program that chooses two elements from lists and prints them.Ĩ. In terminal, type python rando.py and press return. To see your current directory, type pwd (print working directory).ħ. You should see the following 4 files: once_more.py, once.py, rando.py, real.py if you don’t, make sure you are in the right directory. This will take you to the folder that you just saved to your desktop-if it doesn’t, then do this one step at a time: 1)cd desktop 2) cd python 3) cd fairy_talesĦ. In terminal, type cd desktop/python/ fairy_tales and press return. Double check to make sure it is on your desktop and named python.

#Bbedit for python download

Go to our dropbox folder and download the python folder to your desktop.ģ. Open Terminal but keep this window open and in sight (search for Terminal in Spotlight (upper right) or navigate to it: Applications/Utilities/Terminal. Run/execute Python scripts in terminal.ġ.Write/edit Python scripts with TextWrangler or BBEdit.

#Bbedit for python generator

For this lab, you will adapt or make your own fairy tale generator with Python.















Bbedit for python