Downloading Python (1 of 4) • How do we get this cool Python interpreter? It’s not only cool, it’s free. • For this class we will use Python 3.5.2 If your computer already has Python, please check that it’s Python 3.5.2. If you don’t have Python or don’t have the correct version, follow these steps to download it: 1. Go to https://www.python.org/downloads/release/python-352/ 2. Scroll to the section called Files and click to select the installer for the type of operating system you have (Windows, Mac, or Linux). Then click on Save File to download the installer on your computer. When done: On a Windows computer, look for the icon: On a Mac, look for the icon:
Introduction to Python Spring 08: different levels of programming and computational experience and the best way to cover this topic was through independent learning. Handouts and Python and BioPython tutorials (www.python.org, www.biopython.org), worked each at their own pace. Grading rubrics for each programming concept, minimal requirements to pass the specific concept, list of more advanced examples for students with prior Python experience. Students with previous Python knowledge further advanced their experience and students new to Python learned the new programming language independently using structured guidance. Python provides an opportunity to solve some problems in very short ways, and it was a very enjoyable experience for students to try to find a shortest solution for the proposed problems using Python functions and libraries.
Introduction to Computing Using Python Our tools A computer language (Python) Instant task: Go to python.org and read about Python language, see how to download Python The Python shell Instant task: start the Python shell and type in a few expressions The Python editor Instant task: open a new window, write some text and save the file
Why Python Python is largely based off of the scripting language of C++ and Java. Python has focused primarily to make the coding and executions themselves easier than its counterparts. Statements are terminated by end-of-line, and block structure is indicated by indentation. To those familiar with coding, Python programs resemble to that of pseudo-code. This makes it a basis and a must have for beginner programmers due to its extreme ease a difficulty when compared to C++ Java, Perl, and so forth. As explained before, Python is dynamically typed, so there isn’t need for variable declarations like C++ or Java. The only setback with trying to make Python easier to write is that it takes a hit in runtime. Python programs generally run slower than others like Java, but take much less time to develop. In general, Python programs are 3 to 5 times SHORTER than equivalent Java programs.
Python Programming Language • Our main activity in this class is to write a set of instructions (which make up a program) that the computer can follow to successfully complete a specified task. • In module 1 we found that computers “speak” in the binary language, where all data are 1’s and 0’s. But luckily we don’t have to write our instructions for the computer in binary. • Instead we use the Python programming language, which is similar to the English language (print (“hello”) is a Python statement) or math language (2 + 3 is another statement). • Python itself is a program that have been written to do a task. Its task is to be an interpreter: to take our instructions that are written in the Python language and translate them into binary so that the CPU can understand them and run them. print “hello” Python interpreter Instruction in Python language 100100110100100 Instruction in binary language
Python Script (1 of 2) • The shell provides an easy way to write a line of Python code, run it, and debug it. • However, when we have multiple Python statements to run one after another, it is easier to type all the statements in a file, save the file, and ask the shell to run the entire file for us. • When multiple Python statements are put together in a file, the file is called a program, or more specifically, a Python script. • A Python script can have a name, and the name must end with the extension .py • When there are multiple lines of code in a script, the Python interpreter runs one line at a time, in the order from the top to the bottom of the file, until all the statements have run. • If there is an error in the file, the CPU stops running the code and prints a corresponding error message.
18. Python - GUI Programming (Tkinter) Python provides various options for developing graphical user interfaces (GUIs). Most important are listed below: • Tkinter: Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We would look this option in this tutorial. • wxPython: This is an open-source Python interface for wxWindows http://wxpython.org. • JPython: JPython is a Python port for Java, which gives Python scripts seamless access to Java class libraries on the local machine http://www.jython.org.
• • • • • • python.oz=c(1.13, 1.02,1.23,1.06,1.16) python.g=28.35*python.oz mean(python.oz) mean(python.g) sd(python.oz) sd(python.g) • You could of course calculate the mean in g by multipying the mean in oz with 28.35
Introduction to Computing Using Python Our tools A computer language (Python) Instant task: Go to python.org and read about the language, see how to download Python The Python shell Instant task: start the Python shell and type in a few expressions The Python editor Instant task: open a new window, write some text and save the file
Support in the Community Tribon Solutions in Maritime Industry which designs ship building processes from their very first concept to the finished ship had run into a problem. Shipyards try to lower cost by using as much standardized and parameterdriven designs as possible, and software vendors’ biggest problem is that the design principles are different at each yard due to factors like the type of ship, facilities, experience, and national regulations and standards. The solution was to make it easy for shipyards to develop their own functionality based on Tribon core technology. In order to archive this, Tribon had to create an API that was platform independent, easy to use and understand, and was extendable end embeddable. Of course, this led them to choose Python as their programming language. “During investigation of options, Python was discovered quite early when a member of the development team read about Python in a computer magazine. After some initial experimentation there were really no other contenders. Python had it all. It was a beautiful programming language that was extensible, embeddable, platform independent, and had no license cost. When it came to incorporate Python into the Tribon software, we found the integration to be quite easy and problem-free, and it was achieved with very little effort. The result of this merge between Tribon and Python was named Tribon Vitesse, and the first version of Python used was 1.2”.
Learning Resources Python wiki (home page) Python is a interpretive programming language that is about as easy to learn as any. It is heavily used by computer scientist as well as researchers in the other STEM areas. Biology, Physics and Engineering are popular areas where this is applied. •PythonLearn Tutorial (includes videos, powerpoints etc) •Book:Python for Informatics by Charles Severance. •Book:Think Python by Allen Downey •Python Tutorial by UDEMY Python Lectures by Pattis (These are really a nice collection of lectures that are worth reading) Python is in Visual Studio 2013. You can use Ubuntu (see ubuntu notes)
Run Python To run Python on your computer: 1.Find the icon for Python and click to start Python On the Mac: Go to the /Applications folder and then the Python3.5 folder, then click on the IDLE icon: On Windows: Go to the Start menu, click on the IDLE icon: Depending on the Windows version, you may need to first find IDLE in your list of Apps, and under Python 3.5. Then pin it to the Start menu before you can see it in the Start menu. 2. Python starts running by showing the window for IDLE, the default development environment:
Identification of Amino Acids that are Critical for Structural Stability and Functionality within the Heterodimerization (HD) Domain of Notch Proteins Marina Pellón Consunji and Lucien Celine Montenegro Advisor: Dr. Didem Vardar-Ulu Wellesley College, Massachusetts Results Introduction The integral role Notch proteins play in the normal development and tissue homeostasis of metazoans is orchestrated through the tightly regulated proteolytic processing of their Negative Regulatory Region (NRR) (Figure 1). Ligand binding at an extracellular region activates Notch by facilitating a proteolytic cleavage at the heterodimerization (HD) domain within the NRR. This cleavage is a prerequisite for the subsequent intramembrane cleavage that permits the translocation of the intracellular region of Notch to the nucleus to activate transcription. In this work we present the algorithms we have developed to evaluate the relative importance of specific amino acids for the structural stability and functionality of the human Notch 2 (hN2) HD domain. These include predictive models derived from bioinformatic analysis as well as experimental data from circular dichroism (CD), C18 reverse phase high performance liquid chromatography (C18 HPLC), and mass spectrometry (MS) studies that compare the wild-type HD domain with L1573P and L1625P, two mutants identified in leukemia patients.1,2 Our results provide valuable insight to the mechanism of Notch activation. hN2 HD WT hN2 HD L1573P MW –IPTG +IPTG Ni Elution -IPTG + IPTG Ni Elution hN2 HD L1625P . –IPTG +IPTG Ni Elution His-WT 22 kDa WT Table 1. For every amino acid position in hN2 HD WT, report of prevalence of physicochemical properties. 126 protein sequences found to be common to the BLAST results of hN1, hN2, and hN3 were multiple sequence aligned based on BLAST results to hN2 HD. Each of the four columns for every amino acid position report the prevalence of one of the four physicochemical properties studied (PS, NG, PL, NP). White: < 25%; yellow: 25-50%; orange: 50-75%; red: >75%. For specific amino acid groupings, see Python under Experimental Methods. Marked with a red arrow are L1573P and L1625P, positions that have been mutated in this study. 7,8 hN2 Position hN2 Identity 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 * (B.) (A.) Figure 2. hN2 WT, L1573P, and L1625P purification. (A.) Expression and nickel affinity purification of recombinant hN2 HD domains (wildtype: WT and two mutants: L1573P, L1625P) in E. Coli. –IPTG: cell lysate prior to IPTG induction; +IPTG: cell lysate four hours post-IPTG induction; Ni Elution: Protein sample eluted from a nickel affinity chromatography column; MW: Protein molecular weight marker. Differences in band intensity reflect variations in volumes of sample loaded. *migration position of the expressed HD domain. (B.) hN2 HD WT C18 HPLC purification. The identity of the different peaks was confirmed by mass spectrometry analysis. (A.) q L1625P L1625P L1573P 90° rotation L1573P E N L A E G T L V I V V L M P P E Q L L Q D A R S F L R A L G T L L H T N L R I K R D S Q G % PS 0.00% 51.61% 0.00% 0.00% 12.00% 2.00% 1.68% 0.00% 0.84% 0.00% 0.84% 0.00% 10.92% 0.00% 11.76% 0.00% 8.33% 2.50% 0.00% 45.83% 15.00% 4.17% 2.50% 23.33% 18.18% 0.00% 0.00% 89.26% 8.26% 0.00% 0.00% 44.63% 1.65% 0.00% 95.87% 0.00% 0.83% 0.83% 46.28% 0.83% 98.35% 71.67% 1.67% 4.20% 23.33% 1.65% % NG 98.25% 3.23% 0.00% 0.00% 57.00% 2.00% 0.84% 0.00% 0.84% 0.00% 0.84% 0.00% 0.00% 0.00% 15.13% 0.00% 63.33% 19.17% 0.00% 16.67% 8.33% 25.00% 0.00% 0.00% 5.79% 0.00% 0.00% 0.00% 40.50% 0.00% 0.83% 0.00% 3.31% 0.00% 0.83% 0.00% 0.00% 0.00% 0.83% 0.00% 0.00% 0.83% 90.00% 9.24% 21.67% 0.83% % PL 1.75% 45.16% 0.00% 0.00% 3.00% 0.00% 63.03% 0.00% 19.33% 0.00% 5.04% 0.84% 1.68% 1.68% 21.85% 0.83% 8.33% 52.50% 0.00% 1.67% 67.50% 58.33% 56.67% 8.33% 42.98% 0.00% 0.00% 9.92% 14.88% 0.83% 68.60% 26.45% 17.36% 0.00% 2.48% 82.64% 79.34% 0.00% 5.79% 0.00% 0.00% 9.17% 8.33% 43.70% 36.67% 4.13% %NP 0.00% 0.00% 100.00% 100.00% 28.00% 96.00% 34.45% 100.00% 78.99% 100.00% 93.28% 99.16% 87.39% 98.32% 51.26% 99.17% 20.00% 25.83% 100.00% 35.83% 9.17% 12.50% 40.83% 68.33% 33.06% 100.00% 100.00% 0.83% 36.36% 99.17% 30.58% 28.93% 77.69% 100.00% 0.83% 17.36% 19.83% 99.17% 47.11% 99.17% 1.65% 18.33% 0.00% 42.86% 18.33% 93.39% hN2 Position hN2 Identity 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 E L M V Y P Y Y G E K S A A M K K Q R M T R R S L P G E Q E Q E V A G S K V F L E I D N R Q % PS 28.93% 0.00% 3.36% 0.00% 3.36% 0.00% 0.85% 23.68% 4.63% 11.22% 61.26% 5.45% 1.02% 0.91% 7.27% 50.00% 61.61% 24.32% 37.84% 8.04% 31.19% 67.54% 45.95% 10.91% 11.01% 3.81% 26.53% 12.75% 10.00% 18.00% 15.69% 9.43% 1.87% 25.00% 0.86% 0.00% 20.51% 0.00% 4.27% 0.00% 0.00% 0.00% 0.00% 0.00% 81.36% 45.76% % NG 19.01% 26.05% 0.00% 0.00% 2.52% 0.00% 0.00% 2.63% 9.26% 33.67% 23.42% 25.45% 21.43% 30.91% 1.82% 25.00% 23.21% 1.80% 13.51% 1.79% 2.75% 3.51% 8.11% 4.55% 0.00% 2.86% 5.10% 50.98% 18.00% 52.00% 5.88% 61.32% 0.00% 0.89% 0.00% 0.00% 0.00% 0.00% 0.00% 0.00% 81.20% 0.00% 99.15% 0.00% 0.00% 0.00% % PL 41.32% 30.25% 0.00% 0.00% 0.84% 12.50% 0.00% 1.75% 2.78% 44.90% 10.81% 43.64% 26.53% 21.82% 13.64% 16.07% 10.71% 57.66% 9.01% 4.46% 28.44% 15.79% 27.93% 50.91% 5.50% 5.71% 7.14% 21.57% 60.00% 17.00% 54.90% 8.49% 18.69% 23.21% 0.00% 64.96% 19.66% 1.71% 0.85% 0.85% 1.71% 0.00% 0.85% 85.59% 17.80% 41.53% % NP 10.74% 43.70% 96.64% 100.00% 93.28% 87.50% 99.15% 71.93% 83.33% 10.20% 4.50% 25.45% 51.02% 46.36% 77.27% 8.93% 4.46% 16.22% 39.64% 85.71% 37.61% 13.16% 18.02% 33.64% 83.49% 87.62% 61.22% 14.71% 12.00% 13.00% 23.53% 20.75% 79.44% 50.89% 99.14% 35.04% 59.83% 98.29% 94.87% 99.15% 17.09% 100.00% 0.00% 14.41% 0.85% 12.71% hN2 Position hN2 Identity 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 C V Q D S D H C F K N T D A A A A L L A S H A I Q G T L S Y P L V S V V S E S L T P E R T Q % PS 0.00% 2.91% 10.58% 1.02% 4.17% 0.00% 30.21% 0.00% 0.00% 27.18% 4.85% 0.00% 4.95% 0.99% 0.00% 0.00% 3.96% 0.99% 0.00% 0.99% 10.89% 32.67% 1.98% 0.00% 30.30% 11.24% 11.63% 0.00% 5.62% 0.00% 1.12% 0.00% 19.54% 2.30% 0.00% 28.00% 1.33% 4.17% 2.99% 4.92% 1.69% 0.00% 38.89% 52.94% 0.00% 8.00% % NG % PL % NP 0.00% 100.00% 0.00% 0.97% 27.18% 68.93% 24.04% 56.73% 8.65% 36.73% 44.90% 17.35% 0.00% 76.04% 19.79% 42.71% 46.88% 10.42% 21.88% 45.83% 2.08% 0.00% 89.32% 10.68% 0.00% 0.00% 100.00% 17.48% 38.83% 16.50% 12.62% 70.87% 11.65% 0.00% 30.69% 69.31% 41.58% 45.54% 7.92% 44.55% 16.83% 37.62% 0.00% 0.00% 100.00% 0.00% 0.00% 100.00% 24.75% 5.94% 65.35% 0.00% 10.89% 88.12% 0.00% 0.00% 100.00% 0.00% 0.99% 98.02% 0.00% 19.80% 69.31% 1.98% 13.86% 51.49% 1.98% 24.75% 71.29% 0.00% 41.00% 59.00% 0.00% 34.34% 35.35% 16.85% 7.87% 64.04% 3.49% 72.09% 12.79% 0.00% 2.33% 97.67% 12.36% 68.54% 13.48% 0.00% 0.00% 100.00% 0.00% 0.00% 98.88% 0.00% 0.00% 100.00% 26.44% 2.30% 51.72% 16.09% 49.43% 32.18% 0.00% 1.15% 98.85% 1.33% 32.00% 38.67% 1.33% 82.67% 14.67% 88.89% 6.94% 0.00% 1.49% 58.21% 37.31% 6.56% 0.00% 88.52% 54.24% 32.20% 11.86% 0.00% 0.00% 100.00% 22.22% 13.89% 25.00% 0.00% 26.47% 20.59% 0.00% 93.33% 6.67% 8.00% 84.00% 0.00% Conclusions and Future Directions (A.) (B.) (C.) Figure 1. (A.) Overview of Notch signaling with the domain organization of the Negative Regulatory Region (NRR) bracketed in pink.3 (B.) X-Ray diffraction structure of the Negative Regulatory Region (NRR) of Notch with the Heterodimerization (HD) domain bracketed orange.3 (C.) Energy minimized model of the wildtype HD domain of Notch2 (see Molecular Modeling and Energy Minimization under Computational Methods).4,5,6 Methods Experimental Computational Protein expression Recombinant hN2 HD wildtype (WT), and L1573P and L1625P domains were expressed as Nterminally His-tagged protein using a modified pET21a+ vector that contained a TEV cleavage site between the Nterminal His-tag and the protein of interest. Molecular Modeling Default SWISSMODEL4 settings were used for modeling WT, L1573P, and L1625P. The XRay diffraction structure of hN2 NRR (PDB ID#: 2OO4.pdb) was used as the template structure. All structures are visualized using PyMOL5. Protein purification Expressed protein was solubilized and separated from insoluble components through several sonication and centrifugation steps. Initial purification was performed through nickel affinity chromatography. His-tag was then removed via overnight TEV cleavage. Final purification was performed by C18 HPLC. Purified protein identity was confirmed by MS. Energy Minimization Energy minimizations were performed on WT, L1573P, and L1625P using the conjugate gradient method. Coulombic and van der Waals interactions were cut off at 1.0 nm. Analyses were performed using the tools available in the GROMACS suite.6 (B.) (C.) Figure 3 (A.) Swissmodel and GROMACS modeling of the wildtype HD domain of Notch 2 (WT). Mutated amino acids L1573 and L1625 are shown in dark blue stick model. (B.) Superposition of L1573P and L1625P, the two mutants used in this experiment with WT. Residues L1573 and L1625 in WT are in dark blue line model; in mutants proline point mutations are in magenta stick model. Modeling results did not reveal significant perturbations to the secondary structure around the mutations or elsewhere in the HD domain. (C.) Same as (B.) with most of the hydrophobic core of the HD domain highlighted in cyan. Amino acids found to have less than 10% solvent accessibility, including L1573 and L1625 are in dark blue and L1573P and L1625P in magenta, shown in space-fill model. A few of the hydrophobic core residues are not displayed for clarity of the location of the two leucines under investigation. L1573 and L1625 partake in the hydrophobic core of the HD domain, and are thus predicted to be crucial to the maintenance of its stability. amino acids of hN2 HD, the insertions encountered upon comparison of the 126 homologous proteins and hN2 were excised.7 Python A Python program was developed for determining the prevalence of positive (PS), negative (NG), polar (PL), and nonpolar (NP) amino acids at each amino acid position. For this work, PS: R, H, and K; NG: D and E; PL: S, T, N, Q, and C; and NP: G, P, A, V, I, L, M, F, W, and Y.8 CD data Our preliminary results indicate qualitative secondary structure differences between WT and the mutants, L1573P and L1625P. We will complete quantitative analysis of this CD scan data to evaluate the significance of these differences. Since the multiplicity of steps in the protein purification protocol resulted in very low protein yields and very dilute protein concentrations for performing CD experiments, we are currently expressing and purifying the His-tagged versions of these proteins to repeat the experiments. In addition, we only had enough protein to perform the thermal melt for L1573P, which showed a significant degree of destabilization (ΔTm ~18 C°) when compared to HD WTdel. We will also repeat the unfolding experiments using the His-tagged versions of WT, L1573P, and L1625P. Amino acid conservation and stability Our table indicates that many positions along the HD sequence are highly conserved. When these positions are mapped onto the HD structure (Figure 6), they correspond very well with the residues that make up the hydrophobic core (Figure 3C). Based on L1573P and L1625P experimental findings and calculation of prevalence of physicochemical properties we will select further mutations to test experimentally. Figure 6. For every amino acid position in hN2 HD WT, mapping of prevalence of physicochemical properties to hN2 HD structure. See Table 1 for more details. 4,5,6 Acknowledgements BLAST Default BLAST settings were used to identify 126 Circular dichroism (CD) Measurements Spectra are the sequences that are common to hN2, hN1, and hN3 HD average of five scans taken at 20 °C between 198 and 260 BLAST results.7 nm, with 1 nm steps, using 1 nm bandwidth and averaging Multiple Sequence Alignment The 126 homologous time 5 s for each wavelength in a 0.1cm cuvette. All spectra sequences were aligned based on BLAST results to hN2 were baseline corrected against the same buffer scan. HD. In order to maintain the alignment with the 138 Circular dichroism (CD) Thermal Unfolding Thermal unfolding was monitored by CD signal at 217 and 222 nm. Protein samples were prepared identical to those for the CD scans. Thermal unfolding was performed from 4 C° to 90 °C, in 1 C° increments using an equilibration time of 1 min at each temperature step, followed by a dataaveraging time of 25 s at each degree in a 1 cm cuvette. Modeling Our modeling results showed no significant structural differences between the hN2 HD WT and the mutants. However, our modeled HD WT domain had a significant backbone RMSD from the template (RMSD = 0.49). Therefore, we will repeat modeling with additional energy minimization followed by molecular dynamics protocols. We would like to thank the Blacklow Laboratory at Brigham and Women’s Hospital/Harvard Medical School for Circular Dichroism Instrument time and the Wellesley College Chemistry Department for supporting our research through the Beck Fellowship. Tm = ~62 Figure 4. Superposition of the circular dichroism spectra from the hN2 HD WT, and L1573P and L1625P mutants. Protein samples (~1040 uM) were resuspended in 25 mM phosphate buffer at pH 7.0 and 100 mM NaCl. Spectra were corrected for concentration differences across samples. Preliminary results indicate qualitative differences in secondary structure among the three HD domains studied. Quantitative analysis is ongoing. References Tm = ~80 Figure 5. Comparison of the thermal unfolding of L1573P with HD Wtdel monitered at 217 and 222 nms. HD WTdel is a WT hN2 HD domain with an excised furin loop. Thermal unfolding midpoints (Tm) were estimated as the midpoint between the unfolded and folded baselines shown in the figure with dashed lines. The T m determined from the ellipticity at two wavelengths (217 and 222 nms) for each construct is the same. Compared to HD WTdel, L1573P mutant is destabilized (ΔTm ~18C) consistent with our modeling results showing tight packing of these residues within the hydrophobic core. 1. 2. 3. 4. 5. 6. 7. 8. Malecki, M.J., et al., Leukemia-associated mutations within the NOTCH1 heterodimerization domain fall into at least two distinct mechanistic classes. Molecular and Cellular Biology, 2006. 26(12): p. 4642-4651. Weng, A.P., et al., Activating mutations of NOTCH1 in human T cell acute lymphoblastic leukemia. Science, 2004. 306(5694): p. 269-271. Gordon, W.R., et al., Structural basis for autoinhibition of Notch. Nature Structural & Molecular Biology, 2007. 14(5): p. 455-455. Arnold K., et al., The SWISS-MODEL Workspace: A web-based environment for protein structure homology modelling. Bioinformatics, 2006. 22: pp.195-201. http://swissmodel.expasy.org//SWISS-MODEL.html DeLano W.L., The PyMOL Molecular Graphics System, 2002. http://www.pymol.org Hess B., et al., GROMACS 4: Algorithms for highly efficient, load-balanced, and scalable molecular simulation, J. Chem. Theor. Comp., 2008. 4: pp. 0. http://www.gromacs.org/ Gertz, E.M., BLAST Scoring Parameters, 2005. http://blast.ncbi.nlm.nih.gov/Blast.cgi Python Software Foundation, Python 2.5.1, 2007. http://www.python.org/
Running Programs on UNIX Call python program via the python interpreter % python fact.py Make a python file directly executable by • Adding the appropriate path to your python interpreter as the first line of your file #!/usr/bin/python • Making the file executable % chmod a+x fact.py • Invoking file from Unix command line % fact.py
Running Programs on UNIX Call python program via the python interpreter % python primes.py Make a python file directly executable by • Adding the appropriate path to your python interpreter as the first line of your file #!/usr/bin/python • Making the file executable % chmod a+x primes.py • Invoking file from Unix command line % chmod a+x primes.py
Web Server Design Considerations • • • Apache – Most used free web server software – Free with an extensive set of software packages – No previous programming experience – Many extra features that we do not need for our system ↓ Django + Python – Python is an interpreted language and it supports object oriented programming – One of the goals of the Python language is rapid development and deployment which makes it very suitable for our prototype development – Django works with Python to quickly design and implement a complex web server using native Python code – Web server development with Django focuses on a database driven design which is perfect for our prototype since database access will be the primary function of our TUT web site ↓ Information Interchange Service (IIS) – The next most used free web server software – Included with newer windows server packages as well as XP Pro service pack 2, Vista, and Windows 7 – IIS has many advantages over Apache in that it is easily integrated with other Microsoft products – Highly scalable and would be a very good option for a future commercial release of the TUT system – Quicker and easier to use than Django / Python -> We will use IIS ↑
Python Features (cont’d) • Portable: Python can run on a wide variety of hardware platforms and has the same interface on all platforms. • Extendable: You can add low-level modules to the Python interpreter. These modules enable programmers to add to or customize their tools to be more efficient. • Databases: Python provides interfaces to all major commercial databases. • GUI Programming: Python supports GUI applications that can be created and ported to many system calls, libraries, and windows systems, such as Windows MFC, Macintosh, and the X Window system of Unix. • Scalable: Python provides a better structure and support for large programs than shell scripting.