[Tutor] Fwd: Newbie

2015-01-02 Thread Rohan Ds
-- Forwarded message -- From: "Rohan Ds" Date: 2 Jan 2015 23:46 Subject: Newbie To: Cc: Hello everybody :) I am Rohan from India. I'm new to Python. I have a basic understanding as to how Python works. I want to contribute to PSF. The information available on

Re: [Tutor] commands module

2007-12-06 Thread ds
mentioning that. I'm pretty weak on bash, and had monkeyed around with such things as set COLUMNS=500 on the previous line in the shell program version, but hadn't actually looked up that syntax yet, when I stumbled across the ps parameter that eventually I selected. Thanks again. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] commands module (Forwarded back to list)

2007-12-06 Thread ds
;t know how to alter the set variable so that it will stick long enough for the "ps ax" command to execute properly. == End of forwarded message part. Finally, I have solved the problem, because I discovered a width option on the ps command, which I hadn't been aware of before. For example: commands.getstatusoutput('ps ax -l --width 500') works very well by over-riding any defaults. Thanks for your help. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] commands module

2007-12-06 Thread DS
I've been trying to do something that I thought was going to be relatively straight-forward, but so far I haven't found a good solution. What I'm trying to do is discover a pid on a process and kill it. The way that I thought that I could do it is something along the lines of: import commands p

Re: [Tutor] exec, execfile, rexec

2006-02-14 Thread DS
Danny Yoo wrote: >>I hate to admit it, but there are times when fear should be listened to, >>and I think this is one of them. So, I guess I'll move on to parsing it >>myself. Seems a shame though. >> >> > >Hi DS, > >Yeah, I'd reco

Re: [Tutor] exec, execfile, rexec

2006-02-14 Thread DS
rexex and >Bastion, became disabled as of python 2.3; that gives an indication of how >difficult a problem it is to fix. > >http://www.python.org/doc/lib/restricted.html > > > I hate to admit it, but there are times when fear should be listened to, and I think this is one

[Tutor] exec, execfile, rexec

2006-02-14 Thread DS
in some way that I don't understand. Thanks for any guidance. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] CPU Utilization]

2006-01-12 Thread DS
ntending to use, making it seem a little wasteful. vmstat is much more focused on exactly the information I want. Although I am using linux pretty much exclusively these days, there's still a lot that I don't know and I wasn't aware that it existed. Thanks ds ___

Re: [Tutor] CPU Utilization

2006-01-12 Thread DS
so gnome libraries will not be an option. At this point I'm going to go with vmstat. Thanks ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] CPU Utilization

2006-01-11 Thread DS
interesting idea to use that. Although if you have big jobs and little jobs you might not know whether you can add another job to that computer or not, because you would necessarily be attempting to derive the utilization from those statistics. Thank you both for your answers. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] CPU Utilization

2006-01-11 Thread DS
, I've been thinking I'd have the worker computer shell out to perform the top command, parse the results, and report those values to the job controller. Is there a better way, or more pythonic, way to do this? Thanks ds ___ Tutor maillist

Re: [Tutor] dictionary question

2005-11-11 Thread DS
You almost have it. Do this instead. d = {'first':[]} d['first'].append("string") Append acts on the list, so assignment is unnecessary. ds Eric Walker wrote: >All, >I have a dictionary say: >d = {'first':[]} >I am going through another lis

Re: [Tutor] Object instances

2005-11-07 Thread DS
All right! That's penetrated. Thanks very much. ds ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Object instances

2005-11-06 Thread DS
l of the object instances, if I ever had to do something like that. I just don't have a clue as to why objects were designed this way. Can anyone point me in the right direction? Thanks ds ___ Tutor maillist - Tutor@python.org http://mail.python.

Re: [Tutor] call a def/class by reference

2005-09-29 Thread DS
on't know 20 languages, computer or otherwise. I know that I used some sort of thing like that in the 80's with Revelation, a database/language derived from Pick. (That one is probably a little obscure, it may not be on your list of 20). I also think you can do that in Perl, but bear in

Re: [Tutor] call a def/class by reference

2005-09-29 Thread DS
reading Python in a >>Nutshell, prior to asking my questions here, I had thought that there >>probably was, but I just wasn't grasping it. >> >> > > >Hi DS, > > >Modules can be thought of as containers for functions. As a concrete >example, let

Re: [Tutor] call a def/class by reference

2005-09-29 Thread DS
bob wrote: > At 08:23 AM 9/29/2005, DS wrote: > >> bob wrote: >> >> > At 04:29 PM 9/28/2005, DS wrote: >> > >> >> What I'm hoping to avoid is an >> >> explicit reference to any of the called functions within the program. &g

Re: [Tutor] call a def/class by reference

2005-09-29 Thread DS
bob wrote: > At 04:29 PM 9/28/2005, DS wrote: > >> What I'm hoping to avoid is an >> explicit reference to any of the called functions within the program. >> By doing it that way, it would avoid a maintenance problem of having to >> remember to put a refe

Re: [Tutor] call a def/class by reference

2005-09-28 Thread DS
Danny Yoo wrote: > > >>Thanks for answering my question. What I'm hoping to avoid is an >>explicit reference to any of the called functions within the program. >>By doing it that way, it would avoid a maintenance problem of having to >>remember to put a reference for every new function in the

Re: [Tutor] call a def/class by reference

2005-09-28 Thread DS
Thanks for answering my question. What I'm hoping to avoid is an explicit reference to any of the called functions within the program. By doing it that way, it would avoid a maintenance problem of having to remember to put a reference for every new function in the calling program. ds

[Tutor] call a def/class by reference

2005-09-28 Thread DS
function list, 3. executing the function 4. rinse, repeat. I don't actually mind eval, but I would want to make sure I inspect everything pretty thorougly before executing. Thanks for any help you can give me. ds ___ Tutor maillist -

Re: [Tutor] Error frameworks

2005-09-21 Thread DS
xception handler that logs the >>exception and continues. For example here is a loop that processes a list of >>items, if there is an error processing an item a traceback is printed and the >>processing continues: I think yo

[Tutor] Error frameworks

2005-09-21 Thread DS
back to each called function until it bubbles up to a point to be passed back to the user in some meaningful way. 2. have a singleton error object updated. 3. ?? What do most people use? Is there any url that you could point me to that would help educate me on this point? Thanks ds