fivestringsurf Posted November 13, 2010 Share Posted November 13, 2010 Why am I finding it impossible to get started with Python? Do I save it as a .py file? how do i "run" the file? Do i just open it in a browser like php? 2 days (hours and hours) worth of web searching for tutorials always results in command line jargon that is useless for any project/ authentic beginners project. I downloaded a komodo free trial...tried their tutorials...useless yet again??? I know Python is an iterpreted language so things will need to be run through an interpreter like php through apache but how does this all fit together? I will be using python for the web btw... background: I've written large scale projects (procedural and oop) from scratch in php and as3 for the past 3 years including membership sites, galleries, and custom CMS's. When i knew nothing about scripting...i remember installing xampp, opening up dreamweaver and typing some php. saving it and simply opening it up in the browser and Viola! I was writing php in under an hour. How can it be that I can't figure out anything regarding python? how do i run test files? I tried opening a .py file with a browser through apache...nothing. This seems like a big joke to me at this point. Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/ Share on other sites More sharing options...
Pikachu2000 Posted November 13, 2010 Share Posted November 13, 2010 Didn't you know that python is only for 1337 h4x0rs? I didn't read all the way through it, but this may help: http://docs.python.org/howto/webservers.html Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1133804 Share on other sites More sharing options...
fivestringsurf Posted November 13, 2010 Author Share Posted November 13, 2010 thanks for the reminder: I actually did read that entire page prior (2 times) and once more after you linked to it. What I got out of it was that python needs to be interpretted, like php and that there are frameworks built to dish out html/web code easier. but frameworks exist in php too; but ive never used them. Never liked frameworks. I always just wrote all my own code -different philosophy then most i guess but it has worked fine thus far. I was actually advised to learn django from a buddy who heads a web firm...so that i might be able to pick up some work with their company...but django wouldn't install (a bitNami package / I have windows xp)...either way i figured i could learn some python but haven't even come close to getting started...madness web stuff aside, I'm not sure how to run anything in python. I tried writing a simple script written in notepad...saving it as a ".py" file and opening it...nothing...opening it through apache...nothing. These "elites" you speak of sure make lousy teachers. The php community is loaded with superb tutorials. How come I can make a valid website that incorporates as3, js, php, MySQL, html, css, xml seemlessly and runs like a sportscar but can't even figure out how to get this python bull $#!T started... uhggg so mad right now. Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1133866 Share on other sites More sharing options...
RichardRotterdam Posted November 13, 2010 Share Posted November 13, 2010 I'd look into the mod_python[/url module specifically to make python run under apache. Also you might want to begin with command line py to see if it works and you Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1133895 Share on other sites More sharing options...
Daniel0 Posted November 14, 2010 Share Posted November 14, 2010 https://code.google.com/p/modwsgi/wiki/InstallationInstructions Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1133925 Share on other sites More sharing options...
fivestringsurf Posted November 14, 2010 Author Share Posted November 14, 2010 ok it looks like both of you are suggesting some kind of add-on for apache... I'm sure they both work fine but as always, the coder instructions assume too much prior knowledge. seriously... tar balls I try researching them only to find out they are derived from tape storage? Are they kidding me? why is it coders get caught in the earliest days of coding and insist on carrying all this antiquated stuff forward...almost as to confuse by means of a pseudo form of wisdom:" i know this from way back when so i am smarter than you" - I had some awful teachers growing up that subscribed to that theory. When looking into django they suggested visiting an irc channel if I needed help irc? irc=wtf. I think the last time i heard of irc was when my friend was talking to some russian on his amiga computer in the late 80s. why not have a normal web bulletin board like everyone else. No, once again "we know this, you don't so you are dumb" Mod_python not sure what to do (of course) what does the following mean: 1.Build and install a distributed Apache module, say mod_foo.c, into its own DSO mod_foo.so: $ ./configure --prefix=/path/to/install --enable-foo=shared $ make install Where the heck does this get typed into? A typewriter? modwsgi no dice (once again) To setup the package ready for building run the "configure" script from within the source code directory. ./configure how on earth do i "run" something? Are we going back to the BASIC language i was introduced to in 7th grade are we going to make the ^ symbol shoot up to the top of the page like a rocket? ahhhh...cool. everything i have ever opened on a computer, could be clicked on and opened ( i guess an .exe) but these modwsgi files don't even have extensions so i can't even research them; and the instructions are always useless and assume to much prior knowledge anyhow. hopefully my rant will at least get a chuckle out of someone; enough to explain something. Thanks for listening:) Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1134047 Share on other sites More sharing options...
Daniel0 Posted November 14, 2010 Share Posted November 14, 2010 Are you serious? Seeing as you're used to just clicking .exe files, I assume Windows. This is how you do it: If using Windows you can use the precompiled binaries available for download or compile from source code. Go download that: https://code.google.com/p/modwsgi/wiki/DownloadTheSoftware#Windows_Binary_Downloads Then: The appropriate mod_wsgi.so file for the version of Python and Apache being used should be copied into the Apache modules directory. For Apache 2.2, this would typically be directory: /Program Files/Apache Software Foundation/Apache22/modules [...] To configure Apache to make use of mod_wsgi, follow the instructions for loading mod_wsgi in the Quick Installation Guide. In the simplest case, all that is required is to add a line of the form: LoadModule wsgi_module modules/mod_wsgi.so into the main Apache "httpd.conf" configuration file at the same point that other Apache modules are being loaded. So basically: [*]Download file. [*]Add line to config file. [*]Restart Apache. How much more simpler do you want it to be? Quote Link to comment https://forums.phpfreaks.com/topic/218578-python-getting-started/#findComment-1134077 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.