Re: [Tutor] some web and python version questions
On 03/05/2013 02:43 AM, Lolo Lolo wrote: Installing 3.3 associated .py files with %windir%\py.exe, but it seems the icon cache wasn't refreshed. You can trigger a refresh by setting any default in the Default Programs control panel applet. If that fails, you can manually delete the cache from the cmd shell: del /a %localappdata%\IconCache.db It will be rebuilt at your next login. that last command returns The system cannot find the path specified. Any ideas which directory i should do that in? Do you have any familiarity with Windows commandline? Can you look at environment variables, and do you know why I would ask that? Can you search your hard disk for a file? dir /s c:\IconCache.db DIR is the directory command. /s is the switch that says search all subdirectories. C:\ is the starting place for your search, and IconCache.db is the file you're looking for. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Tue, Mar 5, 2013 at 2:43 AM, Lolo Lolo losermelo...@yahoo.com wrote: del /a %localappdata%\IconCache.db It will be rebuilt at your next login. that last command returns The system cannot find the path specified. Any ideas which directory i should do that in? Sorry, I haven't used XP (NT 5) in a long time. The environment variable %localappdata% is available in Vista and Windows 7-8 (NT 6). Instead you can use %userprofile%\Local Settings\Application Data\IconCache.db. Here are some step by step instructions: http://www.trishtech.com/winxp/rebuild_icon_cache_in_windows_xp.php ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
due to the last 2 posts i was able to locate and delete the Iconcache.db through cmd. But after restarting, even though i have the refreshed cache, the icons are still not displaying properly. Will that website http://www.trishtech.com/winxp/rebuild_icon_cache_in_windows_xp.php provide an alternative solution or are the end results the same? I guess i can live with it, aslong as my scripts still run i dont mind. I do really appreciate the help you 2 are giving me.___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Tue, Mar 5, 2013 at 4:04 AM, Lolo Lolo losermelo...@yahoo.com wrote: due to the last 2 posts i was able to locate and delete the Iconcache.db through cmd. But after restarting, even though i have the refreshed cache, the icons are still not displaying properly. Check the output of the following command: reg query HKLM\Software\Classes\Python.File\DefaultIcon For me the value is C:\Python33\DLLs\py.ico. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
Check the output of the following command: reg query HKLM\Software\Classes\Python.File\DefaultIcon For me the value is C:\Python33\DLLs\py.ico. i get: 'reg' is not recognized as an internal or external command, operable program or batch file.___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Tue, Mar 5, 2013 at 9:03 AM, Lolo Lolo losermelo...@yahoo.com wrote: Check the output of the following command: reg query HKLM\Software\Classes\Python.File\DefaultIcon For me the value is C:\Python33\DLLs\py.ico. i get: 'reg' is not recognized as an internal or external command, operable program or batch file. System32 should be on the PATH, and reg.exe should be available in XP. C'est la vie. Try %windir%\System32\reg.exe instead of reg. No rush. It's just an icon. By any chance are you using a 64-bit Windows XP? WoW64 redirection for 32-bit processes might be an issue. e.g., %windir%\System32 - %windir%\SysWoW64. 32-bit reg.exe run from a 32-bit cmd shell would nominally operate on HKLM\Software\, but really access HKLM\Software\Wow6432Node\. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
System32 should be on the PATH, and reg.exe should be available in XP. C'est la vie. Try %windir%\System32\reg.exe instead of reg. No rush. It's just an icon. sorry eryksun its my fault i havent been clear... im actually using windows vista not xp. i mixed your new command with the old but did it directly in the system32 directory. using: C:\Windows\System32%windir%\System32\reg.exe query HKLM\Software\Classes\Python.File\DefaultIcon i got this returned: HKEY_LOCAL_MACHINE\Software\Classes\Python.File\DefaultIcon (Default) REG_SZ D:\Data\Program Files Data\Python33\DLLs\py.ico___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] some web and python version questions
Hey all, i am running python 3.0 but i realized a lot of modules that support version 3 do not support 3.0. now i want to install Python 3.3 but im worried the two versions (3.0 and 3.3) might confuse my machine. i don't want to lose my work in 3.0 and i installed some modules and saved some work in that version. Im on Windows, and my main worry is confusing my PC and making it get the versions mixed up. i also want to leave room to install version 2 if i ever need to but ill cross that bridge when i get there. For now i want to know if i have to delete version 3.0 before installing 3.3? Also i want to learn web development and saw only a few modules support Python 3. As i don't know anything about this subject i just wanted to ask which is a better bet, Bottle or Cherrypy? I am not creating/managing any websites this is just to learn. Also is Pyramid a lightweight framework as its description suggests or is it big/complex like Django? As a learner are my 1st two options a safer bet than the latter 2?___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On 03/04/2013 11:30 AM, Lolo Lolo wrote: Hey all, i am running python 3.0 but i realized a lot of modules that support version 3 do not support 3.0. now i want to install Python 3.3 but im worried the two versions (3.0 and 3.3) might confuse my machine. i don't want to lose my work in 3.0 and i installed some modules and saved some work in that version. Im on Windows, and my main worry is confusing my PC and making it get the versions mixed up. i also want to leave room to install version 2 if i ever need to but ill cross that bridge when i get there. For now i want to know if i have to delete version 3.0 before installing 3.3? It's also a good idea to specify your OS and version. I'm going to guess you're running Windows, XP or Win7. I'd migrate off of Python 3.0 as soon as possible. It was the buggiest version out there. Not surprising because it was the first version of some major rewriting. Anyway, 3.3 not only has more features, but the implementation has been greatly cleaned up. Python 3.3 will definitely install independently of 3.0 on Windows. It's only the minor versions that happen in place, like going from 3.3 to 3.3.1 The catches are that: 1) any 3rd party libraries you've installed in 3.0's install directory will need to be reinstalled in the new directory. 2) Only one of the two can be the default installation. That's a choice you make while installing the new one, either to keep the old version as default, or to make the new one default. Windows registry entries may have to change if you later change your mind about the default. Python 3.3 on Windows does come with a version detector, where it installs a stub in the Windows directory, and that stub examines the shebang line of your main script to figure out which version of Python to run. I've never used it, since it came out after I had stopped using Windows. If you're running your scripts explicitly, by something like: python myscript.py then you should be able to say python3.3 myscript.py or python3.0 myscript.py to be explicit. These are just batch files, and you can add more to suit your requirements. Also i want to learn web development I can't help here. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On 04/03/13 16:30, Lolo Lolo wrote: Also i want to learn web development ... ask which is a better bet, Bottle or Cherrypy? ... Also is Pyramid a lightweight framework as its description suggests or is it big/complex like Django? There are so many web frameworks for Python that asking which is bet is rather pointless. They are all fairly good, some are very good for specific tasks, others are more general. The main thing to start with is pick one and learn it. You can switch later once you understand the concepts but stick with one until you do. My personal recommendation would be either to go direct to Django or try CherryPy. But there are plenty of advocates for the other options too. It really is less important which one you choose, rather focus on understanding the concepts of translating urls to Python methods, using templates to isolate code from presentation and using databases to store data. The frameworks all facilitate these features in one way or another. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Mon, 2013-03-04 at 17:58 +, Alan Gauld wrote: […] There are so many web frameworks for Python that asking which is bet is rather pointless. They are all fairly good, some are very good for specific tasks, others are more general. The main thing to start with is pick one and learn it. You can switch later once you understand the concepts but stick with one until you do. I think it probably is worth dividing the full stack frameworks from the microframeworks since although the latter can be combined with other frameworks to emulate the former, they can serve better for some web applications that do not need big database support. My personal recommendation would be either to go direct to Django or try CherryPy. But there are plenty of advocates for the other options too. It really is less important which one you choose, rather focus on understanding the concepts of translating urls to Python methods, using templates to isolate code from presentation and using databases to store data. The frameworks all facilitate these features in one way or another. Many will argue that there are better full stack frameworks, but as of today Django is definitely a not wrong proposal. Principally because the documentation is very extensive and there is an excellent tutorial using TDD at http://www.tdd-django-tutorial.com/ For microframeworks, Bottle is getting a lot of good press. Flask also except that it doesn't have a Python 3 presence as far as I know just now. -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.win...@ekiga.net 41 Buckmaster Roadm: +44 7770 465 077 xmpp: rus...@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder signature.asc Description: This is a digitally signed message part ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
Python 3.3 will definitely install independently of 3.0 on Windows. It's only the minor versions that happen in place, like going from 3.3 to 3.3.1 If you're running your scripts explicitly, by something like: python myscript.py then you should be able to say python3.3 myscript.py or python3.0 myscript.py thanks it installed independently like you said. and those python3.3 or python3.0 in the command line seems to do the trick!___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
thanks for the recommendations. I think i will try a smaller framework first (haven't decided which) to learn how it all works without the additional features. Then probably will go for Django after i get comfortable working with the web ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Mon, Mar 4, 2013 at 2:58 PM, Lolo Lolo losermelo...@yahoo.com wrote: then you should be able to say python3.3 myscript.py or python3.0 myscript.py thanks it installed independently like you said. and those python3.3 or python3.0 in the command line seems to do the trick! I don't know how that's working. There are no executables or batch files with those names in the default installations. It's always python.exe. Plus the default install options don't muck with the PATH environment variable. Did you rename (or NTFS symlink) the executables and add the install directories to your PATH? 3.3 installs py.exe to the Windows directory, which you can use like this: py -3.3 myscript.py py -3.0 myscript.py Or add a shebang to the first line of the script such as #!/usr/bin/env python3.0 Then you can simply run myscipt.py. The 3.3 installer associates the extension with py.exe, which parses the shebang line. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
I don't know how that's working. There are no executables or batch files with those names in the default installations. It's always python.exe. Plus the default install options don't muck with the PATH environment variable. Did you rename (or NTFS symlink) the executables and add the install directories to your PATH? 3.3 installs py.exe to the Windows directory, which you can use like this: py -3.3 myscript.py py -3.0 myscript.py Or add a shebang to the first line of the script such as #!/usr/bin/env python3.0 Then you can simply run myscipt.py. The 3.3 installer associates the extension with py.exe, which parses the shebang line. -- no sorry i made a mistake it didnt work. i cd into the particular python version directory that i named python3.0 and python3.3. sorry that was my mistake. Once i was in the correct directory i used the command: python filename.py in cmd and the correct version was opened. Since installing 3.3 my .py files have lost their python icon, like when there is no default program to open it, looks like this: http://www.google.co.uk/imgres?imgurl=http://filext.com/images/icon_unknownassociation.gifimgrefurl=http://filext.com/faq/remove_filext_get_cknow.phph=48w=39sz=2tbnid=ARzowXfVVRzKFM:tbnh=48tbnw=39zoom=1usg=__aeaxTXEytmXEPgmJ-92PpGRrYho=docid=YuYbltBMCbahiMsa=Xei=21s1UbLjE8i0PLXqgXgved=0CFMQ9QEwAwdur=2179 im not sure what to do because on double click they still open and work fine, so the right program is still opening them. Also can i ask, only if you have tried both cherrypy and bottle. I know which i choose doesnt matter, and i will probably randomly select one, but i would like to hear an opinion of someone who has used the 2. since i will eventually go to django, the lighter one out of the two is the one i would favour. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
(Please get the quoting right in your messages. Either you've got a brain-dead mail program, or you're trying to bypass it's methods. On your last message you attributed Eryksun's comments as though they were your own.) On 03/04/2013 09:49 PM, Lolo Lolo wrote: no sorry i made a mistake it didnt work. snip im not sure what to do because on double click they still open and work fine, so the right program is still opening them. No idea what you mean by work fine. You mean that it runs 3.0 for some scripts when you right click on the script, and 3.3 on other scripts when you right click on them? In that case, you must have the py.exe associated with the .py directory, and you must have shebang lines in your scripts. So you should be able to simply name the script on the command line: Instead ofpython myscript.py Just say myscript.py -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
(Please get the quoting right in your messages. Either you've got a brain-dead mail program, or you're trying to bypass it's methods. On your last message you attributed Eryksun's comments as though they were your own.) sorry this is yahoo's fault, i have to manually insert the in every message i reply to. i forgot to do it in my last message. No idea what you mean by work fine. You mean that it runs 3.0 for some scripts when you right click on the script, and 3.3 on other scripts when you right click on them? In that case, you must have the py.exe associated with the .py directory, and you must have shebang lines in your scripts. no if i double click the .py file, Python 3.3 opens all of my python 3 files. A lot of 3.0 files won't run but that's okay. Now on my command line if i enter the correct version's directory, and use: python myfile.py then the correct version's .exe opens the file. When i said it works fine, i was just suprised why my files lost their python icon but are still opened by python when i double click them___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Mon, Mar 4, 2013 at 10:54 PM, Lolo Lolo losermelo...@yahoo.com wrote: no if i double click the .py file, Python 3.3 opens all of my python 3 files. A lot of 3.0 files won't run but that's okay. Now on my command line if i enter the correct version's directory, and use: python myfile.py then the correct version's .exe opens the file. When i said it works fine, i was just suprised why my files lost their python icon but are still opened by python when i double click them Installing 3.3 associated .py files with %windir%\py.exe, but it seems the icon cache wasn't refreshed. You can trigger a refresh by setting any default in the Default Programs control panel applet. If that fails, you can manually delete the cache from the cmd shell: del /a %localappdata%\IconCache.db It will be rebuilt at your next login. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On 03/04/2013 11:57 PM, eryksun wrote: On Mon, Mar 4, 2013 at 10:54 PM, Lolo Lolo losermelo...@yahoo.com wrote: no if i double click the .py file, Python 3.3 opens all of my python 3 files. A lot of 3.0 files won't run but that's okay. Now on my command line if i enter the correct version's directory, and use: python myfile.py then the correct version's .exe opens the file. When i said it works fine, i was just suprised why my files lost their python icon but are still opened by python when i double click them Installing 3.3 associated .py files with %windir%\py.exe, Lolo - Assuming eryksun is correct, all you need is to add shebang lines to the files that you want to run 3.0 The line must be the very first line in the file, and it consists of the characters #! followed by the path to the executable. Try: #!c:\python3.3\python.exe (or wherever the installation directory actually is) or what Eryksun suggested: #!/usr/bin/env python3.0 I can't tell which would be right, since I don't run Windows. Any more. -- DaveA ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
On Tue, Mar 5, 2013 at 12:14 AM, Dave Angel da...@davea.name wrote: #!c:\python3.3\python.exe (or wherever the installation directory actually is) or what Eryksun suggested: #!/usr/bin/env python3.0 I can't tell which would be right, since I don't run Windows. Any more. Both forms work. The /usr paths are virtual, of course. You can also add custom commands to %localappdata%\py.ini in the [commands] section (e.g. to use PyPy or Jython). ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] some web and python version questions
Installing 3.3 associated .py files with %windir%\py.exe, but it seems the icon cache wasn't refreshed. You can trigger a refresh by setting any default in the Default Programs control panel applet. If that fails, you can manually delete the cache from the cmd shell: del /a %localappdata%\IconCache.db It will be rebuilt at your next login. that last command returns The system cannot find the path specified. Any ideas which directory i should do that in?___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor