Re: [Tutor] (no subject)
You may also need to add it to your system environmental list. Under System variables you will want to add the directory where python is. Mine looks like this: c:\ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Python25\ Just my two cents. HTH, On 5/18/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "Luke Paireepinart" <[EMAIL PROTECTED]> wrote > Please never again write a message to this mailing list without a > subject. > For those of us who have threads turned on, it becomes quite > cumbersome. FWIW I have the same problem reading via gmane. It was telling me there were unread messages but I couldn't see them till I scrolled way back in the history to find the old thread. Its not a killer but it is inconvenient in a threaded reader. Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Daniel McQuay boxster.homelinux.org H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] smtplib howto send with a subject line
Hey Guys, I'm having a problem with my script that sends out an email using smtplib. Whats happening now is when it is send I get a (no subject) where the subject line should be. I checked a few places such as effbot and some other online doc but couldn't find any thing about the subject line. Any help would be much appreciated. ### #Created by: Daniel McQuay #This script will send and email #to verify if the backup was #successful or not. ### import smtplib import sys emmssg = "/tmp/backup.log" smtpserver = 'localhost' AUTHREQUIRED = 0 smtpuser = '' smtppass = '' #Recipients who will be getting the emails RECIPIENTS = ['[EMAIL PROTECTED]'] SENDER = 'Saint_Richards' #This does not work? SUBJECT = 'Backup_Log' emmssg = open('/tmp/backup.log','r').read() session = smtplib.SMTP(smtpserver) if AUTHREQUIRED: session.login(smtpuser, smtppass) smtpresult = session.sendmail(SENDER, RECIPIENTS, SUBJECT, emmssg) if smtpresult: errstr = "" for recip in smtpresult.keys(): errstr = """Could not delivery mail to: %s Server said: %s %s %s""" % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr) raise smtplib.SMTPException, errstr Thanks in advance, -- Daniel McQuay Jaluno.com H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] smtplib howto send with a subject line
Thanks Mike, it seems that I'll be easy to incorporate that into my script as well. I'll give it a try. I'm still open to other suggestions, though. On 5/23/07, Mike Hansen <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Daniel McQuay > Sent: Wednesday, May 23, 2007 1:49 PM > To: tutor@python.org > Subject: [Tutor] smtplib howto send with a subject line > > Hey Guys, I'm having a problem with my script that sends out > an email using smtplib. Whats happening now is when it is > send I get a (no subject) where the subject line should be. I > checked a few places such as effbot and some other online doc > but couldn't find any thing about the subject line. > > Any help would be much appreciated. > > ### > #Created by: Daniel McQuay > #This script will send and email > #to verify if the backup was > #successful or not. > ### > > import smtplib > import sys > > emmssg = "/tmp/backup.log" > smtpserver = 'localhost' > AUTHREQUIRED = 0 > smtpuser = '' > smtppass = '' > > #Recipients who will be getting the emails > RECIPIENTS = ['[EMAIL PROTECTED]'] > > SENDER = 'Saint_Richards' > > #This does not work? > SUBJECT = 'Backup_Log' > > emmssg = open('/tmp/backup.log','r').read() > > session = smtplib.SMTP(smtpserver) > if AUTHREQUIRED: > session.login(smtpuser, smtppass) > smtpresult = session.sendmail(SENDER, RECIPIENTS, SUBJECT, emmssg) > > if smtpresult: > errstr = "" > for recip in smtpresult.keys(): > errstr = """Could not delivery mail to: %s > > Server said: %s > %s > > %s""" % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr) > raise smtplib.SMTPException, errstr > > Thanks in advance, > > -- > Daniel McQuay > Jaluno.com > H: 814.825.0847 > M: 814-341-9013 > It seems a little easier to use the email module along with the smtp module to create and send a message. http://docs.python.org/lib/node162.html Mike ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Daniel McQuay Linux Jedi Jaluno.com H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] smtplib howto send with a subject line
Thanks a lot Mike you have been very helpful. I gave that a try in a few different ways but, with the same results. I'm going to try your first example. Best Regards, On 5/23/07, Mike Hansen <[EMAIL PROTECTED]> wrote: > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Daniel McQuay > Sent: Wednesday, May 23, 2007 3:52 PM > Cc: tutor@python.org > Subject: Re: [Tutor] smtplib howto send with a subject line > > Thanks Mike, it seems that I'll be easy to incorporate that > into my script as well. > > I'll give it a try. I'm still open to other suggestions, though. > Take a look at this link again(I think you said you looked at it.) http://effbot.org/librarybook/smtplib.htm Notice that the body string has From:, To:, Subject: followed by the from, to, and subject. body = string.join(( "From: %s" % FROM, "To: %s" % TO, "Subject: %s" % SUBJECT, "", BODY), "\r\n") You might need to do something similar to get your subject line although without the string module since the string methods are built in. I'm no expert on how to construct e-mail messages, so take this with a grain of salt. I'm but a simple caveman programmer(*). Mike * - Phil Hartman "I'm but a simple caveman lawyer" SNL _______ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Daniel McQuay Jaluno.com H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] trouble with indents
I would recomend you take a look at Alan Gauld's tutor. That is what got me started and I was able to catch on fairly quick even with little to no programming experience. http://www.freenetpages.co.uk/hp/alan.gauld On 5/28/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "adam urbas" <[EMAIL PROTECTED]> wrote in > I'm not sure when to indent. I understand that it has to be done. Ok, But you need to understand *why* it has to be done. To do that you need to understand the basic constructs of programming: sequences, branches, loops and modules. (these are described in the concepts section of my tutorial) Basically each construct is defined by indenting in python. Thus if you have a loop in your code the set of instructions to be repeated is indented. This makes it visually clear what gets repeated. More importantly it tells the Python interpreter what it should repeat! Thus, simplistically, you need to indent anything following a colon. That is after a branch instruction: if/elif/else or a loop: for/while or a function(module) definition: def or inside a class: class The next trick is to determine when to stop indenting and that's actually harder to describe! Its basically when you want Python to stop treating your code as special - eg no longer part of the code to be repeated in a loop. > I need somewhere to start from the beginning. There are several non-programmers tutorials (including mine :-). Try one of them. http://wiki.python.org/moin/BeginnersGuide/NonProgrammers Dive Into python is an excellent book for experienced programmers or after you have gone through one of those listed above. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Daniel McQuay Linux Padawan Jaluno.com H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Automating Windows (Maintenance)
Hey guys, I wondering if any one uses Python to do such things as defragment, clean up temp files, check for hard drive errors, check for unusual processes running, and so on. I am in charge of maintaining a lot of Windows PC's and it would make life so much easier if i could automate some of these tasks. I am pretty new to Python but I seem to understand it a little better than VB Script. I have been Googling Windows Automation and getting some pretty good links but most if not all are done using batch scripts and VB Script. I have a batch script that cleans up temp files and defragments the hard drive but I would like to know if Python is a good candidate for this or should I just stick to what is built into Windows. Thank in advance, -- Daniel McQuay HDR Time Traveler www.pittbullsecure.com www.Jaluno.com H: 814.341.9013 M: 814.421.3863 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] problem with IDLE
Hello list, I just got a Windows box up and running. When I go to use IDLE I get an error saying something along the lines of, "IDLE was unable to start you may need to shut off the firewall". Now when I shut the firewall off it starts up fine. So my question is, does IDLE try to access a port? if so, what port? I would like to be able to make rule so that I can keep the firewall running and have no problem starting IDLE. Thank you in advance,-- Daniel McQuay814.825.0847 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] problem with IDLE
Not to be sound ignorant, but what port on local host would that be?On 12/1/05, Liam Clarke-Hutchinson < [EMAIL PROTECTED]> wrote: IDLE uses localhost (a loopback port 127.0.0.1) to communicate with running scripts (so interrupt keys and debugging calls get passed etc.) It's a nice cross platform method of interprocess communication. So yeah, 127.0.0.1 is the one. Regards, Liam Clarke-Hutchinson| Contact Centre Advisor| Ministry of Economic Development DDI +64 3 962 2639 | Fax +64 3 962 6220www.med.govt.nz -Original Message-From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Daniel McQuaySent: Friday, 2 December 2005 1:48 p.m.To: Tutor@python.orgSubject: [Tutor] problem with IDLEHello list, I just got a Windows box up and running. When I go to use IDLE I get an error saying something along the lines of, "IDLE was unable to start you may need to shut off the firewall". Now when I shut the firewall off it starts up fine. So my question is, does IDLE try to access a port? if so, what port? I would like to be able to make rule so that I can keep the firewall running and have no problem starting IDLE.Thank you in advance,-- Daniel McQuay814.825.0847 A new monthly electronic newsletter covering all aspects of MED's work is now available. Subscribers can choose to receive news from any or all of seven categories, free of charge: Growth and Innovation, Strategic Directions, Energy and Resources, Business News, ICT, Consumer Issues and Tourism. See http://news.business.govt.nz for more details. govt.nz - connecting you to New Zealand central & local government services Any opinions expressed in this message are not necessarily those of the Ministry of Economic Development. This message and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivery to the intended recipient, be advised that you have received this message in error and that any use is strictly prohibited. Please contact the sender and delete the message and any attachment from your computer. -- Daniel McQuay814.825.0847 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Cancel Subscription
Aguilar Arcadio wrote: > Please delete my e-mail from the tutor@python.org > mailing list. Thank you!! > To unsubscribe you will have to visit: http://mail.python.org/mailman/options/tutor > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > > -- Daniel McQuay Dead Possum Productions ctrl-alt-del.us 814.825.0847 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] cisco router + telnetlib
Hello List,I am rather new to programming and I was wondering y'all think the best way to configure a cisco router using python would be. currently I am using telnetlib. my problem is, I get an error after connecting to the router. here is the error I get when I use IDLE: Enter IP: 205.180.0.3Warning: Problem with getpass. Passwords may be echoed.Router Password: ciscoWarning: Problem with getpass. Passwords may be echoed.Router Secret: class Enter Router hostname: RouterBobTraceback (most recent call last): File "C:\Documents and Settings\bob\My Documents\Administration\Scripts\cisco_config.py", line 20, in ? tn.write("hostname " + hostName + "\n") File "C:\Python24\lib\telnetlib.py", line 292, in write self.sock.sendall(buffer) File "", line 1, in sendallerror: (10053, 'Software caused connection abort')>>> I have also attached the script that I use. could you please point me in the right direction.thank you in advance,-- Daniel McQuayboxster.homelinux.org Dead Possum Productions814.825.0847 import getpass import sys import telnetlib HOST = raw_input("Enter IP: ") password = getpass.getpass('Router Password: ') secret = getpass.getpass('Router Secret: ') tn = telnetlib.Telnet(HOST) tn.write("\n") tn.write("\n") tn.read_until("Router>") #what if it's configured already? tn.write(password + "\n") tn.write("enable\n") tn.write(secret + "\n") tn.write("config t\n") #User input for router config hostName = raw_input("Enter Router hostname: ") tn.write("hostname " + hostName + "\n") interface = raw_input("Enter interface to be configured: ") tn.write("int " + interface + "\n") intAddress = raw_input("Enter interface IP address and Subnet Mask: ") tn.write("ip address " + intAddress + "\n") intDesc = raw_input("Enter description for interface: ") tn.write("desc " + intDesc + "\n") bannerMOTD = raw_input("Enter the Message of the day: ") tn.write("banner motd " + bannerMOTD + "\n") lineCON = raw_input("Enter CON password: ") tn.write("line con 0\n") tn.write("password " + lineCON + "\n") tn.write("login\n") lineAUX = raw_input("Enter AUX passowrd: ") tn.write("line aux 0\n") tn.write("password " + lineAUX + "\n") tn.write("login\n") lineVTY = raw_input("Enter VTY password: ") tn.write("line vty 0 4\n") tn.write("password " + lineVTY + "\n") tn.write("login\n") tn.write("exit\n") tn.write("show run\n") confirm = raw_input("Press Enter To Close:") tn.close() ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] crontab or python mistake
hello list,i am having a problem getting crontab to execute a python script. the script works because i can execute it by using: python boxster_school_smtp.py from a command line. i put a line in crontab that look like this: i know this is not a linux mailing list but any help would be appreciated.*/5 * * * * root /usr/local/bin/python /root/scripts/boxster_school_smtp.py now like i said the python script works by using: python my_script.py from the command line but when i use it in crontab i get some error. here is the error that cron gives: Traceback (most recent call last): File "/root/scripts/boxster_school_smtp.py", line 19, in ? mssg = open('mssg.txt', 'r').read()IOError: [Errno 2] No such file or directory: ' emmssg.txt'the emmssg.txt file is in the /root/script directory so i don't know why it cant find it.thanks again,-- Daniel McQuay [EMAIL PROTECTED]boxster.homelinux.org 814.825.0847 import smtplib import os emmssg = "/root/scripts/emmssg.txt" smtpserver = 'mail.erieit.edu' AUTHREQUIRED = 1 smtpuser = 'dmcquay' smtppass = '**' #For testing purposes only! RECIPIENTS = ['[EMAIL PROTECTED]'] #This will be used after testing #RECIPIENTS = ['[EMAIL PROTECTED]','[EMAIL PROTECTED]','[EMAIL PROTECTED]', # '[EMAIL PROTECTED]','[EMAIL PROTECTED]', # '[EMAIL PROTECTED]'] SENDER = '[EMAIL PROTECTED]' emmssg = open('emmssg.txt').read() session = smtplib.SMTP(smtpserver) if AUTHREQUIRED: session.login(smtpuser, smtppass) smtpresult = session.sendmail(SENDER, RECIPIENTS, emmssg) if smtpresult: errstr = "" for recip in smtpresult.keys(): errstr = """Could not delivery mail to: %s Server said: %s %s %s""" % (recip, smtpresult[recip][0], smtpresult[recip][1], errstr) raise smtplib.SMTPException, errstr ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] please remove this address from list: [EMAIL PROTECTED]
you will need to do it yourself.http://mail.python.org/mailman/listinfo/python-listOn 6/12/06, graphic design <[EMAIL PROTECTED]> wrote: not sure how i got on this list. please remove my email address from it. thank you. [EMAIL PROTECTED] ___Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutorsorry,-- Daniel McQuay[EMAIL PROTECTED] boxster.homelinux.orgH: 814.825.0847M: 814-341-6233 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Beginner Question
On 6/18/06, Josh F <[EMAIL PROTECTED]> wrote: re. Beginner QuestionI'm still in the fairly early stages of learning Python, but I have anintermediate level of HTML, CSS, and VB6 knowledge along with thefundamentals of C and C++ and a very little bit of PERL.. But enough about me...Here's the solution.message = raw_input("Enter your message:")print message[-1::-1]just another noob here.but wouldn't his way work like this: >>>message = "foobar">>>for i in range(len(message)-1,-1,-1):... print message[i],...r a b o o fi guess there's lots of ways to do it. that's my 2 cents. Slicing a string takes three arguments, all of which are optional: The firstcharacter to be sliced, the last character to be sliced, and tio slice every nth character.In Python strings, -1 refers to the last character in the string and thusbecomes the first argument.You don't specify the second argument because you're printing the stringfrom end to beginning. Finallly, the -1 in the 3rd argument indicates that you want the string tobe printed in reverse order (i.e. iterate backwards by one character).>Message: 1>Date: Sun, 18 Jun 2006 05:58:38 -0500 >From: "Bill Tatum" <[EMAIL PROTECTED]>>Subject: [Tutor] Beginner question(s)>To: <tutor@python.org>>Message-ID: < [EMAIL PROTECTED]>>Content-Type: text/plain; charset="us-ascii">>Hi,>>>>I'm working through Python Programming for the Absolute Beginner. One of >the challenges at the end of chapter 4 is to get a message from the user>and>then print it out backwards. I have.>>>>message = raw_input("Enter your message:") >>count = len(message)>>print count>>>>which gives me the number of characters in the message. I tried to use a>for loop:>>>>for i in range(len(message)-1,-1, -1): >> print i,>>>>but I just get the numeric values of the string. Can anyone help?>>>>Also, does anyone know of a PDA that would run python?> >>>TIA___Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor-- Daniel McQuay[EMAIL PROTECTED] boxster.homelinux.orgH: 814.825.0847M: 814-341-6233 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] how to remove html ags
hey anil,have you had a look at BeautifulSoup?http://www.crummy.com/software/BeautifulSoup/i haven't used it but i have seen it mentioned on the list for parsing html. On 8/12/06, anil maran <[EMAIL PROTECTED]> wrote: Human nature is not a machin...for example in the above stirng i want to remove and i triedstr = str.replace('(.*)','')it doesnt workthanks Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. ___Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor-- Daniel McQuay[EMAIL PROTECTED] boxster.homelinux.orgprowiseguys.comH: 814.825.0847M: 814-341-6233 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] suggestions for read unread items datastructure
i concur, anil try looking at how you ask a question.http://catb.org/~esr/faqs/smart-questions.html#beforeOn 8/13/06, Bob Gailer <[EMAIL PROTECTED]> wrote: anil maran wrote:>> suggestions for read unread items datastructure>>> keep a list of read and unread items>> hi guys> i m building an rss reader and i want you suggestions for datastructure > for keeping read and unread list for each use> i m assuming it will be very sparseJust a guess but I think the lack of response is due to (at least forme) not knowing enough about your situation to give a useful response. Please tell us more.--Bob Gailer510-978-4454___Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor-- Daniel McQuay[EMAIL PROTECTED] boxster.homelinux.orgprowiseguys.comH: 814.825.0847M: 814-341-6233 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Where to post a Python Program
> Greetings: > > I have written a console version of the dice game Yahtzee). I would like to post it for comment. It is too long to post here and I don’t have a web site. > Is there some place where I can post my code and get feedback about it? Hey Barry, There are several websites that allow you to post your code for review. I think one of the best ones is [http://pastebin.com/]. You should also have a look at [http://pastebin.ca/] (not sure if they are affiliated) which happened to turn up during a google search. HTH, Daniel McQuay www.prowiseguys.com [EMAIL PROTECTED] 814.825.0847 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] One million and counting
I second Jorge, I also learned from your site. well done,On 10/31/06, Glenn T Norton <[EMAIL PROTECTED] > wrote:Alan Gauld wrote:>Hi folks,>>In just thought I'd mention that my web tutor has now passed >the million visitors mark. Thanks to all those on the tutor>list who have paid a visit.>>Alan Gauld>Author of the Learn to Program web site> http://www.freenetpages.co.uk/hp/alan.gauld>___>Tutor maillist - Tutor@python.org> http://mail.python.org/mailman/listinfo/tutor>>>Congratulations Alan! I visited your site many times when first learningPython.Keep up the good work.Glenn--"Ketchup. For the good times... " - Ketchup Advisory Board Glenn NortonApplication DeveloperNebraska.gov1-402-471-2777[EMAIL PROTECTED]___ Tutor maillist - Tutor@python.orghttp://mail.python.org/mailman/listinfo/tutor -- Daniel McQuayboxster.homelinux.orgH: 814.825.0847M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Starting python from a DOS prompt from any directory?
hello fellow programmers, newbie question here and this isn't much a programming question as it is a windows and python question, so sorry in advance. i have been having what i think is a problem with running python on windows from a DOS prompt. i am used to running python from a linux box where you can just type "python" or "python24" from a shell prompt and the python shell executes from any directory. now if i remember right, when used a window 2000, i could break out a DOS prompt and type "python" from any directory and it would execute the python screen where you could then begin testing code. now i am using a windows xp media center edition laptop with python 2.5 installed and when i go to run and then type "cmd" and then type "python" from the directory where the run "cmd" command drops me it says 'python' is not a recognized as an internal or external command. i would like to be able to just type "python" from any directory and have it run. does any one know why it's doing this or how i can achieve running python from just any directory. now i can navigate to the python folder and execute python from there. but there seems to me to be a way to achieve what i want to do. sorry for such a newbie question but i would like to figure this out because there are some situations where i need that to work from any directory. thanks in advance, -- Daniel McQuay boxster.homelinux.org H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Starting python from a DOS prompt from any directory?
yeah, you know what i totally didn't think about setting the environmental values (yeah Media Center is the same as XP Pro). i guess i should of known that. geeze now i feel like a moron. however, i didn't know about that quick little DOS trick. thanks a lot guys for such a quick response and pointing out the obvious. this has got to be the best and most friendly list ever. happy new year to you all, On 12/31/06, Alan Gauld <[EMAIL PROTECTED]> wrote: "Steve Oldner" <[EMAIL PROTECTED]> wrote > change defaults (programmers aren't allowed to do system > admin stuff, heck, we can't even move our PC's or monitors). You can just type in the PATH statement every time you start DOS PATH= %PATH%;D:\Python25 And it will have the same effect. You can even create a Batch file and put it into somewhere your PATH can see D:\Python25\python %1 %2 %3 %4 %5 %6 %7 %8 %9 should work. But how did you install Python if you can't change the system? If you have access to install programs you have access to set environment variables, at least for yourself! Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- Daniel McQuay boxster.homelinux.org H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Starting python from a DOS prompt from any directory?
On 1/1/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "Bob Gailer" <[EMAIL PROTECTED]> wrote >> Sure I understand that, but it looks from your post that >> you have somehow managed to install Python. > As I recall Steve said at the beginning that he ran Python from a > network drive. Nope, he said it was a networked PC but that Python was in his D: drive, which I assumed was local. But that raises an interesting proposition,. one that I've never tried. Is it possible under Windows to install Python from machine A onto a network drive and then run Python from machine B accessing that drive? In other words does the installer need to do any magic in the registry for Python to work or is it all just path setting and shortcuts? Can anyone confirm or otherwise the possibility? i can try this under my networked drive tomorrow at school and if in fact you can. Curious, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor regards, -- Daniel McQuay boxster.homelinux.org H: 814.825.0847 M: 814-341-9013 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor