Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,217,681 members, 8,035,108 topics. Date: Sunday, 22 December 2024 at 11:34 PM |
Nairaland Forum / Science/Technology / Programming / Help, A Python Just Attacked Me (1662 Views)
How To Convert A Python File (.py) To Exe (.exe) / Would I Go To Hell For Being A Python Programmer??? / Google Chairman Eric Schmidt Has Attacked Uk's Education System (2) (3) (4)
Help, A Python Just Attacked Me by gentleoyink: 10:02pm On May 06, 2012 |
Hello, do not mind the title. I actually need help learning somethings in python. I have installed Python 2.7 and I have a wonderful IDE to work with. As regards introductory level, I can say I have been able to grasp about 60%. Actually, I want to use Python for web programming, I need a new challenge after using PHP for sometime (u knw, that little kid by name Seun running around NL has made so much noise about it). I test locally on my computer using WAMP. After doing some search, I found out that I need to install mod_wsig. The problem I am facing is how to get one that is compatible with python2.7 and a windows 64bit operating system. Also, I tried installing MYSQLdb but ran into problems. I would also need help here too. Thank you for your time. |
Re: Help, A Python Just Attacked Me by Picomon(m): 12:02pm On May 07, 2012 |
I can't remember where you can download the MySQLdb. What I did to mine is this; --I'm using python 2.7 on windows OS(64-bit). --I connected my Python to my WAMPserver. To make things clear, I'm using django1.3. I created a db in my wampserver named 'Doog' so in my settings.py I fix things up like this; DATABASES = { 'default': { 'ENGINE': 'mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'Doog', # Or path to database file if using sqlite3. 'USER': 'root', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } ---After that, I went on to cd where my python script is: cd C:\Python27\Scripts\myapp and I run manage.py syncdb. Voila..I've been connected! Hope this helps? Let me know if you get my point! Happy coding. PS: Will try to help you get the link! |
Re: Help, A Python Just Attacked Me by gentleoyink: 3:18pm On May 07, 2012 |
Ok thank you. I will follow your advice. I downloaded the following form this site (http://www.lfd.uci.edu/~gohlke/pythonlibs/) setuptools, mysqldb and wsig. I have this question to ask. How do I connect Python to my WAMP Server? Thank you. |
Re: Help, A Python Just Attacked Me by gentleoyink: 3:39pm On May 07, 2012 |
I have installed the MySQLdb. I did the import MySQLdb test on Python and it was ok. I know I am not set already. I read somewhere that I would need to install mod_python(from what I read, this is not the best move) or mod_wsig. I have downloaded the mod_wsig but always run into error when I try to install it. I was also able to install django. |
Re: Help, A Python Just Attacked Me by Picomon(m): 7:00pm On May 07, 2012 |
Since you've installed django, try and click on cmd, after that cd the path where your python scripts folder is cd C:\python27\scripts. After that, try and input this: django-admin.py startproject myweb (anyname you want to call your project.) After you must have done that, go back to your python folder and click on scripts, then you will see the project folder you created. Click on the settings.py file and follow my first answer! Guess that will work. Let me know if dat helps. PS: Make sure you add the path to django, wamp, python folders to your environment variables. Go to control panel items--system--advanced system--environment variables--path under system variables--click on Path and edit--add the url to those folders. Like c:\python27\scripts;c;\wamp etc. |
Re: Help, A Python Just Attacked Me by gentleoyink: 11:00pm On May 07, 2012 |
ok I followed your steps and I was able to install django auth system. I ran into a little problem which I solved. I would like to state it here. I entered the engine name as in your first post as mysql and when I tried to run the manage.py it gave me some error messages. So I had to follow the instruction and instead of mysql I used django.db.backends.mysql |
Re: Help, A Python Just Attacked Me by Picomon(m): 11:07pm On May 07, 2012 |
Okay. What version of django are you using? |
Re: Help, A Python Just Attacked Me by gentleoyink: 11:16pm On May 07, 2012 |
did the import django and then print django.get_version() and gbam it printed 1.4 On a latter date, maybe tomorrow I will try to list the steps I took and the troubles I ran into so others can learn from my experience. Has anyone seen Seun the NairaLand kid? ok back to the title, I was attacked by a python, Picomon was there to help me fight the Python. But I think the Python is still alive. Picomon two of us go try kill this Python o. Thank you Picomon |
Re: Help, A Python Just Attacked Me by gentleoyink: 11:17pm On May 07, 2012 |
version is 1.4 |
Re: Help, A Python Just Attacked Me by Picomon(m): 7:48am On May 08, 2012 |
Oh I see. I'm using django1.3 thats why. Some changes have been made. Will switch to 1.4 as soon as I'm done with my projects. Happy coding. |
(1) (Reply)
Java Control Panel Not Responding On Window 8.1 / Java Spring CRUD Example Using One To One Mapping Of Two Tables / Kali Linux
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 25 |