Re: Lesson 39 of Learning Python the Hard Way hangs (Fixed?)

2015-09-09 Thread YBM
Le 09/09/2015 20:58, Gary Roach a écrit : On 09/09/2015 01:45 PM, John Gordon wrote: In Gary Roach writes: Traceback (most recent call last): File "/root/mystuff/mystuff/ex39_test.py", line 6, in hashmap.set(states, 'Oregon', 'OR') File "/root/mystuff/mystuff/hashmap.py", line

Re: when may sys.executable be empty

2015-03-11 Thread YBM
Le 11/03/2015 15:41, Wolfgang Maier a écrit : From the documentation of sys.executable: A string giving the absolute path of the executable binary for the Python interpreter, on systems where this makes sense. If Python is unable to retrieve the real path to its executable, sys.executable

Re: problem with for and if

2015-01-05 Thread YBM
Le 05/01/2015 15:27, Dariusz Mysior a écrit : I want search count of szukana in zmienna but code below counting all 12 letters from "traktorzysta" word szukana="t" zmienna="traktorzysta" def gen(): count=int(0) for a in zmienna: if szukana in zmienna: count+=1

Re: import graphics library; causes error

2014-11-17 Thread YBM
Le 17/11/2014 04:03, ryguy7272 a écrit : On Sunday, November 16, 2014 3:39:45 PM UTC-5, ryguy7272 wrote: These libraries drive me totally nuts. Sorry, just had to get it out there. Anyway, I open the cmd window, and typed this: 'easy_install python graphics'. So, it starts up and runs/downloa

Re: Unable to run print('Réussi') on windows and on linux

2014-08-14 Thread YBM
Le 14/08/2014 16:04, marc.vanhoomis...@gmail.com a écrit : Hello YBM, I tried your suggestions, without improvement. Further, see my answer to Vincent Vande Vyre Thanks anyway. This is indeed very surprising. Are you sure that you have *exactly* this line at the first or second (not later

Re: Unable to run print('Réussi') on windows and on linux

2014-08-14 Thread YBM
Le 14/08/2014 14:35, marc.vanhoomis...@gmail.com a écrit : Hello, This very simple program runs well on windows 7 # -*- utf8 -*- print('Réussi') But, when I start the vrey same file on Linux (ubuntu 14), I got: Traceback (most recent call last): File "/partages/bureau/PB/Dev/Python3/test.p

Re: how to change the time string into number?

2014-08-13 Thread YBM
Le 14/08/2014 04:16, Tim Chase a écrit : On 2014-08-13 21:01, Tim Chase wrote: On 2014-08-14 09:46, luofeiyu wrote: s="Aug" how can i change it into 8 with some python time module? >>> import time >>> s = "Aug" >>> time.strptime(s, "%b").tm_mon 8 works for me. Or, if you want a mo

Re: dictionary with tuples

2014-01-14 Thread YBM
Le 14/01/2014 23:00, Tobiah a écrit : On 01/14/2014 01:21 PM, YBM wrote: Le 14/01/2014 22:10, Igor Korot a écrit : Hi, ALL, C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help"

Re: dictionary with tuples

2014-01-14 Thread YBM
Le 14/01/2014 22:10, Igor Korot a écrit : Hi, ALL, C:\Documents and Settings\Igor.FORDANWORK\Desktop\winpdb>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. dict = {} dict[(1,2)] = ('a

Re: python programming help

2013-12-08 Thread YBM
Le 08.12.2013 19:32, rafaella...@gmail.com a écrit : On Sunday, December 8, 2013 6:27:34 PM UTC, bob gailer wrote: On 12/8/2013 12:59 PM, rafaella...@gmail.com wrote: i have a dictionary with names and ages for each name. I want to write a function that takes in an age and returns the names o

Re: python programming help

2013-12-08 Thread YBM
Le 08.12.2013 20:06, rafaella...@gmail.com a écrit : i get it, thanks a lot i wrote a different one and it works def people(age): people=[name for name in dic if dic[name]==age] print(people) No it doesn't. You are printing things not returning something. and combine_list is the mos

Re: python programming help

2013-12-08 Thread YBM
Le 09.12.2013 01:00, Gregory Ewing a écrit : rafaella...@gmail.com wrote: def people(age): people=lambda age: [name for name in dic if dic[name]==age] but i don't get the lambda age part. Just to explain: YBM has tried to sabotage you by posting a solution that uses a couple of adv

Re: python programming help

2013-12-08 Thread YBM
Le 08.12.2013 19:14, rafaella...@gmail.com a écrit : On Sunday, December 8, 2013 6:07:47 PM UTC, YBM wrote: Le 08.12.2013 18:59, rafaella...@gmail.com a �crit : i have a dictionary with names and ages for each name. I want to write a function that takes in an age and returns the names

Re: python programming help

2013-12-08 Thread YBM
Le 08.12.2013 18:59, rafaella...@gmail.com a écrit : i have a dictionary with names and ages for each name. I want to write a function that takes in an age and returns the names of all the people who are that age. please help ageDict = { 'john':42, 'jane':36, 'paul':42 } peopleWithAge = lambda

Re: If you continue being rude i will continue doing this

2013-11-18 Thread YBM
You are the one being rude, Nikos. Moreover you are a nut, installing pygeoip works fine for me: # 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

Re: PYTHON 3.4 LEFTOVERS

2013-11-17 Thread YBM
Le 17.11.2013 10:12, 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 ann

Re: PYTHON 3.4 LEFTOVERS

2013-11-16 Thread YBM
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 ann

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread YBM
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/pytho

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread YBM
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 a

Re: PYTHON 3.4 LEFTOVERS

2013-11-16 Thread 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 / -nam

Re: A certainl part of an if() structure never gets executed.

2013-06-16 Thread YBM
Le 16.06.2013 13:06, Ferrous Cranus a écrit : what id() does, never heard of that function before. just type help(id) at Python prompt and stop flooding the group with superfluous demands. -- http://mail.python.org/mailman/listinfo/python-list