[Tutor] Which version to start with?
What is the best version of python to start out with? I see some discussions on the net about not going to 3.1 but staying with the 2.x releases. But then i see that 3.1 is better if your just starting. Thanks for any insight on which version to go with. -Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Which version to start with?
Thanks all! I think i will install the newly released 2.6.3 and go from there. Its a little intimidating but i guess i gotta jump right in and get my feet wet. Thanks again! -Nick On Mon, Oct 5, 2009 at 5:59 PM, wesley chun wrote: > On Mon, Oct 5, 2009 at 2:24 PM, Nick Hird wrote: >> What is the best version of python to start out with? I see some >> discussions on the net about not going to 3.1 but staying with the 2.x >> releases. But then i see that 3.1 is better if your just starting. > > > greetings nick! > > ironically, i just gave a talk on this very subject yesterday afternoon(!) > http://www.siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&id=227 > > basically, if you're starting from scratch as a hobby with no > pre-existing code, then learning 3.x is okay. however, since most of > the world still runs on Python 2, most printed and online books and > tutorials are still on Python 2, and the code at most companies using > Python is still on version 2, i would recommended any release 2.6 (and > newer). the reason is because 2.6 is the first release that has > 3.x-specific features backported to it, so really, it's the first > Python 2 release that lets you start coding against a 3.x interpreter. > > you can learn Python using 2.6+ then absorb the differences and move > to Python 3.x quite easily. > > hope this helps! > -- wesley > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "Core Python Programming", Prentice Hall, (c)2007,2001 > "Python Fundamentals", Prentice Hall, (c)2009 > http://corepython.com > > wesley.j.chun :: wescpy-at-gmail.com > python training and technical consulting > cyberweb.consulting : silicon valley, ca > http://cyberwebconsulting.com > -- --Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Not storing the PATH in ZipFile?
I was reading another thread and decided to work on a little project to backup some files on a regular basis. Since this will mostly be on windows i am using zipfile and i can create my zip file just fine and all the files are there, it works great! My question is however, is there a way to NOT store the path in the zip file? When i decompress the files, i would like them to not be associated with a particular folder or path, just the files. I looked through the docs but didn't see anything to disable the path. Thanks, -Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Not storing the PATH in ZipFile?
That was it. Thanks so much! I was looking at the docs and didn't think that applied to the path that was stored. Thanks Again! -Nick On Wed, Oct 14, 2009 at 12:16 PM, Kent Johnson wrote: > On Wed, Oct 14, 2009 at 11:38 AM, Nick Hird wrote: >> I was reading another thread and decided to work on a little project >> to backup some files on a regular basis. Since this will mostly be on >> windows i am using zipfile and i can create my zip file just fine and >> all the files are there, it works great! My question is however, is >> there a way to NOT store the path in the zip file? When i decompress >> the files, i would like them to not be associated with a particular >> folder or path, just the files > > ZipFile.write() takes an optional arcname parameter, this is the name > the file wll have in the archive. If you pass the plain file name (no > path components) as arcname I think it will do what you want. > > Kent > -- --Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Can python determine Battery or AC Power?
Is there a way in python to tell if the power source for a laptop is ac or battery? I am trying to write a small script to print out my system stats and would like to know if the laptop is on battery power or using ac power. I just dont know enough python to know where to look for that info. Thanks! -Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Can python determine Battery or AC Power?
I am running Windows XP. On Wed, Oct 28, 2009 at 5:19 PM, Luke Paireepinart wrote: > If you're on Windows and you can find an example using the Win32 api (in C++ > for example) you can use pywin32 module to do the same thing through > python. It's a little complicated sometimes though. So what O.S. are you > on? > > On Wed, Oct 28, 2009 at 4:15 PM, Nick Hird wrote: >> >> Is there a way in python to tell if the power source for a laptop is >> ac or battery? I am trying to write a small script to print out my >> system stats and would like to know if the laptop is on battery power >> or using ac power. I just dont know enough python to know where to >> look for that info. >> >> Thanks! >> -Nick >> ___ >> Tutor maillist - tu...@python.org >> To unsubscribe or change subscription options: >> http://mail.python.org/mailman/listinfo/tutor > > -- --Nick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor