Question regarding 2 modules installed via 'pip'
Finally i have managed to install 'Python' and 'Python-pip' from rpms from EPEL repository. That good BUT: root@secure [~]# pip install pymysql Downloading/unpacking pymysql Downloading PyMySQL-0.6.1.tar.gz (51kB): 51kB downloaded Running setup.py egg_info for package pymysql Installing collected packages: pymysql Running setup.py install for pymysql Successfully installed pymysql Cleaning up... root@secure [~]# pip install pygeoip Downloading/unpacking pygeoip Downloading pygeoip-0.3.0.tar.gz (97kB): 97kB downloaded Running setup.py egg_info for package pygeoip Installing collected packages: pygeoip Running setup.py install for pygeoip Successfully installed pygeoip Cleaning up... root@secure [~]# root@secure [~]# pip list py* distribute (0.6.10) ethtool (0.6) iniparse (0.3.1) iwlib (1.0) pycurl (7.19.0) pygeoip (0.3.0) pygpgme (0.1) PyMySQL (0.6.1) urlgrabber (3.9.1) yum-metadata-parser (1.1.2) root@secure [~]# but when is: http://superhost.gr i get the error you will like 'pymysql' and 'pymysql' are missing Since they are install how can they be missing? root@secure [~]# which python /usr/bin/python root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# The only thing i can think of is that those packages have installed under default python 2.6.6 and not under Python 3.3.2. Can this be the case here? And if yes then, how will i e those 2 packages with latest python? -- https://mail.python.org/mailman/listinfo/python-list
Re: Program Translation - Nov. 14, 2013
I downloaded the packed file mentioned, extracted the files and had a look at the Fortran sources given: ETGTAB.FOR and ETGTAB.F The ETGTAB.FOR file had double spacing, which Iremoved automatically, then compared the two sources automatically (passing and copying equals and offering choice between lexically different lines). The two files were now very nearly identical, but the .FOR file had some CALLs to GEOEXT(IUIT6,DEXTIM) which were commented out in the other; also calls to LAHEY timing functions not used in the .F version (and a minor change in two format statements which effectively just changed the shift in the output report). I don't see why not either source (given access to the external GEOEXT, etc, fuctions) shouldn't be left for compilation (and later running) by any F77 or later compiler. The code is still valid. -- https://mail.python.org/mailman/listinfo/python-list
Re: Implementing #define macros similar to C on python
15.11.13 06:57, Chris Angelico написав(ла): On Fri, Nov 15, 2013 at 3:10 PM, Roy Smith r...@panix.com wrote: Why would you want to? One of the most horrible things about C/C++ is the preprocessor. Hey, that's not fair! Without the preprocessor, how would you be able to do this: //Hide this part away in a header file somewhere struct b0rkb0rk { float value; b0rkb0rk(float v):value(v) {} operator float() {return value;} float operator +(float other) {return value+other-0.1;} }; //Behold the power of the preprocessor! #define float b0rkb0rk //Okay, now here's your application #include iostream int main() { std::cout Look how stupidly inaccurate float is!\n; float x = 123.0f; std::cout 123.0 + 2.0 = x + 2.0f \n; std::cout See? You should totally use double instead.\n; } (Anybody got a cheek de-tonguer handy? I think it's stuck.) class b0rkb0rk(float): ... def __add__(self, other): ... return super().__add__(other) - 0.1 ... import builtins builtins.float = b0rkb0rk float(123) + 2 124.9 -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Op 16-11-13 09:52, Ferrous Cranus schreef: but when is: http://superhost.gr i get the error you will like 'pymysql' and 'pymysql' are missing Since they are install how can they be missing? root@secure [~]# which python /usr/bin/python root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# The only thing i can think of is that those packages have installed under default python 2.6.6 and not under Python 3.3.2. Can this be the case here? It can be the case. Now think of a way to verify this. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list
Re: To whoever hacked into my Database
On 11/11/13 09:36, Νίκος Αλεξόπουλος wrote: Tell the mighty female hacker to polish her nails, do her hair and fix a good meal. Nikos, I'm afraid I'm not very impressed by this misogynist nonsense you keep coming out with about how your supposed female hacker ought to be doing stereotypically female things instead. Please can you stop making these comments? I don't think it's very pleasant or inclusive for the Python community (as a whole, not just women) to see comments like these being made and not being called out. Thanks, Rob -- https://mail.python.org/mailman/listinfo/python-list
Re: Running python's own unit tests?
On 15/11/2013 23:10, Russell E. Owen wrote: In article 5285223d.50...@timgolden.me.uk, Tim Golden m...@timgolden.me.uk wrote: http://docs.python.org/devguide/ Thank you and the other responders. I was expecting to find the information here http://docs.python.org/2/using/unix.html under Building Python. The developer's guide is a nice resource. There's probably a case for referring to the dev guide from that page under Building Python. I'll propose a patch. TJG -- https://mail.python.org/mailman/listinfo/python-list
Re: Automation
On 16/11/2013 02:01, Dennis Lee Bieber wrote: Given that English contains remnants of latin (from the Roman occupation), saxons (a germanic tribe), angles (another germanic tribe), danish (after the joining of the anglo-saxon), other vikings (norse), then the norman invasion (which was a mix of norse and old french), etc. -- the overlapping of orthographic elements is no surprise. I'm trying to work out what the(?) language should be called given the above list. Sure English is derived from those angles, but by the time you've derived all the other names and strung them all together, phew, what a mouthful. It's best not to go there, yes? Also consider how the language has changed from Chaucer, through Shakespear, Dickins and now J.K. Rowling. Then there's the centre of the universe, Breamore is prounced Bremmer and used to be spelt Bremmer. Don't ask :) -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Implementing #define macros similar to C on python
On 16/11/2013 05:38, JL wrote: On Saturday, November 16, 2013 8:22:25 AM UTC+8, Mark Lawrence wrote: Yes but please don't top post. Actually print is a statement in Python 2 so your code should work if you use from __future__ import print_function at the top of your code. Would you also be kind enough to read and action this https://wiki.python.org/moin/GoogleGroupsPython to prevent the double line spacing shown above, thanks. Thank you for the tip. Will try that out. Hope I get the posting etiquette right this time. No problem. It's not a matter of etiquette, it's using a tool that's not flawed :) -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Perhaps by doing: locate pymysql locate pygeoip or perhaps by using find as follows: /usr/local/lib/python3.4/site-packages/PyMySQL-0.6.1-py3.4.egg/pymysql /usr/lib/python2.6/site-packages/pymysql /var/tmp/pip-build-root/pymysql /var/tmp/pip-build-root/pymysql/pymysql /var/tmp/pip-build-root/pymysql/build/lib/pymysql /tmp/pip-build-root/pymysql /tmp/pip-build-root/pymysql/pymysql /tmp/pip-build-root/pymysql/build/lib/pymysql root@secure [~]# find / -name pygeoip /usr/lib/python2.6/site-packages/pygeoip /var/tmp/pip-build-root/pygeoip /var/tmp/pip-build-root/pygeoip/build/lib/pygeoip /var/tmp/pip-build-root/pygeoip/pygeoip /tmp/pip-build-root/pygeoip /tmp/pip-build-root/pygeoip/build/lib/pygeoip /tmp/pip-build-root/pygeoip/pygeoip root@secure [~]# -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
What the difference between locate and find? and seen find show me some results, what now? 'rm -rf' those files or i will break something? and then how i'am gonna install those 2 modules for python 3.3.2? -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
not related to python On Sat, Nov 16, 2013 at 8:10 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Perhaps by doing: locate pymysql locate pygeoip or perhaps by using find as follows: /usr/local/lib/python3.4/site-packages/PyMySQL-0.6.1-py3.4.egg/pymysql /usr/lib/python2.6/site-packages/pymysql /var/tmp/pip-build-root/pymysql /var/tmp/pip-build-root/pymysql/pymysql /var/tmp/pip-build-root/pymysql/build/lib/pymysql /tmp/pip-build-root/pymysql /tmp/pip-build-root/pymysql/pymysql /tmp/pip-build-root/pymysql/build/lib/pymysql root@secure [~]# find / -name pygeoip /usr/lib/python2.6/site-packages/pygeoip /var/tmp/pip-build-root/pygeoip /var/tmp/pip-build-root/pygeoip/build/lib/pygeoip /var/tmp/pip-build-root/pygeoip/pygeoip /tmp/pip-build-root/pygeoip /tmp/pip-build-root/pygeoip/build/lib/pygeoip /tmp/pip-build-root/pygeoip/pygeoip root@secure [~]# -- https://mail.python.org/mailman/listinfo/python-list -- Joel Goldstick http://joelgoldstick.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Saturday, November 16, 2013 8:45:51 AM UTC-5, Ferrous Cranus wrote: What the difference between locate and find? and seen find show me some results, what now? 'rm -rf' those files or i will break something? and then how i'am gonna install those 2 modules for python 3.3.2? For locate vs find, you should find a Unix tutorial online, there are many, and will be a better resource than us. Please keep in mind that some of your questions are about how to operate Unix, which is off-topic for this list. Just as you use which python to figure out what python was executing, which pip will help you figure out what pip is running. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Program Translation - Nov. 14, 2013
On Nov 16, 2013, at 4:31 AM, Terence tbwri...@bigpond.net.au wrote: I downloaded the packed file mentioned, extracted the files and had a look at the Fortran sources given: ETGTAB.FOR and ETGTAB.F The ETGTAB.FOR file had double spacing, which Iremoved automatically, then compared the two sources automatically (passing and copying equals and offering choice between lexically different lines). The two files were now very nearly identical, but the .FOR file had some CALLs to GEOEXT(IUIT6,DEXTIM) which were commented out in the other; also calls to LAHEY timing functions not used in the .F version (and a minor change in two format statements which effectively just changed the shift in the output report). I don't see why not either source (given access to the external GEOEXT, etc, fuctions) shouldn't be left for compilation (and later running) by any F77 or later compiler. The code is still valid. Then, use F2PY to put a python wrapper around the code, and it could easily be incorporated into the python workflow that the OP was originally asking for. -Bill -- https://mail.python.org/mailman/listinfo/python-list
Re: Automation
On Nov 16, 2013, at 1:17 AM, Larry Hudson org...@yahoo.com wrote: [byte] However, that's just a side comment. I wanted to mention my personal peeve... I notice it's surprisingly common for people who are native English-speakers to use 'to' in place of 'too' (to little, to late.), your in place of you're (Your an idiot!) and 'there' in place of 'their' (a foot in there mouth.) There are similar mis-usages, of course, but those three seem to be the most common. Now, I'm a 76-year-old curmudgeon and maybe overly sensitive, but I felt a need to vent a bit. -=- Larry -=- And my personal peeve - using it's (contraction) when its (possessive) should have been used; occasionally vice-versa. -Bill -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
HELP ME Στις 16/11/2013 3:53 μμ, ο/η Joel Goldstick έγραψε: not related to python On Sat, Nov 16, 2013 at 8:10 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Perhaps by doing: locate pymysql locate pygeoip or perhaps by using find as follows: /usr/local/lib/python3.4/site-packages/PyMySQL-0.6.1-py3.4.egg/pymysql /usr/lib/python2.6/site-packages/pymysql /var/tmp/pip-build-root/pymysql /var/tmp/pip-build-root/pymysql/pymysql /var/tmp/pip-build-root/pymysql/build/lib/pymysql /tmp/pip-build-root/pymysql /tmp/pip-build-root/pymysql/pymysql /tmp/pip-build-root/pymysql/build/lib/pymysql root@secure [~]# find / -name pygeoip /usr/lib/python2.6/site-packages/pygeoip /var/tmp/pip-build-root/pygeoip /var/tmp/pip-build-root/pygeoip/build/lib/pygeoip /var/tmp/pip-build-root/pygeoip/pygeoip /tmp/pip-build-root/pygeoip /tmp/pip-build-root/pygeoip/build/lib/pygeoip /tmp/pip-build-root/pygeoip/pygeoip root@secure [~]# -- https://mail.python.org/mailman/listinfo/python-list -- WebHost http://superhost.gr -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
In article cfd71610-1e34-4fec-82b0-fac2d4e91...@googlegroups.com, Ned Batchelder n...@nedbatchelder.com wrote: Just as you use which python to figure out what python was executing, which pip will help you figure out what pip is running. And along those lines, if you're unsure where you're importing a module from, you can examine the __file__ attribute to find out: import requests requests.__file__ '/home/songza/deploy/rel-2013-11-14d/python/local/lib/python2.7/site-pack ages/requests/__init__.pyc' -- https://mail.python.org/mailman/listinfo/python-list
Static Website Generator
Hello, i want try a static Website Generator. Has someone an advice for a simple and easy System to use? I want run my blog with it, so the system should run with my design of Website. I has try Pelican, but its i dont know that themeing make me crazy. Thanks For Help Nice Weekend Silvio -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 2013-11-16 13:59, Νίκος wrote: HELP ME The kind people at http://serverfault.com/ can help you with your system administration problems. I'm afraid that we cannot. -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Saturday, November 16, 2013 8:59:13 AM UTC-5, Ferrous Cranus wrote: HELP ME Στις 16/11/2013 3:53 μμ, ο/η Joel Goldstick έγραψε: not related to python Nikos, stop this. You are sending repeated emails with no new information, and no evidence that you have tried anything, about off-topic questions. This will only annoy people on the list. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Automation
In article mailman.2714.1384611545.18130.python-l...@python.org, William Ray Wing w...@mac.com wrote: And my personal peeve - using it's (contraction) when its (possessive) should have been used; occasionally vice-versa. And one of mine is when people write, Here, here! to signify agreement. What they really mean to write is, Hear, hear!, meaning, Listen to what that person said. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Τη Σάββατο, 16 Νοεμβρίου 2013 5:04:41 μ.μ. UTC+2, ο χρήστης Ned Batchelder έγραψε: On Saturday, November 16, 2013 8:59:13 AM UTC-5, Ferrous Cranus wrote: HELP ME Στις 16/11/2013 3:53 μμ, ο/η Joel Goldstick έγραψε: not related to python Nikos, stop this. You are sending repeated emails with no new information, and no evidence that you have tried anything, about off-topic questions. This will only annoy people on the list. My first post had information within it. Alo i have managed to utilize EPEL repository and install python33 and python-pip using it without ZERO help from you. Now i cant overcome the moules obstacle although i ave installed it like pip install pymysql pip install pygeoip Why cant i use it? How can i unistall it and install it properly? If you know and wont tell me but instead you devote time to make ironic comments against me i will re-post the exact same question each time. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Τη Σάββατο, 16 Νοεμβρίου 2013 5:01:15 μ.μ. UTC+2, ο χρήστης Robert Kern έγραψε: On 2013-11-16 13:59, Νίκος wrote: HELP ME The kind people at http://serverfault.com/ can help you with your system administration problems. I'm afraid that we cannot. -- Robert Kern Robert i have followed your advise and akse there the other time for why yum cannot detect python and pip and what i should do. i received no reply 2-3 days now. I will nto ask there again. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Sun, Nov 17, 2013 at 2:11 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: If you know and wont tell me but instead you devote time to make ironic comments against me i will re-post the exact same question each time. Then you will quickly get killfiled by more and more people, and in the process will be working hard to destroy this group. Your questions are NOT PYTHON QUESTIONS and they should be taken elsewhere. You have been advised of this. Go, confront the problem. Fight! Win! ChrisA not finishing the quote from Edna Mode as it's applicable only that far -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Also there are leftovers form python3.4a Iam thinking fo deleting those as: 'locate pythοn3.4 | rm -rf' will this help or do any accidental damage? -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 16/11/2013 13:45, Ferrous Cranus wrote: What the difference between locate and find? I neither know nor care as it's not Python related. and seen find show me some results, what now? 'rm -rf' those files or i will break something? Ditto. and then how i'am gonna install those 2 modules for python 3.3.2? I assume you can navigate to the Python 3.3.2 directory where pip is installed and run it from there. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Static Website Generator
Hi, On Sat, 16 Nov 2013 14:21:04 +0100 Silvio Siefke wrote: i want try a static Website Generator. Has someone an advice for a simple and easy System to use? I want run my blog with it, so the system should run with my design of Website. have you looked at http://ringce.com/hyde . I currently use the Ruby based Jekyll website generator because I am hosting at GitHub Pages where only this software is supported but I tried Hyde long time ago and I remember that does nearly the same work. Regards, Johannes -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Τη Σάββατο, 16 Νοεμβρίου 2013 5:19:21 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: On Sun, Nov 17, 2013 at 2:11 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: If you know and wont tell me but instead you devote time to make ironic comments against me i will re-post the exact same question each time. Then you will quickly get killfiled by more and more people, and in the process will be working hard to destroy this group. Your questions are NOT PYTHON QUESTIONS and they should be taken elsewhere. You have been advised of this. Go, confront the problem. Fight! Win! I have no intention to destroy this fine group, all i need is some imple help. Please just help me solve this since you are see me trying and not just make unhelpful remarks. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Τη Σάββατο, 16 Νοεμβρίου 2013 5:20:51 μ.μ. UTC+2, ο χρήστης Mark Lawrence έγραψε: On 16/11/2013 13:45, Ferrous Cranus wrote: What the difference between locate and find? I neither know nor care as it's not Python related. and seen find show me some results, what now? 'rm -rf' those files or i will break something? Ditto. Doe 'ditto' mean 'yes'? Here si what i ahve tried: root@secure [~]# locate *python3.4* /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# locate *python3.4* | rm -rf root@secure [~]# locate *python3.4* /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# find / -name *python3.4* | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 many files of python's 3.4a have been deleted this way, but the aboe displayed persist. and then how i'am gonna install those 2 modules for python 3.3.2? I assume you can navigate to the Python 3.3.2 directory where pip is installed and run it from there. root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory It seems that i cannot even cd into this folder, wtf -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 16.11.2013 16:13, Ferrous Cranus wrote: Τη Σάββατο, 16 Νοεμβρίου 2013 5:01:15 μ.μ. UTC+2, ο χρήστης Robert Kern έγραψε: The kind people at http://serverfault.com/ can help you with your system administration problems. I'm afraid that we cannot. Robert i have followed your advise and akse there the other time for why yum cannot detect python and pip and what i should do. i received no reply 2-3 days now. I will nto ask there again. The only question I've found from you on serverfault http://serverfault.com/questions/555054/python-pip-installation-under-centos-6-4 was answered within one hour (you asked at 2013-11-14 17:27:33Z, yoonix answered at 2013-11-14 18:19:54Z). But since he didn't spoonfed you, no wonder that you ignore that answer. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Just as you use which python to figure out what python was executing, which pip will help you figure out what pip is running. root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory root@secure [~]# which pip /usr/bin/pip root@secure [~]# cd /usr/bin/pip -bash: cd: /usr/bin/pip: Not a directory WHAT THE FUCK IS GOING ON WITH THIS DAMN CentOS 6.4? WHY CANT I JUST CD INTO HESE DAMN FOLDERS? -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Sat, 16 Nov 2013 07:32:36 -0800 (PST) Ferrous Cranus wrote: Τη Σάββατο, 16 Νοεμβρίου 2013 5:20:51 μ.μ. UTC+2, ο χρήστης Mark Lawrence έγραψε: On 16/11/2013 13:45, Ferrous Cranus wrote: root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory It seems that i cannot even cd into this folder, wtf Nikos, please stop now! We can not teach you in Unix/Linux basics here. You really have to learn a lot. You are missing tons of basics so it makes no sense to help you here because you need to learn a lot before you can understand answers to this! BTW, /usr/bin/python3 is a file and not a directory! This is what the error message says! You are really destroying this list! Go to other places like stackoverflow and ask your questions there. You are mixing a lot of topics and this is not helpful to others! Johannes -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Saturday, November 16, 2013 10:45:38 AM UTC-5, Johannes Findeisen wrote: On Sat, 16 Nov 2013 07:32:36 -0800 (PST) Ferrous Cranus wrote: Τη Σάββατο, 16 Νοεμβρίου 2013 5:20:51 μ.μ. UTC+2, ο χρήστης Mark Lawrence έγραψε: On 16/11/2013 13:45, Ferrous Cranus wrote: root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory It seems that i cannot even cd into this folder, wtf Nikos, please stop now! We can not teach you in Unix/Linux basics here. You really have to learn a lot. You are missing tons of basics so it makes no sense to help you here because you need to learn a lot before you can understand answers to this! BTW, /usr/bin/python3 is a file and not a directory! This is what the error message says! Johannes, in cases like this, it is very important to have a clear message. I liked that you said, We cannot teach you Unix basics here. It weakens that message if you then teach some Unix basics. Better to keep things very simple. Unix questions are off-topic, and will not be answered in this forum. Do not answer them. --Ned. Johannes -- https://mail.python.org/mailman/listinfo/python-list
Re: Static Website Generator
On Nov 16, 2013 3:45 PM, Silvio Siefke siefke_lis...@web.de wrote: Hello, i want try a static Website Generator. Has someone an advice for a simple and easy System to use? I want run my blog with it, so the system should run with my design of Website. I has try Pelican, but its i dont know that themeing make me crazy. I love (full disclosure: and co-develop) Nikola — http://getnikola.com/ Theming Nikola is not hard, takes a few minutes tops. -- https://mail.python.org/mailman/listinfo/python-list
PYTHON 3.4 LEFTOVERS
root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! root@secure [~]# locate python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# still there!!! == The Questions Are: 1. DELETE ALL REMAINS OF PYTHON3.4 2. HOW AM'I I GOING TO DELETE THESE 2 PACKAGES THAT PIP INSTALLED 3. HOW CAN I PROPERLY INSTALL THE ABOVE 2 WRONGLY PLACED MODULES SO THEY CAN BE USED BY PYTHON 3.3.2 -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Sat, 16 Nov 2013 07:56:47 -0800 (PST) Ned Batchelder wrote: Johannes, in cases like this, it is very important to have a clear message. I liked that you said, We cannot teach you Unix basics here. It weakens that message if you then teach some Unix basics. Better to keep things very simple. Unix questions are off-topic, and will not be answered in this forum. Do not answer them. Hi Ned, You are totally right, I agree with you! Thanks for your reply! I will not do that anymore. Johannes -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On Saturday, November 16, 2013 11:03:39 AM UTC-5, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! root@secure [~]# locate python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# still there!!! == The Questions Are: 1. DELETE ALL REMAINS OF PYTHON3.4 2. HOW AM'I I GOING TO DELETE THESE 2 PACKAGES THAT PIP INSTALLED 3. HOW CAN I PROPERLY INSTALL THE ABOVE 2 WRONGLY PLACED MODULES SO THEY CAN BE USED BY PYTHON 3.3.2 Re-asking questions in a new thread is not a way to get better help. Writing in all caps is not a way to get better help. You are acting badly. Stop it. You are not owed answers by us. This is a community, and people get help by acting like responsible members and listening to what people tell them. You've ignored a number of replies, and are actively breaking the conventions of the community by re-asking panicked questions. Calm down and find some Unix resources elsewhere. Do not repost the same question multiple times in a few hours. Behave yourself. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Τη Σάββατο, 16 Νοεμβρίου 2013 6:07:35 μ.μ. UTC+2, ο χρήστης Ned Batchelder έγραψε: On Saturday, November 16, 2013 11:03:39 AM UTC-5, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! root@secure [~]# locate python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# still there!!! == The Questions Are: 1. DELETE ALL REMAINS OF PYTHON3.4 2. HOW AM'I I GOING TO DELETE THESE 2 PACKAGES THAT PIP INSTALLED 3. HOW CAN I PROPERLY INSTALL THE ABOVE 2 WRONGLY PLACED MODULES SO THEY CAN BE USED BY PYTHON 3.3.2 Re-asking questions in a new thread is not a way to get better help. Writing in all caps is not a way to get better help. You are acting badly. Stop it. You are not owed answers by us. This is a community, and people get help by acting like responsible members and listening to what people tell them. You've ignored a number of replies, and are actively breaking the conventions of the community by re-asking panicked questions. Calm down and find some Unix resources elsewhere. Do not repost the same question multiple times in a few hours. Behave yourself. --Ned. root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! root@secure [~]# locate python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# still there!!! == The Questions Are: 1. DELETE ALL REMAINS OF PYTHON3.4 2. HOW AM'I I GOING TO DELETE THESE 2 PACKAGES THAT PIP INSTALLED 3. HOW CAN I PROPERLY INSTALL THE ABOVE 2 WRONGLY PLACED MODULES SO THEY CAN BE USED BY PYTHON 3.3.2 -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On 16/11/2013 16:09, Ferrous Cranus wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! root@secure [~]# locate python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 root@secure [~]# still there!!! == The Questions Are: 1. DELETE ALL REMAINS OF PYTHON 3.4a 2. HOW AM'I I GOING TO DELETE THESE 2 PACKAGES THAT PIP INSTALLED (pymysql, pygeoip) 3. HOW CAN I PROPERLY INSTALL THE ABOVE 2 WRONGLY PLACED MODULES (pymysql, pygeoip) SO THEY CAN BE USED BY PYTHON 3.3.2 AND NOT BY PYTHON 2.6.6 -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Le 16.11.2013 16:32, Ferrous Cranus a écrit : root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 many files of python's 3.4a have been deleted this way, but the aboe displayed persist. I doubt it, find ... | rm ... does absolutely nothing as you'd have figured out by yourself if you had a brain. and then how i'am gonna install those 2 modules for python 3.3.2? I assume you can navigate to the Python 3.3.2 directory where pip is installed and run it from there. root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory It seems that i cannot even cd into this folder, wtf Perhaps because this is not a folder. Learn to read. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
Le 16.11.2013 16:43, Ferrous Cranus a écrit : Just as you use which python to figure out what python was executing, which pip will help you figure out what pip is running. root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory root@secure [~]# which pip /usr/bin/pip root@secure [~]# cd /usr/bin/pip -bash: cd: /usr/bin/pip: Not a directory WHAT THE FUCK IS GOING ON WITH THIS DAMN CentOS 6.4? WHY CANT I JUST CD INTO HESE DAMN FOLDERS? What don't you understand in what bash told you with Not a directory ? -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Saturday, November 16, 2013 11:48:19 AM UTC-5, YBM wrote: Le 16.11.2013 16:32, Ferrous Cranus a écrit : root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 many files of python's 3.4a have been deleted this way, but the aboe displayed persist. I doubt it, find ... | rm ... does absolutely nothing as you'd have figured out by yourself if you had a brain. and then how i'am gonna install those 2 modules for python 3.3.2? I assume you can navigate to the Python 3.3.2 directory where pip is installed and run it from there. root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory It seems that i cannot even cd into this folder, wtf Perhaps because this is not a folder. Learn to read. Nikos is being annoying, but there is no need to contribute to the thread just to insult him. It doesn't make the thread stop, it doesn't make the list a better community, and it doesn't work to improve Nikos' behavior. http://www.python.org/psf/codeofconduct/ --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 16/11/2013 16:51, Ned Batchelder wrote: On Saturday, November 16, 2013 11:48:19 AM UTC-5, YBM wrote: Perhaps because this is not a folder. Learn to read. Nikos is being annoying, but there is no need to contribute to the thread just to insult him. It doesn't make the thread stop, it doesn't make the list a better community, and it doesn't work to improve Nikos' behavior. http://www.python.org/psf/codeofconduct/ --Ned. For the record has anybody ever pointed Nikos at the code of conduct? If yes good. If no why not, and why then point it out to someone who to my knowledge has never posted here before? -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. Even if you told me to go to hell i will overcome that and i need to thank you because this indeed worked. Why is this find / -name python3.4 -exec rm -rf {} \; different from: find / -name python3.4 | rm -rf Doesn't any command take its input via STDIN or from a text file or from another's command output? If the above was true then wouldn't linux displayed an error when i issued: find / -name python3.4 | rm -rf locate python3.4 | rm -rf The fact that it hasn't and it has indeed deleted many files proved that rm as an other linux command can take input from another's command output. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On Saturday, November 16, 2013 12:00:04 PM UTC-5, Ferrous Cranus wrote: Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. Even if you told me to go to hell i will overcome that and i need to thank you because this indeed worked. Why is this find / -name python3.4 -exec rm -rf {} \; different from: find / -name python3.4 | rm -rf Doesn't any command take its input via STDIN or from a text file or from another's command output? If the above was true then wouldn't linux displayed an error when i issued: find / -name python3.4 | rm -rf locate python3.4 | rm -rf The fact that it hasn't and it has indeed deleted many files proved that rm as an other linux command can take input from another's command output. This is not a Python question, and will not be answered in this forum. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 2013-11-16 17:02, Mark Lawrence wrote: On 16/11/2013 16:51, Ned Batchelder wrote: On Saturday, November 16, 2013 11:48:19 AM UTC-5, YBM wrote: Perhaps because this is not a folder. Learn to read. Nikos is being annoying, but there is no need to contribute to the thread just to insult him. It doesn't make the thread stop, it doesn't make the list a better community, and it doesn't work to improve Nikos' behavior. http://www.python.org/psf/codeofconduct/ --Ned. For the record has anybody ever pointed Nikos at the code of conduct? If yes good. I believe so, but I can't summon the will to search for it. If no why not, and why then point it out to someone who to my knowledge has never posted here before? Being presented with the community's code of conduct is not a punishment for bad behavior. Newcomers are the *primary* audience for the code of conduct. I'm old enough to remember moderated listservs (as was the fashion at the time) that would automatically reply to each new poster with the listserv's charter and expected rules of netiquette (which is what we called it in those halcyon days). -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. I will kindly ask you please to show me a way to: pip install pymysql pip install pygeoip So i will not receive this error at http://superhost.gr Those modules are installed into m system but for some reason i suspect they work under 2.6.6 and not under 3.3.2 Please as soon as you help me solve this issues wich iam inexperienced to solve i will stop posting. I just need a little help form you, that all i ask. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On 16/11/2013 17:02, Ned Batchelder wrote: On Saturday, November 16, 2013 12:00:04 PM UTC-5, Ferrous Cranus wrote: The fact that it hasn't and it has indeed deleted many files proved that rm as an other linux command can take input from another's command output. This is not a Python question, and will not be answered in this forum. --Ned. Excellent news. Going futher off topic, why is your response double spaced? Your email client, my use of Thunderbird, what exactly? -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On Saturday, November 16, 2013 12:14:42 PM UTC-5, Ferrous Cranus wrote: Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. I will kindly ask you please to show me a way to: pip install pymysql pip install pygeoip So i will not receive this error at http://superhost.gr Those modules are installed into m system but for some reason i suspect they work under 2.6.6 and not under 3.3.2 Please as soon as you help me solve this issues wich iam inexperienced to solve i will stop posting. I just need a little help form you, that all i ask. Nikos, you are asking nicely now, but look how many messages you have posted in the last six hours asking the same questions. Please read the code of conduct: http://www.python.org/psf/codeofconduct/ Especially this section: Members of the community are considerate of their peers -- other Python users. We're thoughtful when addressing the efforts of others, keeping in mind that often times the labor was completed simply for the good of the community. You have not been considerate, and you have not acted in a way that shows you care about us as a community. You reap what you sow. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggest an open-source issue tracker, with github integration and kanban boards?
Jason Friedman schrieb: Can you recommend an open source project (or two) written in Python; which covers multi project + sub project issue tracking linked across github repositories? Why does it need to be written in Python? Otherwise it wouldn't be on topic here, would it? Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche) -- https://mail.python.org/mailman/listinfo/python-list
Asyncmongo and Python3: ImportError: No module named 'errors'
I'm about to convert a complete library into python3. I need asnycmongo for this. Trying to install it on Ubuntu. After executing sudo pip3 install asyncmongo I have the following traceback: Traceback (most recent call last): ... import asyncmongo File /usr/local/lib/python3.3/dist-packages/asyncmongo/__init__.py, line 37, in module from errors import (Error, InterfaceError, AuthenticationError, DatabaseError, RSConnectionError, ImportError: No module named 'errors' Is asyncmongo not available for python 3? It's home page does not tell anything about it: https://github.com/bitly/asyncmongo Sorry if this question was answered before, I'm new to Python 3. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Beginner python 3 unicode question
Example interactive: $ python3 Python 3.3.1 (default, Sep 25 2013, 19:29:01) [GCC 4.7.3] on linux Type help, copyright, credits or license for more information. import uuid import base64 base64.b32encode(uuid.uuid1().bytes)[:-6].lower() b'zsz653co6ii6hgjejqhw42ncgy' But when I put the same thing into a source file I get this: Traceback (most recent call last): File /home/gandalf/Python/Lib/shopzeus/yaaf/ui/widget.py, line 94, in __init__ self.eid = uniqueid() File /home/gandalf/Python/Lib/shopzeus/yaaf/ui/__init__.py, line 34, in uniqueid base64.b32encode(uuid.uuid1().bytes)[:-6].lower() TypeError: Can't convert 'bytes' object to str implicitly Why it is behaving differently on the command line? What should I do to fix this? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Why tornado.web.RequestHandler.arguments.get is binary?
I believe most data passed in URLs are character data. RFC 2986 also suggest that the standard should be percent encoded UTF-8: The generic URI syntax mandates that new URI schemes that provide for the representation of character data in a URI must, in effect, represent characters from the unreserved set without translation, and should convert all other characters to bytes according to UTF-8 http://en.wikipedia.org/wiki/UTF-8, and then percent-encode those values. This requirement was introduced in January 2005 with the publication of RFC 3986 http://tools.ietf.org/html/rfc3986. URI schemes introduced before this date are not affected. [1] It is somewhat confusing that URI may be used to represent binary data. More specifically, http and https URLs contain textual data in almost all cases. When it is textual, it must be in UTF-8 (as dictated by the RFC). So what is the reason in arguments.get returning binary data? [1] http://en.wikipedia.org/wiki/Percent-encoding#Percent-encoding_in_a_URI -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On 16/11/2013 15:33, Ferrous Cranus wrote: I have no intention to destroy this fine group, all i need is some imple help. But you are destroying it. You don't read the help given, you don't know the basic Linux commands, you can't use Google, you insist on using profanities to gain attention, you scream and shout for help, you dismiss good advice when you don't know better, you go against the code of conduct for the group. This group had the best signal to noise ratio of any unmoderated group I've seen in the last 15 years. It's full of genuine helpful people with useful replies. I've learnt a lot from reading those replies. I was fascinated watching the car crash of Nikos development at first. I'm still not sure if anyone could really be both so arrogant and completely inept and clueless at the same time. I have a nagging doubt that Nikos is a troll inflicted on us by someone who doesn't like Python and not a person. I should have done this a long time ago... Nikos, welcome to my killfile. *Plonk* (It's *plonk* *plonk* due to the various identities being used.) And yes, I've made comments about Nikos in the threads when I should have known better. Killfiling him will remove any temptation to do so in future. Andy -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question
On 16-11-2013 20:12, Laszlo Nagy wrote: Example interactive: $ python3 Python 3.3.1 (default, Sep 25 2013, 19:29:01) [GCC 4.7.3] on linux Type help, copyright, credits or license for more information. import uuid import base64 base64.b32encode(uuid.uuid1().bytes)[:-6].lower() b'zsz653co6ii6hgjejqhw42ncgy' But when I put the same thing into a source file I get this: Traceback (most recent call last): File /home/gandalf/Python/Lib/shopzeus/yaaf/ui/widget.py, line 94, in __init__ self.eid = uniqueid() File /home/gandalf/Python/Lib/shopzeus/yaaf/ui/__init__.py, line 34, in uniqueid base64.b32encode(uuid.uuid1().bytes)[:-6].lower() TypeError: Can't convert 'bytes' object to str implicitly Why it is behaving differently on the command line? What should I do to fix this? the error is in one of the lines you did not copy here because this works without problems: BEGIN-of script #!/usr/bin/python import uuid import base64 print base64.b32encode(uuid.uuid1().bytes)[:-6].lower() END-of script But, i need to say, i'm also a beginner ;) -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Le 16.11.2013 18:00, Nikos a écrit : Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. Even if you told me to go to hell i will overcome that and i need to thank you because this indeed worked. Why is this find / -name python3.4 -exec rm -rf {} \; different from: find / -name python3.4 | rm -rf Doesn't any command take its input via STDIN or from a text file or from another's command output? No. Not all UNIX commands are filters. rm is NOT a filter. If the above was true then wouldn't linux displayed an error when i issued: find / -name python3.4 | rm -rf locate python3.4 | rm -rf Because you ask to suppress error output by adding -f The fact that it hasn't and it has indeed deleted many files proved that rm as an other linux command can take input from another's command output. No, it does not prove that, it prove that -f does what it is supposed to do, as you'd have done if you'd done man rm : tv@roma:~$ echo a | rm rm: missing operand Try `rm --help' for more information. tv@roma:~$ echo a | rm -f bash: echo: write error: Broken pipe -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On Saturday, November 16, 2013 2:46:40 PM UTC-5, YBM wrote: Le 16.11.2013 18:00, Nikos a écrit : Στις 16/11/2013 6:46 μμ, ο/η YBM έγραψε: Le 16.11.2013 17:30, Ferrous Cranus a écrit : Mark wrote: If you have to deliberately post like this in an attempt to annoy people, would you please not do so using double spaced google crap as it's very annoying, thank you in anticipation. Sure thing Mark, here: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 still there!!! You are utterly stupid: 1st: rm does not read its standard input so doing whatever | rm -fr is useless 2st: even if it had worked (i.e. removed the files) they would still appear with locate, as locate is just reading a database build every day by updatedb (using find btw) What you want to do can be done this way : find / -name python3.4 -exec rm -rf {} \; updatedb locate python3.4 but you'd better go to hell first. Even if you told me to go to hell i will overcome that and i need to thank you because this indeed worked. Why is this find / -name python3.4 -exec rm -rf {} \; different from: find / -name python3.4 | rm -rf Doesn't any command take its input via STDIN or from a text file or from another's command output? No. Not all UNIX commands are filters. rm is NOT a filter. If the above was true then wouldn't linux displayed an error when i issued: find / -name python3.4 | rm -rf locate python3.4 | rm -rf Because you ask to suppress error output by adding -f The fact that it hasn't and it has indeed deleted many files proved that rm as an other linux command can take input from another's command output. No, it does not prove that, it prove that -f does what it is supposed to do, as you'd have done if you'd done man rm : tv@roma:~$ echo a | rm rm: missing operand Try `rm --help' for more information. tv@roma:~$ echo a | rm -f bash: echo: write error: Broken pipe YBM: please consider your actions. First you tell Nikos not to be on this list, and then you answer his questions. This is a confusing mixed message, and will only result in more off-topic questions and follow-ups. If you want a discussion to stop, the best thing to do is to not continue it. I know it is difficult to walk away from someone claiming to know something that they do not. It is very tempting to get the last word and prove that they are wrong. But it often just extends the nonsense. Better is to just ignore it. I haven't always followed this advice myself, but I am learning. --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Asyncmongo and Python3: ImportError: No module named 'errors'
On 16/11/2013 18:58, Laszlo Nagy wrote: I'm about to convert a complete library into python3. I need asnycmongo for this. Trying to install it on Ubuntu. After executing sudo pip3 install asyncmongo I have the following traceback: Traceback (most recent call last): ... import asyncmongo File /usr/local/lib/python3.3/dist-packages/asyncmongo/__init__.py, line 37, in module from errors import (Error, InterfaceError, AuthenticationError, DatabaseError, RSConnectionError, ImportError: No module named 'errors' Is asyncmongo not available for python 3? It's home page does not tell anything about it: https://github.com/bitly/asyncmongo Sorry if this question was answered before, I'm new to Python 3. Have you seen and met its 'requirements'? If you haven't then perhaps that's the problem. -- https://mail.python.org/mailman/listinfo/python-list
Re: Asyncmongo and Python3: ImportError: No module named 'errors'
Sorry if this question was answered before, I'm new to Python 3. Have you seen and met its 'requirements'? If you haven't then perhaps that's the problem. Yes I did. Requirements are: pymongo 1.9+ and tornado. Both are compatible with Python 3 and are installed on my system: gandalf@gandalf-HP-G62-Notebook-PC:~$ python3 Python 3.3.1 (default, Sep 25 2013, 19:29:01) [GCC 4.7.3] on linux Type help, copyright, credits or license for more information. import pymongo pymongo.version '2.6.3' import tornado tornado.version '3.1.1' -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question
the error is in one of the lines you did not copy here because this works without problems: BEGIN-of script #!/usr/bin/python Most probably, your /usr/bin/python program is python version 2, and not python version 3 Try the same program with /usr/bin/python3. And also try the interactive mode with the same program and I think you will see the same phenomenon. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On 2013-11-16 08:03, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf [snip] 1. DELETE ALL REMAINS OF PYTHON3.4 I'm surprised I haven't seen the suggestion to move the / to the end of the entire command...it would certainly DELETE ALL REMAINS OF PYTHON3.4 ;-) Note1: DO NOT DO THIS unless you want to also DELETE ALL REMAINS OF YOUR HARD DRIVE. But hey, Python3.4 would be gone in the process... Note2: you're running commands you don't understand AS ROOT?!?!?! You're just asking for trouble there. Note3: since locate uses a cached DB of files for rapid finding, and your process doesn't rebuild that locate-DB, they'll continue to show up even after you eventually figure out how to successfully remove the files. Use find for both purposes: deletion and verification. -tkc -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question
Why it is behaving differently on the command line? What should I do to fix this? I was experimenting with this a bit more and found some more confusing things. Can somebody please enlight me? Here is a test function: def password_hash(self,password): public = bytearray([random.randint(0,255) for _ in range(5)]) private = bytearray([random.randint(0,255)]) pwd = bytearray(password.encode()) digest = hashlib.sha1(public+pwd+private).digest() print(digest,digest,type(digest)) print(de,digest.encode()) # and some more stuff here... This function was called inside a script, and gave me this: ('digest', '\xa0\x98\x8b\xff\x04\xf9V;\xbd\x1eIHzh\x10-\xc5!\x14\x1b', type 'str') Traceback (most recent call last): File /home/gandalf/Python/Lib/shopzeus/scripts/yaaf_pwmgr.py, line 478, in module pwmgr.run(parser,args) File /home/gandalf/Python/Lib/shopzeus/scripts/yaaf_pwmgr.py, line 241, in run self.authdb.user_create(name,password,propvalues) File /home/gandalf/Python/Lib/shopzeus/yaaf/db/authdb.py, line 205, in user_create password:(password and Binary(self.password_hash(password))) or None, File /home/gandalf/Python/Lib/shopzeus/yaaf/db/authdb.py, line 134, in password_hash print(de,digest.encode()) UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128) Then I have tried the very same thing from the interactive shell: gandalf@gandalf-HP-G62-Notebook-PC:~/Python/Projects/appserver$ python3 Python 3.3.1 (default, Sep 25 2013, 19:29:01) [GCC 4.7.3] on linux Type help, copyright, credits or license for more information. digest = '\xa0\x98\x8b\xff\x04\xf9V;\xbd\x1eIHzh\x10-\xc5!\x14\x1b' digest.encode() b'\xc2\xa0\xc2\x98\xc2\x8b\xc3\xbf\x04\xc3\xb9V;\xc2\xbd\x1eIHzh\x10-\xc3\x85!\x14\x1b' WHAT??? Seems like the default value of the encoding parameter of the str.encode method is different if I start it interactively. But this contradicts its documentation: print(digest.encode.__doc__) S.encode(encoding='utf-8', errors='strict') - bytes Encode S using the codec registered for encoding. Default encoding is 'utf-8'. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors. So is the default utf-8 or not? Should the documentation be updated? Or do we have a bug in the interactive shell? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On 16/11/2013 21:02, Tim Chase wrote: On 2013-11-16 08:03, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf [snip] 1. DELETE ALL REMAINS OF PYTHON3.4 I'm surprised I haven't seen the suggestion to move the / to the end of the entire command...it would certainly DELETE ALL REMAINS OF PYTHON3.4 ;-) Note1: DO NOT DO THIS unless you want to also DELETE ALL REMAINS OF YOUR HARD DRIVE. But hey, Python3.4 would be gone in the process... Note2: you're running commands you don't understand AS ROOT?!?!?! You're just asking for trouble there. Note3: since locate uses a cached DB of files for rapid finding, and your process doesn't rebuild that locate-DB, they'll continue to show up even after you eventually figure out how to successfully remove the files. Use find for both purposes: deletion and verification. -tkc Please stop feeding him, TIA. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question
On 16-11-2013 21:57, Laszlo Nagy wrote: the error is in one of the lines you did not copy here because this works without problems: BEGIN-of script #!/usr/bin/python Most probably, your /usr/bin/python program is python version 2, and not python version 3 Try the same program with /usr/bin/python3. And also try the interactive mode with the same program and I think you will see the same phenomenon. adding some '()' helped: BEGIN-of script #!/usr/bin/python3 import uuid import base64 print (base64.b32encode(uuid.uuid1().bytes)[:-6].lower()) END-of script ~/temp python3 --version Python 3.3.0 -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Op 16-11-13 22:02, Tim Chase schreef: On 2013-11-16 08:03, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf [snip] 1. DELETE ALL REMAINS OF PYTHON3.4 I'm surprised I haven't seen the suggestion to move the / to the end of the entire command...it would certainly DELETE ALL REMAINS OF PYTHON3.4 ;-) Note1: ... Note2: ... Note3: ... Tim, Please don't encourage our Help Vampire. I know this is generally a welcoming community that is generous with its expertise, even if someone asks questions beyond python. But Nikos abuses that generousity which angers and frustrates a lot of people and generates a lot of hostility here. So we need people not to encourage Nikos and that means being rather less friendly with him than with others. So please ignore non python questions from him. With respect to python questions: Don't spoon feed him. Don't answer his questions for him or do his work for him. Give him the information he needs to find things out himself, preferably refer him to the documentation. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question [SOLVED]
So is the default utf-8 or not? Should the documentation be updated? Or do we have a bug in the interactive shell? It was my fault, sorry. The other program used os.system at some places, and it accidentally used python2 instead of python 3. :-( -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On 16/11/2013 21:26, Antoon Pardon wrote: Please don't encourage our Help Vampire. I know this is generally a welcoming community that is generous with its expertise, even if someone asks questions beyond python. But Nikos abuses that generousity which angers and frustrates a lot of people and generates a lot of hostility here. So we need people not to encourage Nikos and that means being rather less friendly with him than with others. So please ignore non python questions from him. With respect to python questions: Don't spoon feed him. Don't answer his questions for him or do his work for him. Give him the information he needs to find things out himself, preferably refer him to the documentation. Although I agree with the sentiments that you give above, I've come to the conclusion that giving him anything is a complete waste of our time. Why answer his questions if he then states he doesn't want to do it that way? Why refer him to documentation if he refuses to read it? I don't like saying this but I believe the only way to get any peace around here is to ignore him completely. Surely by now he's way past his three strikes and you're out limit? -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
Op 16-11-13 22:44, Mark Lawrence schreef: On 16/11/2013 21:26, Antoon Pardon wrote: Please don't encourage our Help Vampire. I know this is generally a welcoming community that is generous with its expertise, even if someone asks questions beyond python. But Nikos abuses that generousity which angers and frustrates a lot of people and generates a lot of hostility here. So we need people not to encourage Nikos and that means being rather less friendly with him than with others. So please ignore non python questions from him. With respect to python questions: Don't spoon feed him. Don't answer his questions for him or do his work for him. Give him the information he needs to find things out himself, preferably refer him to the documentation. Although I agree with the sentiments that you give above, I've come to the conclusion that giving him anything is a complete waste of our time. Why answer his questions if he then states he doesn't want to do it that way? Why refer him to documentation if he refuses to read it? I don't like saying this but I believe the only way to get any peace around here is to ignore him completely. Surely by now he's way past his three strikes and you're out limit? Well I personnaly tend to agree. However I fear that a number of persons will always feel uncomfortable with ignoring Nikos completely. So I see this as a compremise. Those who feel they can't completely ignore Nikos can in this way still contribute in a way that doesn't encourage the help vampiristic behaviour. And maybem just maybe if enough people only refer him to the documentation Nikos will finally start reading them. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list
inconsistency in converting from/to hex
We can convert from hex str to bytes with bytes.fromhex class method: b = bytes.fromhex(ff) But we cannot convert from hex binary: b = bytes.fromhex(bff) Traceback (most recent call last): File stdin, line 1, in module TypeError: must be str, not bytes We don't have bytes_instance.tohex() instance method. But we have binascii.hexlify. But binascii.hexlify does not return an str. It returns a bytes instance instead. import binascii binascii.hexlify(b) b'ff' Its reverse function binascii.unhexlify can be used on str and bytes too: binascii.unhexlify(b'ff') b'\xff' binascii.unhexlify('ff') b'\xff' Questions: * if we have bytes.fromhex() then why don't we have bytes_instance.tohex() ? * if the purpose of binascii.unhexlify and bytes.fromhex is the same, then why allow binary arguments for the former, and not for the later? * in this case, should there be one obvious way to do it or not? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- https://mail.python.org/mailman/listinfo/python-list
Python Beginner
I am called Richard m from western Africa, Cameroon. It was a pleasure for me to join this group. I have been learning python for about 4 months now and i have already mastered alot as far as the language is concern. I am learning how to code, firstly because i love coding and i like to do stuffs. secondly, i wihs to start a small company after learning how to code I am learning python very broadly, meaning i am not concentrating on a single section. I wish to know the language and be able to apply it to any location in the field of tech. i Need some advise on how, and what python can help me setup a business? please just honest replies please -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Beginner
On Sun, Nov 17, 2013 at 9:25 AM, ngangsia akumbo ngang...@gmail.com wrote: I am called Richard m from western Africa, Cameroon. It was a pleasure for me to join this group. Hi! Welcome! secondly, i wihs to start a small company after learning how to code I am learning python very broadly, meaning i am not concentrating on a single section. I wish to know the language and be able to apply it to any location in the field of tech. i Need some advise on how, and what python can help me setup a business? Frankly, my advice to you is: Don't. You've been writing code for a few months, that's great; but starting a company is a completely different thing to do. I would recommend that you primarily code purely for pleasure - that way, if you mess something up, you don't lose money. And then if you want to go professional, get a salaried job at someone else's company, rather than starting your own. It's a HUGE job to run your own company, and that's not something your Python coding skill will help with. Tax, legal requirements, profitability... headaches you don't need. Now, if you're already experienced at running a business, and want to know what Python can do to make your life easier... that we can answer! There are all sorts of automation and convenience jobs you can do with Python. But that's quite different from what I think you're asking here. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question
On Sun, Nov 17, 2013 at 8:19 AM, Laszlo Nagy gand...@shopzeus.com wrote: print(digest,digest,type(digest)) This function was called inside a script, and gave me this: ('digest', '\xa0\x98\x8b\xff\x04\xf9V;\xbd\x1eIHzh\x10-\xc5!\x14\x1b', type 'str') This looks very much like you're running under Python 2. Take care of which interpreter you're running; that might be because of your shebang (as Luuk mentioned), or because of what you're typing to invoke the script; either way, it makes a huge difference. The easiest solution is probably to invoke the interpreter explicitly: Interactive mode: $ python3 Script mode: $ python3 scriptname.py But you seem to have something WAY more complex than a single script. What's the setup? How is Python getting invoked? If your code is getting imported by something else, no shebang will help you - you need the other code to be being executed by the other interpreter. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Beginner python 3 unicode question [SOLVED]
On Sun, Nov 17, 2013 at 8:44 AM, Laszlo Nagy gand...@shopzeus.com wrote: So is the default utf-8 or not? Should the documentation be updated? Or do we have a bug in the interactive shell? It was my fault, sorry. The other program used os.system at some places, and it accidentally used python2 instead of python 3. :-( Oh! Didn't see this post before responding. Oh well. Maybe someone else one day will make use of the other. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Beginner
On Saturday, November 16, 2013 11:41:31 PM UTC+1, Chris Angelico wrote: On Sun, Nov 17, 2013 at 9:25 AM, ngangsia akumbo ngang...@gmail.com wrote: I am called Richard m from western Africa, Cameroon. It was a pleasure for me to join this group. Hi! Welcome! secondly, i wihs to start a small company after learning how to code I am learning python very broadly, meaning i am not concentrating on a single section. I wish to know the language and be able to apply it to any location in the field of tech. i Need some advise on how, and what python can help me setup a business? Frankly, my advice to you is: Don't. You've been writing code for a few months, that's great; but starting a company is a completely different thing to do. I would recommend that you primarily code purely for pleasure - that way, if you mess something up, you don't lose money. And then if you want to go professional, get a salaried job at someone else's company, rather than starting your own. It's a HUGE job to run your own company, and that's not something your Python coding skill will help with. Tax, legal requirements, profitability... headaches you don't need. Now, if you're already experienced at running a business, and want to know what Python can do to make your life easier... that we can answer! There are all sorts of automation and convenience jobs you can do with Python. But that's quite different from what I think you're asking here. ChrisA Thanks for the reply I am experience in running a business. Please i will like to know how python can make things easier as you said. -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Beginner
On Sun, Nov 17, 2013 at 10:22 AM, ngangsia akumbo ngang...@gmail.com wrote: I am experience in running a business. Please i will like to know how python can make things easier as you said. Well, anything you can describe in terms of rules and procedures can be automated. But this is the art of programming; it's hard to describe generally. Find something that you have to do lots of times, and work on automating it. That's what code is good at! ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Python Beginner
On Nov 16, 2013, at 5:25 PM, ngangsia akumbo ngang...@gmail.com wrote: I am called Richard m from western Africa, Cameroon. It was a pleasure for me to join this group. I have been learning python for about 4 months now and i have already mastered alot as far as the language is concern. I am learning how to code, firstly because i love coding and i like to do stuffs. secondly, i wihs to start a small company after learning how to code I am learning python very broadly, meaning i am not concentrating on a single section. I wish to know the language and be able to apply it to any location in the field of tech. i Need some advise on how, and what python can help me setup a business? please just honest replies please -- https://mail.python.org/mailman/listinfo/python-list Hi Richard m from western Africa, Cameroon, and welcome to the list. Your question is VERY broad, and difficult for anyone who is not knowledgeable of the context/business-climate in Cameroon to answer (and I'm afraid that probably includes most of the people on this list.) Chris' advice is spot on, BUT, and if for any reason you think circumstances in Cameroon would lead to a different answer - then, there are three general areas in which a python developer might be able to earn a bit of coin. 1) Consulting, that is, if you know more about a subject than any OTHER businessman in the area, you may be able to sell answers to problems he/they may be having 2) Web development, python (in combination with web-specific frameworks like django) is a really powerful tool for developing web sites 3) Specific, proprietary, application development, if there is some Cameroon-specific application that other locals like yourself would find so useful they would pay money to have it (or an application some local company would pay you for), you might be in a position to sell it. BUT, please note that all three of these are full of if, may, and might qualifiers. They are EXTREMELY difficult to slip through. -Bill -- https://mail.python.org/mailman/listinfo/python-list
Re: inconsistency in converting from/to hex
On Saturday, November 16, 2013 5:16:58 PM UTC-5, Laszlo Nagy wrote: We can convert from hex str to bytes with bytes.fromhex class method: b = bytes.fromhex(ff) But we cannot convert from hex binary: b = bytes.fromhex(bff) Traceback (most recent call last): File stdin, line 1, in module TypeError: must be str, not bytes We don't have bytes_instance.tohex() instance method. But we have binascii.hexlify. But binascii.hexlify does not return an str. It returns a bytes instance instead. import binascii binascii.hexlify(b) b'ff' Its reverse function binascii.unhexlify can be used on str and bytes too: binascii.unhexlify(b'ff') b'\xff' binascii.unhexlify('ff') b'\xff' Questions: * if we have bytes.fromhex() then why don't we have bytes_instance.tohex() ? * if the purpose of binascii.unhexlify and bytes.fromhex is the same, then why allow binary arguments for the former, and not for the later? * in this case, should there be one obvious way to do it or not? The standard library is not always as consistent as we might like. I don't think there is a better answer than that. This will work if you want to use fromhex with bytes: b = bytes.fromhex(bff.decode(ascii)) --Ned. -- https://mail.python.org/mailman/listinfo/python-list
Re: Sharing Python installation between architectures
On Fri, 2013-11-15 at 18:00 -0500, Paul Smith wrote: By this I mean, basically, multiple architectures (Linux, Solaris, MacOSX, even Windows) sharing the same $prefix/lib/python2.7 directory. The large majority of the contents there are completely portable across architectures (aren't they?) so why should I have to duplicate many megabytes worth of files? OK, after some investigation and reading the code in Modules/getpath.c to determine exactly how sys.prefix and sys.exec_prefix are computed (it would be nice if this algorithm was documented somewhere... maybe it is but I couldn't find it) I have a solution for this that appears to be working fairly well. In order to get this to work you need to use the following arguments when you run configure to build your Python: configure --prefix=$PREFIX --exec-prefix=$PREFIX/$ARCH where $ARCH can be pretty much whatever you want, but should be unique for each different architecture of course. The $PREFIX should be the same for all architectures. The magic here is ensuring that the --exec-prefix directory is a SUBDIRECTORY of --prefix. If that's not true, nothing works! The resulting python interpreter will live in $PREFIX/$ARCH/bin: you have to leave it there! If you move it nothing works. Although you can get rid of the bin and move it up into $PREFIX/$ARCH if you want; that's OK. What I do is have a little shell-script wrapper installed somewhere else that runs 'exec $EXECPREFIX/bin/python $@' You can also correctly install extra packages with setup.py, even if those packages have their own shared objects (like pycrypto or whatever). I should say, I've not thought about Windows yet. I don't know if this will work out for Windows. However, Windows is such a different beast anyway I think (at least in my environment) it will be OK to treat it separately and require Windows people to download/install their own Python. There are few nitty things that I needed to handle: 1. The _sysconfigdata.py file is put into $PREFIX not $EXECPREFIX, which is wrong since that file is very much architecture-specific. As a post-processing step I moved it from $PREFIX/... into $EXECPREFIX/.../lib-dynload. It's not quite correct since it's not a dynamic object, but lib-dynload is the only standard path on sys.paths from $EXECPREFIX. It works OK anyway. 2. All the scripts, even the ones in $PREFIX/bin, have hardcoded #! paths which go to a specific python in $EXECPREFIX/bin which is wrong (they can't be shared that way). I use a simple sed -i to replace them all with #!/usr/bin/env python instead. 3. There are some scripts that get dumped into $EXECPREFIX/bin rather than into $PREFIX/bin: 2to3, idle, pydoc, smtpd.py. I think this is simply a bug in the installation and those should all go into $PREFIX/bin. Another weird thing is that the normal installation (this has nothing to do with the above; it happens even if you don't set --exec-prefix) contains TWO copies of libpython2.7.a; one in $EXECPREFIX/lib and one in $EXECPREFIX/lib/python2.7/config. These are over 14M each so it's not inconsequential to have two. I'm deleting the one in lib/python2.7/config and things still seem to work OK. The pkgconfig python definition references the one in $EXECPREFIX/lib. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Sat, 16 Nov 2013 17:49:17 +0100, YBM wrote: Le 16.11.2013 16:43, Ferrous Cranus a écrit : root@secure [~]# which python3 /usr/bin/python3 root@secure [~]# cd /usr/bin/python3 -bash: cd: /usr/bin/python3: Not a directory root@secure [~]# which pip /usr/bin/pip root@secure [~]# cd /usr/bin/pip -bash: cd: /usr/bin/pip: Not a directory WHAT THE FUCK IS GOING ON WITH THIS DAMN CentOS 6.4? WHY CANT I JUST CD INTO HESE DAMN FOLDERS? What don't you understand in what bash told you with Not a directory ? He doesn't understand error messages until he's posted them on usenet and had them explained to him. I think his default state of mind is I'm perfect, therefore I can't have made a mistake, so the software must be broken. Then he posts the error messages here and we all laugh at his ineptitude. I would answer his question, but I foreswore helping him days ago now, you just get too much abuse because (in his opinion) your answer includes excessive whitespace. -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list
Re: Odd msg received from list
Chris Yes, I mean precisely that. The password was sent to me in the body of the message in plaintext. That is what has me very concerned about the list and its ability to protect private information. Regards Jack On 11/15/2013 02:48 PM, Chris “Kwpolska” Warrick wrote: On Fri, Nov 15, 2013 at 12:30 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Verde Denim wrote: The message also listed my account password, which I found odd. You mean the message contained your actual password, in plain text? That's not just odd, it's rather worrying for at least two reasons. First, what business does a message like that have carrying a password, and second, it means the server must be keeping passwords in a readable form somewhere, which is a really bad idea. From the info page at https://mail.python.org/mailman/listinfo/python-list: You may enter a privacy password below. This provides only mild security, but should prevent others from messing with your subscription. **Do not use a valuable password** as it will occasionally be emailed back to you in cleartext. If you choose not to enter a password, one will be automatically generated for you, and it will be sent to you once you've confirmed your subscription. You can always request a mail-back of your password when you edit your personal options. Once a month, your password will be emailed to you as a reminder. -- Regards Jack Boston Tea Party, Coercive Acts, Powder Alarm, Revolution Lessons (Mistakes) not learned are bound to be repeated. -- https://mail.python.org/mailman/listinfo/python-list
Re: Odd msg received from list
On Sun, Nov 17, 2013 at 12:15 PM, Verde Denim tdl...@gmail.com wrote: Chris Yes, I mean precisely that. The password was sent to me in the body of the message in plaintext. That is what has me very concerned about the list and its ability to protect private information. The list specifically told you not to use a valuable password :) In fact, a password is completely optional - it's just an alternative to always having to do a click-through. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggest an open-source issue tracker, with github integration and kanban boards?
Also my team is a Python dev team; so why not choose an open platform written in Python from which we can easily contribute to? On Sun, Nov 17, 2013 at 4:24 AM, Thomas Mlynarczyk tho...@mlynarczyk-webdesign.de wrote: Jason Friedman schrieb: Can you recommend an open source project (or two) written in Python; which covers multi project + sub project issue tracking linked across github repositories? Why does it need to be written in Python? Otherwise it wouldn't be on topic here, would it? Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche) -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
Re: Suggest an open-source issue tracker, with github integration and kanban boards?
Can you recommend an open source project (or two) written in Python; which covers multi project + sub project issue tracking linked across github repositories? Don't know if it covers all what you need, but http://trac.edgewall.org/ is written in Python, and has many, many plugins. -- https://mail.python.org/mailman/listinfo/python-list
How to round trip python and sqlite dates
All the references regarding the subject that I can find, e.g. http://stackoverflow.com/questions/1829872/read-datetime-back-from-sqlite-as-a-datetime-in-python, talk about creating a table in memory using the timestamp type from the Python layer. I can't see how to use that for a file on disk, so after a bit of RTFM I came up with this. import sqlite3 from datetime import datetime, date def datetime2date(datetimestr): return datetime.strptime(datetimestr, '%Y-%m-%d') sqlite3.register_converter('DATETIME', datetime2date) db = sqlite3.connect(r'C:\Users\Mark\Cash\Data\test.sqlite', detect_types=sqlite3.PARSE_DECLTYPES) c = db.cursor() c.execute('delete from temp') row = 'DWP ESA', date(2013,11,18), 'Every two weeks', 143.4, date.max c.execute('insert into temp values (?,?,?,?,?)', row) c.execute('select * from temp') row = c.fetchone() nextdate = row[1] print(nextdate, type(nextdate)) Run it and Traceback (most recent call last): File C:\Users\Mark\MyPython\mytest.py, line 13, in module c.execute('select * from temp') File C:\Users\Mark\MyPython\mytest.py, line 7, in datetime2date return datetime.strptime(datetimestr, '%Y-%m-%d') TypeError: must be str, not bytes However if I comment out the register_converter line this output is printed 2013-11-18 class 'str' Further digging in the sqlite3 file dbapi2.py I found references to convert_date and convert_timestamp, but putting print statements in them and they didn't appear to be called. So how do I achieve the round trip that I'd like, or do I simply cut my loses and use strptime on the string that I can see returned? Note that I won't be checking replies, if any, for several hours as it's now 02:15 GMT and I'm heading back to bed. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
On Saturday 2013 November 16 08:03, Ferrous Cranus wrote: root@secure [~]# find / -name python3.4 | rm -rf root@secure [~]# locate python3.4 /root/.local/lib/python3.4 /usr/local/include/python3.4m /usr/local/lib/libpython3.4m.a /usr/local/lib/python3.4 /usr/local/share/man/man1/python3.4.1 You need to run updatedb after rm before locate will show any change. Read the man page for locate. -- Yonder nor sorghum stenches shut ladle gulls stopper torque wet strainers. -- https://mail.python.org/mailman/listinfo/python-list
Re: PYTHON 3.4 LEFTOVERS
If it is not clear yet, then this is a obvious troll [1]. [1] http://www.politicsforum.org/images/flame_warriors/flame_62.php --- I sail Python -- https://mail.python.org/mailman/listinfo/python-list
grammar (was Re: Automation)
On Sat, 2013-11-16 at 10:11 -0500, Roy Smith wrote: In article mailman.2714.1384611545.18130.python-l...@python.org, William Ray Wing w...@mac.com wrote: And my personal peeve - using it's (contraction) when its (possessive) should have been used; occasionally vice-versa. And one of mine is when people write, Here, here! to signify agreement. What they really mean to write is, Hear, hear!, meaning, Listen to what that person said. The one that really irks me is people using loose when they mean lose. These words are not related, and they don't sound the same. Plus this mistake is very common; I typically see it at least once a day. -- https://mail.python.org/mailman/listinfo/python-list
Re: Static Website Generator
I'll second Nikola (full disclosure: not affiliated) It's easy to get started and the documentation is pretty good. Mako (the themeing language) is good to know as it, or something extremely similar, is used elsewhere. And Nikola is python! I found the tutorial at http://shisaa.jp/postset/nikola-web.html to be quite helpful my first time but it seems to be down at the moment Another generator I've used and found quite good is Hakyll. Designed after Jakyll but in Haskell instead. My Haskell isn't great however so if I needed to add some new functionality it would often take a long time (which isn't always ideal) V.I. On 11/16/2013 11:00 AM, Chris Kwpolska Warrick wrote: On Nov 16, 2013 3:45 PM, Silvio Siefke siefke_lis...@web.de mailto:siefke_lis...@web.de wrote: Hello, i want try a static Website Generator. Has someone an advice for a simple and easy System to use? I want run my blog with it, so the system should run with my design of Website. I has try Pelican, but its i dont know that themeing make me crazy. I love (full disclosure: and co-develop) Nikola --- http://getnikola.com/ Theming Nikola is not hard, takes a few minutes tops. -- https://mail.python.org/mailman/listinfo/python-list
Re: Odd msg received from list
On 11/16/2013 08:18 PM, Chris Angelico wrote: On Sun, Nov 17, 2013 at 12:15 PM, Verde Denim tdl...@gmail.com wrote: Chris Yes, I mean precisely that. The password was sent to me in the body of the message in plaintext. That is what has me very concerned about the list and its ability to protect private information. The list specifically told you not to use a valuable password :) In fact, a password is completely optional - it's just an alternative to always having to do a click-through. ChrisA ChrisA Each one of my accounts is completely different (and as random as I can get them). Each one is also uniquely set to match a set of criteria of my own choosing to indicate level of data, level of composite data, level of integrity, level of criticality, and a few other 'soft values'. This equates to each account being generated in a one-off fashion, so I'm not worried that my list account here will ever show up somewhere else in any other form. However, that doesn't mean that it doesn't concern me that the list is publishing these values back to the list participant(s) in plaintext. If I have to unsubscribe and then re-subscribe without a pass-phrase I can do that but just wanted to make the list admin(s) aware that it had occurred. -- Regards Jack Boston Tea Party, Coercive Acts, Powder Alarm, Revolution Lessons (Mistakes) not learned are bound to be repeated. -- https://mail.python.org/mailman/listinfo/python-list
Re: Question regarding 2 modules installed via 'pip'
On Sat, 16 Nov 2013 07:15:01 -0800 (PST), Ferrous Cranus nikos.gr...@gmail.com wrote: 'locate pythοn3.4 | rm -rf' will this help or do any accidental damage? The files deleted by the rm -rf have nothing to do with the results of locate. Since you don't understand that , your system is at high risk till you learn the use of whichever shell you're using. Come back to python when you understand bash (or whatever shell you're using). -- DaveA -- https://mail.python.org/mailman/listinfo/python-list
Re: grammar (was Re: Automation)
On 2013.11.16 11:02, Paul Smith wrote: The one that really irks me is people using loose when they mean lose. These words are not related, and they don't sound the same. Plus this mistake is very common; I typically see it at least once a day. Don't be surprised if such people pronounce them the same; a lot of such errors are caused by learning incorrect pronunciation. For example, people often write 'should of' because that is what they hear (and what they end up saying). -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 10.0 -- https://mail.python.org/mailman/listinfo/python-list
Re: Oh look, another language (ceylon)
Neal Becker wrote: http://ceylon-lang.org/documentation/1.0/introduction/ The type system looks very interesting! It's just a pity they based the syntax on C rather than something more enlightened. (Why do people keep doing that when they design languages?) -- Greg -- https://mail.python.org/mailman/listinfo/python-list
Re: Odd msg received from list
In article 5288239d.4060...@gmail.com, Verde Denim tdl...@gmail.com wrote: Each one of my accounts is completely different (and as random as I can get them). Each one is also uniquely set to match a set of criteria of my own choosing to indicate level of data, level of composite data, level of integrity, level of criticality, and a few other 'soft values'. This equates to each account being generated in a one-off fashion, so I'm not worried that my list account here will ever show up somewhere else in any other form. However, that doesn't mean that it doesn't concern me that the list is publishing these values back to the list participant(s) in plaintext. If I have to unsubscribe and then re-subscribe without a pass-phrase I can do that but just wanted to make the list admin(s) aware that it had occurred. Sending password reminders is a standard default of the venerable Mailman mailing list software that powers Python-list and many other mailing lists. You can visit the member options page and change the password and/or disable the automatic reminders: https://mail.python.org/mailman/options/python-list -- Ned Deily, n...@acm.org -- https://mail.python.org/mailman/listinfo/python-list
Re: grammar (was Re: Automation)
On 17/11/2013 03:44, Andrew Berg wrote: On 2013.11.16 11:02, Paul Smith wrote: The one that really irks me is people using loose when they mean lose. These words are not related, and they don't sound the same. Plus this mistake is very common; I typically see it at least once a day. Don't be surprised if such people pronounce them the same; a lot of such errors are caused by learning incorrect pronunciation. For example, people often write 'should of' because that is what they hear (and what they end up saying). I get annoyed by those who say pronounciation... -- https://mail.python.org/mailman/listinfo/python-list
Re: Oh look, another language (ceylon)
On Sun, Nov 17, 2013 at 2:41 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Neal Becker wrote: http://ceylon-lang.org/documentation/1.0/introduction/ The type system looks very interesting! It's just a pity they based the syntax on C rather than something more enlightened. (Why do people keep doing that when they design languages?) Because in many ways it's an excellent syntactic structure, and - more importantly - it's one that's familiar to a huge number of programmers. That's pretty valuable. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: grammar (was Re: Automation)
On Sun, Nov 17, 2013 at 3:07 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 17/11/2013 03:44, Andrew Berg wrote: On 2013.11.16 11:02, Paul Smith wrote: The one that really irks me is people using loose when they mean lose. These words are not related, and they don't sound the same. Plus this mistake is very common; I typically see it at least once a day. Don't be surprised if such people pronounce them the same; a lot of such errors are caused by learning incorrect pronunciation. For example, people often write 'should of' because that is what they hear (and what they end up saying). I get annoyed by those who say pronounciation... I decided a while ago that my life would be alot better[1] if I didn't get annoyed at misuse of English, but instead used it as a source of amusement. Oddities can be found everywhere... our hymn book at church has one nasty oops where a not is mistyped as now, rather changing the sense of the sentence. And sometimes it doesn't even take a single letter of difference - someone who'd recently been doing all the touristy stuff around Europe was discussing the historical Battle of Thermopylae, and said Some of us were there (pause) earlier this year - several people began snickering in the pause. ChrisA [1] Bahahahaha, trolled you! -- https://mail.python.org/mailman/listinfo/python-list
Re: grammar (was Re: Automation)
On 2013.11.16 22:16, Chris Angelico wrote: I decided a while ago that my life would be alot better[1] For those who haven't yet seen it: http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 10.0 -- https://mail.python.org/mailman/listinfo/python-list
Re: Oh look, another language (ceylon)
On 17Nov2013 15:10, Chris Angelico ros...@gmail.com wrote: On Sun, Nov 17, 2013 at 2:41 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Neal Becker wrote: http://ceylon-lang.org/documentation/1.0/introduction/ The type system looks very interesting! It's just a pity they based the syntax on C rather than something more enlightened. (Why do people keep doing that when they design languages?) Because in many ways it's an excellent syntactic structure, and - more importantly - it's one that's familiar to a huge number of programmers. That's pretty valuable. Indeed. If your core innovation is the type system (for example), why be _gratuitously_ different in areas where your language semantics are conventional? And of course your default syntax will come from what you're comfortable with unless the syntax is something you're rebelling against. -- Cameron Simpson c...@zip.com.au If you can keep your head while all those about you are losing theirs, perhaps you don't understand the situation. - Paul Wilson paul_wilson@dbsnotes.dbsoftware.com -- https://mail.python.org/mailman/listinfo/python-list
Re: How to round trip python and sqlite dates
Mark Lawrence breamore...@yahoo.co.uk wrote in message news:mailman.2752.1384654581.18130.python-l...@python.org... All the references regarding the subject that I can find, e.g. http://stackoverflow.com/questions/1829872/read-datetime-back-from-sqlite-as-a-datetime-in-python, talk about creating a table in memory using the timestamp type from the Python layer. I can't see how to use that for a file on disk, so after a bit of RTFM I came up with this. import sqlite3 from datetime import datetime, date def datetime2date(datetimestr): return datetime.strptime(datetimestr, '%Y-%m-%d') sqlite3.register_converter('DATETIME', datetime2date) db = sqlite3.connect(r'C:\Users\Mark\Cash\Data\test.sqlite', detect_types=sqlite3.PARSE_DECLTYPES) c = db.cursor() c.execute('delete from temp') row = 'DWP ESA', date(2013,11,18), 'Every two weeks', 143.4, date.max c.execute('insert into temp values (?,?,?,?,?)', row) c.execute('select * from temp') row = c.fetchone() nextdate = row[1] print(nextdate, type(nextdate)) Run it and Traceback (most recent call last): File C:\Users\Mark\MyPython\mytest.py, line 13, in module c.execute('select * from temp') File C:\Users\Mark\MyPython\mytest.py, line 7, in datetime2date return datetime.strptime(datetimestr, '%Y-%m-%d') TypeError: must be str, not bytes However if I comment out the register_converter line this output is printed 2013-11-18 class 'str' Further digging in the sqlite3 file dbapi2.py I found references to convert_date and convert_timestamp, but putting print statements in them and they didn't appear to be called. So how do I achieve the round trip that I'd like, or do I simply cut my loses and use strptime on the string that I can see returned? Note that I won't be checking replies, if any, for several hours as it's now 02:15 GMT and I'm heading back to bed. -- Python is the second best programming language in the world. But the best has yet to be invented. Christian Tismer Mark Lawrence Just a quicky, but I believe you don't have to register the datetime or timestamp converter as it is already implicit in the python to sql adaptation.This should handle the round trip conversion for you. I use some similar code but it's late here now. Paul -- https://mail.python.org/mailman/listinfo/python-list