[Tutor] urllib2 & form submit

2005-10-26 Thread Ed Hotchkiss
i am trying to write a class to log into myspace. either i am doing something wrong, or... myspace is requiring that i accept a cookie, or create a session? however i am new to urllib and urllib2.   heres my code: correctly formatted code is at: http://www.jeah.net/~marla/myspace.py   #!/bin/env p

[Tutor] downloading remote files

2005-10-25 Thread Ed Hotchkiss
is there a method in the stdlib of downloading a remote file via HTTP? or do i need sockets ...-- edward hotchkiss ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] python myspace module?

2005-10-25 Thread Ed Hotchkiss
looking to write a myspace wrapper/module. what is the best way (hopefully using the stdlib not an outside module) to connect to a website and (if possible, otherwise ill have to code it?) access forms with GET POST blah blah blah ...   thanks!-- edward hotchkiss

Re: [Tutor] identify python interpreters platform?

2005-10-25 Thread Ed Hotchkiss
print os.environ("OS") - i need to run it on diff platforms that i dont have with me now, but i think it should work fine, otherwise ill get a workaround then post it to the list. thanks   -edward ___ Tutor maillist - Tutor@python.org http://mail.pytho

Re: [Tutor] identify python interpreters platform?

2005-10-25 Thread Ed Hotchkiss
Well, on windows XP it returns "nt" for os.name and for sys.platform it returns win32. how can i determine win2k, xp, 9x, etc etc ...   -edward ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] identify python interpreters platform?

2005-10-25 Thread Ed Hotchkiss
how can i use the os module (or something else?) to determine what platform the interpreter is running on?-- edward hotchkiss ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] testing for modules?

2005-10-24 Thread Ed Hotchkiss
i have a generic script that is using several modules on windows and linux boxes. i need to have the scripts test if a module is installed, and then if not - then to install the module. can anyone give me a headsup on how to test for a module, returning something to indicate whether or not it is in

Re: [Tutor] Python DB

2005-09-22 Thread Ed Hotchkiss
i like MySQLdb - although I said that you hate MySQL. FreeSQL.org has a nice free MySQL server. I also have some example code if you would like from work that I did last week ...   -ed  On 9/22/05, Cedric BRINER <[EMAIL PROTECTED]> wrote: I love sqlobject.orgit this a wrapper between many sql imple

Re: [Tutor] OOP fundamentals

2005-09-20 Thread Ed Hotchkiss
s sincerely,__János Juhász> Message: 5> Date: Mon, 19 Sep 2005 17:01:30 -0400 > From: Ed Hotchkiss <[EMAIL PROTECTED]>> Subject: Re: [Tutor] OOP fundamentals> To: Danny Yoo <[EMAIL PROTECTED] >> Cc: Tutor <tutor@python.org>> Message-ID: <[EMAIL PROTEC

Re: [Tutor] OOP fundamentals

2005-09-19 Thread Ed Hotchkiss
Excellent, I'll be getting that book tomorrow! Thanks again, I'm doing a tutorial as we speak!   On 9/19/05, Danny Yoo <[EMAIL PROTECTED]> wrote: On Mon, 19 Sep 2005, Ed Hotchkiss wrote:> Thanks Danny! Tommorrow I am off to get "Programming for Python, 2nd > edition&quo

Re: [Tutor] OOP fundamentals

2005-09-19 Thread Ed Hotchkiss
Thanks Danny! Tommorrow I am off to get "Programming for Python, 2nd edition" and learn everything - all of it, before I even bother with Sockets. Afterall, I want python for EVERYTHING not just sockets and inet based scripts/applications.   I realized that I need to take a step back, make port s

Re: [Tutor] tuples and mysqldb tables (fwd)

2005-09-19 Thread Ed Hotchkiss
Thanks for the link! It is EXACTLY what I have been looking for. When I used to use Flash a bit, and did some actionscript they had a similiar setup for OOP (Do all languages use OOP so similiarly?) which I never learned. I'm doing these examples, and now I'm going to try and rework the code from t

Re: [Tutor] tuples and mysqldb tables

2005-09-18 Thread Ed Hotchkiss
  I was cheap and I skimmed through "programming python" then jumped off a cliff and went right into it with a ripped parachute. I did a tutorial today and I solved the problem. I'm having a problem with threads and sockets now ... I wrote a lot of code for this and it should work based on my under

[Tutor] tuples and mysqldb tables

2005-09-18 Thread Ed Hotchkiss
I have used fetchall() to insert the values from a table into a tuple. anywhere from 0 - ? many rows could be in this tuple, so it is a row within a row. How do I use a loops to iterate through the nested tuple, and assign the tuples integers and strings to variables, ugh :P   The Tables data is l

[Tutor] Best Encryption for Python Client/Server

2005-09-18 Thread Ed Hotchkiss
Let us say that I am trying to create a very small and simple private network/connection between several scripts on different machines, to communicate instructions/data/files etc. to each other over the net. Is SSL the best method? Any recommendations of something to get started with? Thanks in adv

Re: [Tutor] MySQLdb error - PLEASE SAVE ME!

2005-09-17 Thread Ed Hotchkiss
  I got the mysql db just for this very purpose, that's it :P Ok heres the error which I am getting now, I dont see why your new code shouldn't work, it makes sense to me ...     >>> Traceback (most recent call last):  File "G:\Python\myCode\Links Database\addfromtext.py", line 30, in ?    cursor.e

[Tutor] MySQLdb error - PLEASE SAVE ME!

2005-09-17 Thread Ed Hotchkiss
Ok. I am trying to read a csv file with three strings separated by commas.I am trying to insert them into a MySQL DB online.MySQLdb is installed, no problems.I think that I am having some kind of error with my csv going into the fields and being broken apart correctly. Can someone please help? Iatt

[Tutor] running scripts with windows

2005-09-14 Thread Ed Hotchkiss
Hi everyone, I'm home for the next few weeks while I'm learning Python, and I'm not on a *NIX box, I'm using windows. How the hell do I run a Python script? Sorry if this is a 'dumb question'. -- edward hotchkiss ___ Tutor maillist - Tutor@python.org h