[Tutor] Need Some Help
Hi All, I am new to python.i need some help about python.i want to learn python so plz guide me from where can i start.so,that i can learn and under stand quickly. -- Best Regards, M.Srikanth Kumar, ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] indexing elements
Hi all, i had some doubt about this line can any body clarify this plz... endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 * ['th'] + ['st'] -- Best Regards, M.Srikanth Kumar, Jr.Software Developer, Google India Pvt Ltd.., HYDERABAD. Phone no: +91-9866774007 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] advanced sorting
In Advance Sorting by giving the keywords to sort the list.But, iam getting the fallowing errors >>> x = ['srikanth', 'kumar', 'muppandam', 'will', 'be', 'a'] >>> x.sort(key=len) Traceback (most recent call last): File "", line 1, in ? TypeError: sort() takes no keyword arguments >>> x.sort(reverse=True) Traceback (most recent call last): File "", line 1, in ? TypeError: sort() takes no keyword arguments -Best Regards, M.srikanth. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] advanced sorting
Hi, i am using a macpro version(10.4.11) and python version is "2.3.5" Message: 10 Date: Wed, 05 Sep 2007 01:00:44 +0530 From: Noufal Ibrahim <[EMAIL PROTECTED]> Subject: Re: [Tutor] advanced sorting To: [EMAIL PROTECTED] Cc: tutor@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed chinni wrote: > > > In Advance Sorting by giving the keywords to sort the list.But, iam > getting the fallowing errors > > >>> x = ['srikanth', 'kumar', 'muppandam', 'will', 'be', 'a'] > >>> x.sort(key=len) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: sort() takes no keyword arguments > >>> x.sort(reverse=True) > Traceback (most recent call last): > File "", line 1, in ? > TypeError: sort() takes no keyword arguments > > Seems to work fine for me. What version of Python are you using? >>> x=['srikanth', 'kumar', 'muppandam', 'will', 'be', 'a'] >>> x.sort(reverse=True) >>> x ['will', 'srikanth', 'muppandam', 'kumar', 'be', 'a'] >>> -- ~noufal -- Best Regards, M.Srikanth Kumar, ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Plz help me from this
Hi All, I Want to write a python script to change the permissions(chmod) and owner(chown) and group(chgrp) of a file on unix, script as to read from the /etc/passwd for displaying available users on the machine and from /etc/groups it as to display the available groups and user has to give the mode and owner name and group name from the list. Can i implement this in python or in shell scripting Can any one please suggest me from doing this...:) -- Best Regards, M.Srikanth Kumar, ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] automate daily tasks
Hi all, I am working on MAC OS x my project is updating all ready installed products.I have to automate this in python.so,can any one will give some suggestions and some examples how to automate.some basic things of my project is ... i think u all know that there will be a plist file for each product in mac.i have to degrade the version of plist automatically through my script and it has to edit the plist file and degrade it to least version and as to check for updates by itself.like this there are 15 products under this now each time i can't go and degrade the version and save it and run updates manually..so,that can any one plz..tell me how to start from first step... -- Best Regards, M.Srikanth Kumar, ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Tutor Digest, Vol 43, Issue 36
Hi, Thanx for Responding for the Query. The actual Output what i want is my python script has to change the version number(degrade) in plist file.and automatically change the time to 25 hrs more from present time cause my product will check for updates for every 25hrs. But u all told that cronjob and at inbuilt features of UNIX but every time ihave to manually go and change the version.i can't so that's why i want to write a script for this 1.open the app 2.degrade the version automatically to least version 3.change the time to 25hrs more 4.check for updates(1.force Update and silent update) 5.the whole procedure is for admin and non-admin users can i implement this by using both python and shell scripting.if possible give the reference book for quick learn. > > > Message: 2 > Date: Tue, 11 Sep 2007 22:24:37 +0530 > From: chinni <[EMAIL PROTECTED]> > Subject: [Tutor] automate daily tasks > To: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I am working on MAC OS x my project is updating all ready installed > products.I have to automate this in python.so,can any one will give some > suggestions and some examples how to automate.some basic things of my > project is ... i think u all know that there will be a plist file for each > product in mac.i have to degrade the version of plist automatically > through > my script and it has to edit the plist file and degrade it to least > version > and as to check for updates by itself.like this there are 15 products > under > this now each time i can't go and degrade the version and save it and run > updates manually..so,that can any one plz..tell me how to start from first > step... > > -- > Best Regards, > M.Srikanth Kumar, > -- next part -- > An HTML attachment was scrubbed... > URL: > http://mail.python.org/pipermail/tutor/attachments/20070911/75c73c5e/attachment-0001.htm > > -- > > Message: 3 > Date: Tue, 11 Sep 2007 13:03:54 -0400 > From: "Tom Tucker" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] automate daily tasks > To: [EMAIL PROTECTED] > Cc: tutor@python.org > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > Are you looking for a method to automate the execution of your Python > program? Is that the question? > If yes, have you tried using cron or at jobs (man cron or man at). > > Tom > > On 9/11/07, chinni <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > I am working on MAC OS x my project is updating all ready installed > > products.I have to automate this in python.so,can any one will give some > > suggestions and some examples how to automate.some basic things of my > > project is ... i think u all know that there will be a plist file for > each > > product in mac.i have to degrade the version of plist automatically > > through my script and it has to edit the plist file and degrade it to > least > > version and as to check for updates by itself.like this there are 15 > > products under this now each time i can't go and degrade the version and > > save it and run updates manually..so,that can any one plz..tell me how > to > > start from first step... > > > > -- > > Best Regards, > > M.Srikanth Kumar, > > > > > > ___ > > Tutor maillist - Tutor@python.org > > http://mail.python.org/mailman/listinfo/tutor > > > > > -- next part -- > An HTML attachment was scrubbed... > URL: > http://mail.python.org/pipermail/tutor/attachments/20070911/ea45fd19/attachment-0001.htm > > -- > > Message: 4 > Date: Tue, 11 Sep 2007 18:37:33 +0100 > From: "Alan Gauld" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] automate daily tasks > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > > "chinni" <[EMAIL PROTECTED]> wrote > > > I am working on MAC OS x my project is updating all ready installed > > products.I have to automate this in python.so,can any one will give > > some > > sounds fair. > > > project is ... i think u all know that there will be a plist file > > for each > > product in mac. > > I wouldn't assume too much knowledge of how MacOS works, > despite Apple's recent successes its still very much a > minority OS! I own an iBook and use t
[Tutor] Xml reference
Hi all, Which Book is better for python parsing and reading Xml files from local machine and remote machine and also through http... Can any one Please Post the link at least ...waiting for u r Replies . Thanku:) -- Cheers, M.Srikanth Kumar, Phone no: +91-9866774007 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] xml parsing
Hi, I am working on MAC and my App was based on Xml file.If any updates r any changes in the xml file my app will load that changes. as i am new to python.i want to automate that one. there will be one URL and size will mention in that Xml file.i want to write a script so that it will download the file and have to check the size with my Xml file and downloaded file size.if size mismatch it has to show both current size and also xpected size.I want to write a script.so that it has to start download all App's at a time.so finally here is the sample O/P Appname Downloadedsize Expectedsize result 2554958 2554958 Pass 832158754112Fail Here the size is in KB's.Now plz tell me how to write the script in python. Thanx in Advance to all :) -- Cheers, M.Srikanth Kumar, Phone no: +91-9866774007 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Python Editor For Mac Os X
Hi which editor for python on Mac os x platform is best with color syntax compiler etc... -- Cheers, M.Srikanth Kumar, Phone no: +91-9866774007 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor