Re: (Still OT) Nationalism, language and monoculture [was Re: Python Worst Practices]

2015-03-04 Thread Emile van Sebille
On 3/4/2015 12:40 PM, Tim Delaney wrote: A related thing is when you have multiple multi-lingual people talking together where at least two of their languages match (or are close enough for most uses e.g. Spanish and Portuguese). They'll slip in and out of multiple languages depending on which be

Re: http: connection reset by peer

2015-03-06 Thread Emile van Sebille
On 3/5/2015 12:18 PM, Chris Angelico wrote: On Fri, Mar 6, 2015 at 5:37 AM, Ethan Furman wrote: After mucking about with it with no results, I went on to another job -- when I came back to this one it was working. Huh. Well, if it recurs, see what you can find out about it... otherwise, pr

Re: Automation of Windows app?

2015-03-22 Thread Emile van Sebille
On 3/20/2015 10:55 AM, Grant Edwards wrote: I need to automate operation of a Windows application. I've been productively using python to create macro scheduler [1] scripts to automate windows programs for years. A sample script: Press Alt Send Character/Text>cu Release Alt WaitWindowOpen>

Re: Best way to calculate fraction part of x?

2015-03-23 Thread Emile van Sebille
On 3/23/2015 5:52 AM, Steven D'Aprano wrote: Are there any other, possibly better, ways to calculate the fractional part of a number? float (("%6.3f" % x)[-4:]) Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: test1

2015-03-26 Thread Emile van Sebille
On 3/25/2015 12:49 PM, Tiglath Suriol wrote: On Tuesday, March 24, 2015 at 11:04:48 PM UTC-4, Chris Angelico wrote: On Wed, Mar 25, 2015 at 1:47 PM, Tiglath Suriol wrote: PLONK< -- https://mail.python.org/mailman/listinfo/python-list

Re: Best way to calculate fraction part of x?

2015-03-26 Thread Emile van Sebille
On 3/24/2015 6:39 PM, Jason Swails wrote: On Mon, Mar 23, 2015 at 8:38 PM, Emile van Sebille float (("%6.3f" % x)[-4:]) ​In general you lose a lot of precision this way...​ Even more if you use %6.1 -- but feel free to flavor to taste. :) Emile -- https://mail.

Re: OOP for System Administrator

2015-04-04 Thread Emile van Sebille
On 4/4/2015 8:56 AM, pankaj sharma wrote: Hi, I'm a Linux system administrator and my work requires me to write bash scripts (100-500 lines) for process monitoring, server health check and automate some manual processes. Now I've started to learn python as I want to write scripts in python ra

Re: Working with Access tables and python scripts

2015-04-14 Thread Emile van Sebille
On 4/14/2015 3:20 PM, accessnew...@gmail.com wrote: > I have an existing extensive python script that I would like > to modify slightly to run a different variation on a process. > > I also have all the variables I need to run this script (about > 20 in total)stored in an Access 2010 64 bit datab

Re: Failed to import a "pyd: File When python intepreter embed in C++ project

2015-04-17 Thread Emile van Sebille
On 4/17/2015 10:17 AM, saadaouijihed1...@gmail.com wrote: I have a swig module (.pyd).I followed the steps but it doesn't work please help me. Start here: http://catb.org/~esr/faqs/smart-questions.html Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem running Python 2.7 on Ubuntu 10.04

2015-04-20 Thread Emile van Sebille
On 4/20/2015 8:31 AM, David Aldrich wrote: > Cannot import: GTK+ > > No module named gi > > So I need to install the gtk package and do so in such a way that it > is visible to /usr/local/bin/python2.7. > > How would I do that please? This should get you going: See http://faq.pygtk.org/index.

Re: Python re to extract useful information from each line

2015-04-29 Thread Emile van Sebille
On 4/29/2015 1:49 PM, Kashif Rana wrote: pol_elements = re.compile('id\s(?P.+?)(?:\sname\s(?P.+?))?\sfrom\s(?P.+?)\sto\s(?P.+?)\s{2}(?P[^\s]+?)\s(?P[^\s]+?)\s(?P[^\s]+?)(?:(?P\snat)\s(?P[^\s]+?)(?P\sdip-id\s[^\s]+?)?)?\s(?P[^\s]+?)(?:\sschedule\s(?P[^\s]+?))?(?P\slog)?$' ) ... and that's why

Re: Am I missing something here? ipaddress vs socket

2015-05-01 Thread Ronald van Zantvoort
Hi Chris & Alain, thanks for responding :) On Friday, 1 May 2015 12:11:20 UTC+2, Chris Angelico wrote: > On Fri, May 1, 2015 at 7:42 PM, Ronald van Zantvoort wrote: > > Hi all, > > > > Given the following code: > > > > import ipaddress > > impo

Re: Am I missing something here? ipaddress vs socket

2015-05-01 Thread Ronald van Zantvoort
On Friday, 1 May 2015 14:06:34 UTC+2, Chris Angelico wrote: > On Fri, May 1, 2015 at 8:41 PM, Ronald van Zantvoort wrote: > > mystring is already an IP address, sorry for not mentioning that. > > The point is that ternary if; I've been scouring around the internet and &

Re: Am I missing something here? ipaddress vs socket

2015-05-01 Thread Ronald van Zantvoort
On Friday, 1 May 2015 15:46:32 UTC+2, Chris Angelico wrote: > On Fri, May 1, 2015 at 11:37 PM, Ronald van Zantvoort wrote: > > But seriously, I'll go see over there, thanks :) It's just that I'm amazed > > that this isn't in there yet; it's 2 simple prop

Re: Is it normal to cry when given XML?

2015-05-05 Thread Emile van Sebille
On 5/5/2015 9:54 AM, Michael Torrie wrote: On 05/05/2015 03:28 AM, Sayth Renshaw wrote: Hi Just checking if the reaction to cry when given XML is normal. I'd say it is normal. XML is like violence. If it doesn't solve your problems, you're not using enough of it[1]. [1] Can anyone tell me

Re: Encrypt python files

2015-05-06 Thread Emile van Sebille
On 5/6/2015 12:23 AM, Palpandi wrote: On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote: Hi, What are the ways to encrypt python files? No, I just want to hide the scripts from others. See http://stackoverflow.com/questions/261638/how-do-i-protect-python-code Emile -- htt

Re: anomaly

2015-05-11 Thread Emile van Sebille
On 5/11/2015 8:34 AM, Grant Edwards wrote: > Yow! YOU PICKED KARL > MALDEN'S NOSE!! I'd bet most people familiar with Karl Malden wouldn't have a problem picking his from a selection of twenty random noses. :) Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling a function is faster than not calling it?

2015-06-22 Thread Piet van Oostrum
e("0", 'string', "eval") t1 = Timer("eval(dummy); func()", setup="from __main__ import dummy, func") t2 = Timer("0; eval(code)", setup="from __main__ import code") And then you'll see that t1 is slightly slower than t2. -- Piet van Oostrum WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Emile van Sebille
On 6/24/2015 7:02 AM, Grant Edwards wrote: And how does writing unmangled data to disk expose anybody to anything? I've never heard of an exploit where writing an evilly crafted bit-pattern to disk causes a any sort of problem. Unless that code is executed at boot. Mangling would at least pre

Re: Pure Python Data Mangling or Encrypting

2015-06-24 Thread Emile van Sebille
On 6/24/2015 8:55 AM, Chris Angelico wrote: On Thu, Jun 25, 2015 at 1:52 AM, Emile van Sebille wrote: On 6/24/2015 7:02 AM, Grant Edwards wrote: And how does writing unmangled data to disk expose anybody to anything? I've never heard of an exploit where writing an evilly crafted bit-pa

Re: Noob in Python. Problem with fairly simple test case

2015-07-16 Thread Emile van Sebille
On Thursday, July 16, 2015 at 3:11:56 PM UTC-5, Chris Angelico wrote: Where's the latest survey results? I think the numbers don't agree with you any more. Not that there's a source for that info, but a quick survey of yahoo results certainly continues to show more v2 activity. --anytime--

Re: Need Help w. Getting the Eclipse Python Add-On.

2015-07-17 Thread Emile van Sebille
On 7/17/2015 11:22 AM, Steve Burrus wrote: I Need immediate Help w. Getting the Eclipse Python Add-On. I looked all around the Eclipse website to try to get this but didn't see the add-on for this. Can someone please help me to find it? Thanx. Googling 'python ecplise' certainly yields a lot

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Emile van Sebille
On 7/17/2015 3:45 PM, Terry Reedy wrote: Now my question for you or anyone else: If the vast majority of Python programmers are focused on 2.7, I consider myself in this group. why are volunteers to help fix 2.7 bugs so scarce? perhaps the bugs that are show stoppers are providing the impe

Re: Integers with leading zeroes

2015-07-21 Thread Emile van Sebille
On 7/21/2015 10:58 AM, sohcahto...@gmail.com wrote: IMO, leading zeroes just looks like visual noise, and if I wanted to align numbers, I'd just use spaces. Aligning numbers using spaces doesn't always align -- using zeros does. Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Can I copy/paste Python code?

2015-07-21 Thread Emile van Sebille
On 7/21/2015 1:32 PM, Grant Edwards wrote: But, it apears foxit reader is Windows-only so it's a moot point for Linux/Unix/Mac users. I've been happy with https://wiki.gnome.org/Apps/Evince on linux. Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Can I copy/paste Python code?

2015-07-21 Thread Emile van Sebille
On 7/21/2015 2:47 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 1:32 PM, Grant Edwards wrote: But, it apears foxit reader is Windows-only so it's a moot point for Linux/Unix/Mac users. I've been happy with https://wiki.gnome.org/Apps/Evince on li

Re: Can I copy/paste Python code?

2015-07-22 Thread Emile van Sebille
On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just copied "Acorsa Artichoke Heart - Quarter, Water, Can" from a catalog pdf, so _at_

Re: Can I copy/paste Python code?

2015-07-22 Thread Emile van Sebille
On 7/22/2015 12:35 PM, Grant Edwards wrote: On 2015-07-22, Emile van Sebille wrote: On 7/21/2015 5:10 PM, Grant Edwards wrote: On 2015-07-21, Emile van Sebille wrote: On 7/21/2015 2:47 PM, Grant Edwards wrote: 1) You can't copy/paste text from evince _at_all_. Hmm, i just c

Re: Find Minimum for element in multiple dimensional array

2015-07-22 Thread Emile van Sebille
On 7/22/2015 3:54 PM, Robert Davis wrote: I have an array of arrays that have a origin zip code, origin latitude, origin longitude, destination zip code, destination latitude, destination longitude, and miles between the two points. I need to keep only those combinations that represent the min

Re: Stripping sRGB profile from PNGs in python

2015-07-23 Thread Emile van Sebille
On 7/23/2015 10:31 AM, Ryan Holmes wrote: We're getting this error when trying to load some of out projects images: libpng warning: iCCP: known incorrect sRGB profile The source files that we have some with incorrect sRGB profiles. We don't have control over the source files, but what we

Re: Hi

2015-07-25 Thread Emile van Sebille
On 7/24/2015 10:30 PM, 김지훈 wrote: Hi. I recently changed my path to be a programmer so I decided to learn python. I downloaded files(Python 2.7.10 - 2015-05-23 ) to setup on your website. (also got the version of x64 because of my cpu) But wh

Re: Error: valueError: ordinal must be >= 1

2015-07-27 Thread Emile van Sebille
On 7/27/2015 4:13 PM, ryguy7272 wrote: It seems to work perfectly find when I see the results in the book, but all I'm getting is this . . . *** ValueError: ordinal must be >= 1 (Pdb) Does anyone have any idea what I'm doing wrong? You've been dropped into the python debugger. I'd suspect

Re: I'm a newbie and I'm stumped...

2015-08-01 Thread Emile van Sebille
On 7/30/2015 6:22 PM, Dwight GoldWinde wrote: I am running Python 3.4 on my Mac mini, OS X 10.10.2, using Coderunner 2 as my editor. Here¹s the code: #!/usr/bin/env python3 word = (input('Enter a word Œ)) When running this inside of Coderunner, I get the follow error, after entering the word Œs

Re: Which Python do I need for the below?

2015-08-01 Thread Emile van Sebille
On 7/29/2015 10:52 AM, Joe Sanders wrote: Hello- Which Python do I need for the below? with instructions please! [cid:image001.png@01D0C9FD.677CDED0] Seeing that you have no responses yet I'm guessing most potential responders along with me are not opening attachments. If the image is of sc

Re: Which Python do I need for the below?

2015-08-01 Thread Emile van Sebille
On 8/1/2015 10:09 AM, Rustom Mody wrote: On Saturday, August 1, 2015 at 10:07:37 PM UTC+5:30, Emile van Sebille wrote: Seeing that you have no responses yet I'm guessing most potential responders along with me are not opening attachments. Most recipients are not receiving at all! [I

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Emile van Sebille
On 8/1/2015 1:34 PM, Lukas Barth wrote: Hi! I have a list of numbers that I treat as "circular", i.e. [1,2,3] and [2,3,1] should be the same. Now I want to rotate these to a well defined status, so that I can can compare them. If all elements are unique, the solution is easy: find the minimum

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Emile van Sebille
On 8/1/2015 2:12 PM, Lukas Barth wrote: On Saturday, August 1, 2015 at 10:51:03 PM UTC+2, Emile van Sebille wrote: Is the problem to determine if one list of circular numbers 'matches' another one despite rotation status? If so, I'd do something like: Well.. no. I actually r

Re: Most pythonic way of rotating a circular list to a canonical point

2015-08-01 Thread Emile van Sebille
On 8/1/2015 2:24 PM, Lukas Barth wrote: Perhaps I should clarify a bit: - I definitely need a "canonical rotation" - just a comparison result is not enough Well, it looks to me that I don't know what a 'canonical rotation' is -- there's no wikipedia article and googling yields all sorts of

Re: Linux script to get most expensive processes

2015-08-04 Thread Emile van Sebille
On 8/4/2015 1:19 PM, Cecil Westerhof wrote: Under Linux I like to get the most expensive processes. The two most useful commands are: ps -eo pid,user,pcpu,args --sort=-pcpu and: ps -eo pid,user,pcpu,args --sort=-vsize In my case I am only interested in the seven most expensive processe

Re: Linux script to get most expensive processes

2015-08-04 Thread Emile van Sebille
On 8/4/2015 2:30 PM, Cecil Westerhof wrote: On Tuesday 4 Aug 2015 22:52 CEST, Emile van Sebille wrote: My platform shows as linux2 and it worked fine for me when checking for that. I heard that that was possible also, but none of my systems gives this. I should change it. You could also

Re: Uninstall

2015-08-05 Thread Emile van Sebille
On 8/4/2015 6:51 PM, Mario Figueiredo wrote: On Tue, Aug 4, 2015 at 9:01 PM, Mark Lawrence The simple solution is not to subscribe. Yes -- it's about gotten to that point. Or even better, tell you to fuck off. Now that's a first to my recollection. I must say I prefer the pedantry t

Re: Python Scheduling

2015-08-07 Thread Emile van Sebille
On 8/6/2015 11:06 AM, sairam kumar wrote: Hi Experts, I am Automating some repetitive works through Sikuli and Python scripting languages.I have multiple workflows.i need to schedule this script for every two hours.can anyone guide me how to schedule the scripts for every two hours. is the

Re: Python Scheduling

2015-08-07 Thread Emile van Sebille
On 8/7/2015 7:17 AM, Laura Creighton wrote: In a message of Fri, 07 Aug 2015 06:48:32 -0700, Emile van Sebille writes: On 8/6/2015 11:06 AM, sairam kumar wrote: Hi Experts, I am Automating some repetitive works through Sikuli and Python scripting languages.I have multiple workflows.i

Re: Pipes

2015-08-09 Thread Emile van Sebille
On 8/9/2015 10:55 AM, rogerh...@gmail.com wrote: On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: Just learning Python and have a question. Is it possible for Python to pass information to another program >>(in Windows), wait for that program to finish and then resume op

Re: Python Developer- Houston, TX

2015-08-10 Thread Emile van Sebille
On 8/10/2015 2:24 PM, appthoug...@gmail.com wrote: Hi, Hope you are doing well !!! My name is Siva and I'm a recruiter at TheAppliedthought , a global staffing and IT consulting company. You really shouldn't post job offerings on this list. Please use the Python Job Board at https://www.pyth

Re: AttributeError

2015-08-12 Thread Emile van Sebille
On 8/12/2015 10:24 AM, MRAB wrote: What is it _actually_ trying to split? Aah, reading. Such an underused skill. Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: AttributeError

2015-08-12 Thread Emile van Sebille
On 8/12/2015 1:38 PM, Denis McMahon wrote: On Wed, 12 Aug 2015 12:05:37 -0700, Ltc Hotspot wrote: Have a look at assignment_10_2_v_06.py. What should I look at assignment_10_2_v_06.py.: You shouldn't. You should instead approach your tutor and tell him you are too stupid to learn computer

Re: AttributeError

2015-08-12 Thread Emile van Sebille
On 8/12/2015 4:05 PM, Ltc Hotspot wrote: On Wed, Aug 12, 2015 at 3:35 PM, MRAB wrote: On 2015-08-12 22:16, Denis McMahon wrote: [snip] c = [0 for i in range(24)] f = open(filename,'r') for l in f: h = int(l.strip().split()[X].split(':')[Y]) c[h] = c[h] + 1 f.close() for i in range

Re: Please don't make unfounded legalistic demands (was: [a, b, c, d] = 1, 2, 3, 4)

2015-08-26 Thread Emile van Sebille
On 8/26/2015 9:06 AM, Grant Edwards wrote: It's also unfortunate that there's no way to to access the mailing list via an NNTP server Huh? -- gmane.comp.python.general at news://nntp.gmane.com:119/gmane.comp.python.general Or do you mean by the OP? Emile -- https://mail.python.org/mailman/l

Re: Please don't make unfounded legalistic demands (was: [a, b, c, d] = 1, 2, 3, 4)

2015-08-27 Thread Emile van Sebille
On 8/26/2015 2:14 PM, Grant Edwards wrote: On 2015-08-26, Emile van Sebille wrote: On 8/26/2015 9:06 AM, Grant Edwards wrote: It's also unfortunate that there's no way to to access the mailing list via an NNTP server Huh? -- gmane.comp.python.general at news://nntp.gma

Re: Why Python is not both an interpreter and a compiler?

2015-08-31 Thread Emile van Sebille
On 8/31/2015 10:48 AM, Mahan Marwat wrote: Python programs *could* easily be compiled the same way, but it generally hasn't been considered all that useful. If it hasn't been considered all that useful, then why the tools like cx_freeze, pytoexe are doing very hard! People scratching their o

Re: Hi am new to python

2015-08-31 Thread Emile van Sebille
On 8/31/2015 4:27 PM, Chubasco Diranga wrote: Can anyone please help me with the following please? My question is in a while loop; how do l sum all the numbers in the given list (list_a)? list_a = [8, 5, 2, 4] sum_a = 0 # for storing the sum of list_a i = 0 # for looping through the list_a# Us

Re: Python handles globals badly.

2015-09-02 Thread Emile van Sebille
On 9/2/2015 11:47 AM, t...@freenet.de wrote: I therefore would like to see a PEP which allows also writing global module vars inside module functions without the need for explicit setting the keyword "global" in more or less each(!) module function as the first line of code. If you're feeling

Re: Python handles globals badly.

2015-09-09 Thread Emile van Sebille
On 9/9/2015 10:55 AM, Steven D'Aprano wrote: (I wanted to link to the "Everything Is Broken" essay on The Medium, but the page appears to be gone. Is this it? http://www.sott.net/article/280956-Everything-is-broken-on-the-Internet -- https://mail.python.org/mailman/listinfo/python-list

Re: Hi am new to python

2015-09-09 Thread Emile van Sebille
On 9/9/2015 3:35 PM, Denis McMahon wrote: On Tue, 08 Sep 2015 17:44:26 -0500, Nassim Gannoun wrote: My question is in a while loop; how do l sum all the numbers in the given list (list_a)? You don't normally use a while loop or a counter to iterate over a list. Such a question should only be

Re: Python handles globals badly.

2015-09-10 Thread Emile van Sebille
On 9/10/2015 3:25 PM, t...@freenet.de wrote: > Who decides it? The BDFL or his delegate. It's simplest that way. Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: monospaced font in MS Windows with wxpython

2015-09-11 Thread Emile van Sebille
On 9/11/2015 3:16 PM, Javier wrote: I am trying to use a monospaced font (preferably small) in MS Windows with wxpython. I have tried txtctrl.SetFont(wx.Font(10, wx.MODERN, wx.NORMAL, wx.NORMAL, False, u'Consolas')) but no success, I still get a proportional font. You may also want to try

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Emile van Sebille
On 9/12/2015 9:54 AM, Rustom Mody wrote: On Saturday, September 12, 2015 at 10:02:40 PM UTC+5:30, Steven D'Aprano wrote: On Sat, 12 Sep 2015 02:42 pm, Random832 wrote: Anyway, maybe we do need a term to distinguish Python/C#/Java pointers from C/C++ pointers - maybe call it a "non-arithmetic"

Re: Python handles globals badly.

2015-09-12 Thread Emile van Sebille
On 9/11/2015 10:22 PM, Skybuck Flying wrote: I didn't learn anything from this posting, sorry ! ;) I'm seeing a pattern here... Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-12 Thread Emile van Sebille
On 9/12/2015 12:58 PM, rurpy--- via Python-list wrote: The question is whether what "pointer" means in languages that use the word is*so* different than its meaning in the Python sense I can't find a single reference to pointer in the python docs outside of ctypes. What is its python sense?

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-12 Thread Guido van Rossum
o become more popular. > The repeated claims (by Alexander?) that astimezone() has the power of pytz's localize() need to stop. Those pytz methods work for any (pytz) timezone -- astimezone() with a default argument only works for the local time zone. (And indeed what it does is surprising, except perhaps to pytz users.) -- --Guido van Rossum (python.org/~guido) -- https://mail.python.org/mailman/listinfo/python-list

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-12 Thread Guido van Rossum
On Sat, Sep 12, 2015 at 5:46 PM, Alexander Belopolsky < alexander.belopol...@gmail.com> wrote: > > On Sat, Sep 12, 2015 at 6:24 PM, Guido van Rossum > wrote: > >> The repeated claims (by Alexander?) that astimezone() has the power of >> pytz's localize()

Re: [Datetime-SIG] Are there any "correct" implementations of tzinfo?

2015-09-13 Thread Guido van Rossum
heir timezone to. But neither pytz nor datetime can help with that -- it is up to the sysadmin. -- --Guido van Rossum (python.org/~guido) -- https://mail.python.org/mailman/listinfo/python-list

Re: Terminology: "reference" versus "pointer"

2015-09-14 Thread Emile van Sebille
On 9/14/2015 10:34 AM, Random832 wrote: Personally I think it's a bit silly to insist on a diagram model where a box with an arrow in it pointing at an int object can't be represented by a box with an integer in it (where 'int' is any immutable type - string, tuple, even range), but people don't

Re: True == 1 weirdness

2015-09-16 Thread Emile van Sebille
On 9/16/2015 10:27 AM, Grant Edwards wrote: On 2015-09-16, Sven R. Kunze wrote: On 16.09.2015 18:57, Random832 wrote: I think that chaining should be limited to: A) all operators are "=" B) all operators are "is" C) all operators are either >= or > D) all operators are either <= or < I'

Re: True == 1 weirdness

2015-09-16 Thread Emile van Sebille
On 9/16/2015 10:42 AM, Marko Rauhamaa wrote: Steven D'Aprano : The main reason for supporting arbitrary chained operators is that they could be overloaded and have some meaning that makes sense: Operator overloading is yet another unfortunate language feature. dunder methods are there for c

Re: True == 1 weirdness

2015-09-16 Thread Emile van Sebille
On 9/16/2015 5:53 PM, Chris Angelico wrote: On Thu, Sep 17, 2015 at 10:06 AM, Mark Lawrence wrote: On 16/09/2015 23:15, Sven R. Kunze wrote: On 16.09.2015 23:30, Mark Lawrence wrote: Barry John art is also art. So, why does Python not have Barry John art to define graphs and diagrams? T

Re: Hello

2015-09-19 Thread Emile van Sebille
On 9/17/2015 8:10 AM, moon khondkar wrote: Hello I have problem with python installation.I downloaded python 3.5 but I cannot use it on my computer.I can not open the idle. I get something like saying "users\local settings\Application data\programs\python\python35-32\pythonw.exe is not valid w

Re: Check if a given value is out of certain range

2015-09-29 Thread Emile van Sebille
On 9/29/2015 2:04 PM, Random832 wrote: On Tue, Sep 29, 2015, at 16:32, Mark Lawrence wrote: not (0 <= x <= 10) Yuck. How about x not in range(11)? x = 5.5 Emile -- https://mail.python.org/mailman/listinfo/python-list

Re: Question about regular expression

2015-09-30 Thread Emile van Sebille
On 9/30/2015 11:34 AM, massi_...@msn.com wrote: Hi everyone, firstly the description of my problem. I have a string in the following form: s = "name1 name2(1) name3 name4 (1, 4) name5(2) ..." that is a string made up of groups in the form 'name' (letters only) plus possibly a tuple containing

Re: Question about regular expression

2015-09-30 Thread Emile van Sebille
On 9/30/2015 12:20 PM, Tim Chase wrote: On 2015-09-30 11:34, massi_...@msn.com wrote: I guess this problem can be tackled with regular expressions, b ... However, if you *want* to do it with regular expressions, you can. It's ugly and might be fragile, but ##

Re: Check if a given value is out of certain range

2015-10-01 Thread Emile van Sebille
On 10/1/2015 12:59 PM, Marko Rauhamaa wrote: John Gordon : I wasn't commenting directly to the "ask not..." quote; I was referring upthread to the choice between not 0 <= x <= 10 and x < 0 or x > 10 Both are of course understandable, but in my opinion, the latter one takes slightl

Re: Trouble running

2015-10-06 Thread Emile van Sebille
On 10/5/2015 11:06 AM, Cameroni123 ™ wrote: Hi I have recently installed python on windows 10 and I’m trying to save in order to run the module and I cant I don’t know why, could you please help? you might find the following helpful: http://www.cs.utexas.edu/~mitra/bytes/start.html emile

Re: reg multiple login python

2015-10-07 Thread Emile van Sebille
On 10/7/2015 2:24 AM, harirammanohar...@gmail.com wrote: On Thursday, 1 October 2015 12:35:01 UTC+5:30, hariramm...@gmail.com wrote: Hi All, Is there anyway i can login to remote servers at once and do the activity, i can do one by one using for loop.. Thanks in advance. how to handle this

Re: Recover data over the network

2015-10-09 Thread Emile van Sebille
On 10/9/2015 10:12 AM, Arshpreet Singh wrote: Hello Python and People! I want to write a small Python application which will be able to 1.recover data from server and 2.send it to another server. For the 2nd part I can use scp(secure copy), Please let me know if any data-recovery library is a

Re: Recover data over the network

2015-10-09 Thread Emile van Sebille
On 10/9/2015 7:47 PM, Arshpreet Singh wrote: On Friday, 9 October 2015 22:51:16 UTC+5:30, Emile van Sebille wrote: without extensive clues as to the nature of the data to be recovered you're not going to get much further with this. It is mostly /home partition data on disk. Those are

Re: Using pipe in a system call

2015-10-10 Thread Emile van Sebille
On 10/10/2015 4:42 AM, Cecil Westerhof wrote: >To avoid this, I have adopted this habit - > >export_spreekwoorden = ( >"SELECT spreekwoord " >"FROM spreekwoorden " >"ORDER BY spreekwoord COLLATE LOCALIZED" >) > >To my eye, the result is nicer, at virtually no extra effort. Just >don't forget the

Re: Extended functions in embedded code

2015-10-13 Thread Emile van Sebille
On 10/13/2015 8:29 AM, Ervin Hegedüs wrote: Hi Chris, On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: Sounds to me like the easiest way would be to inject into the builtins. You should be able to import the builtins module from your C code, and then stuff some extra attributes

Re: Extended functions in embedded code

2015-10-13 Thread Emile van Sebille
On 10/13/2015 1:32 PM, Ervin Hegedüs wrote: Hi, On Tue, Oct 13, 2015 at 08:55:42AM -0700, Emile van Sebille wrote: On 10/13/2015 8:29 AM, Ervin Hegedüs wrote: Hi Chris, On Wed, Oct 14, 2015 at 02:05:43AM +1100, Chris Angelico wrote: Sounds to me like the easiest way would be to inject

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Emile van Sebille
On 10/20/2015 3:05 PM, Randy Day wrote: I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar

python error

2015-11-03 Thread Ruud van Rooijen
my code: from tkinter import * window = Tk() label = Label(window, text="miniproject A1") label.pack() window.mainloop() given error: C:\Users\Ruud\Python35\Scripts\python.exe C:/Users/Ruud/PycharmProjects/School/project.py Traceback (most recent call last): File "C:/Users/Ruud/PycharmProj

Re: any practise site about python?

2015-11-04 Thread Emile van Sebille
On 11/4/2015 11:38 AM, alperen wrote: hi guys. i am computer engineering student and i want to practise the lectures that i saw at school. for example dictionaries tuples or some other topics. i know eulerproject but it is hard for starting. do you know any exercise sites for students or begin

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
print((results["gengyang"])["maths"]) 2015-11-24 12:04 GMT+01:00 Cai Gengyang : > results = { > "gengyang": { "maths": 10, "english": 15}, > "ensheng": {"maths": 12, "english": 10}, > "jordan": {"maths": 9, "english": 13} > } > > How do you get gengyang's maths scores ? > > Thank you ...

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
Hi Mark, what use would that have? Please show your code ... 2015-11-24 13:15 GMT+01:00 Mark Lawrence : > On 24/11/2015 11:04, Cai Gengyang wrote: > >> results = { >>"gengyang": { "maths": 10, "english": 15}, >>"ensheng": {"maths": 12, "english": 10}, >>"jordan": {"maths": 9, "english

Re: Getting math scores (Dictionary inside dictionary)

2015-11-24 Thread Arie van Wingerden
2015-11-24 14:41 GMT+01:00 Marko Rauhamaa : > Mark Lawrence : > > > 1) I was being facetious. > > 2) How many times do people have to be asked not to top post here > > before they stop top posting? > > 3) I only have two things to say so this is superfluous. > > Having posted only 2 times in this

Re: Newbie coding question

2014-06-26 Thread Emile van Sebille
On 6/26/2014 11:53 AM, Martin S wrote: Hi, I've been following the tutorial here http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/ But when I get to section 1.10 there is person = input('Enter your name:') However this generates an error >>> person = input('Enter your name: ') Enter

Re: PEP8 and 4 spaces

2014-07-03 Thread Emile van Sebille
On 7/3/2014 2:23 PM, Tobiah wrote: I think your suggestion of having GIT handle the transformations is the way we'll go. nothing to quibble or worry about. Well put spaces in the repository since it still seems to be the community's preference and I'll convert to tabs with GIT on the fly. Prob

Re: PEP8 and 4 spaces

2014-07-04 Thread Emile van Sebille
On 7/4/2014 7:57 AM, Mark Lawrence wrote: On 04/07/2014 15:28, Grant Edwards wrote: On 2014-07-03, Emile van Sebille wrote: Just watch out for mixed tabs and spaces in the same file -- a tab counts as eight spaces and can be used interchangeably in python2. Definitely. Indenting with tabs

Re: Entreprise level python tcp server

2014-07-09 Thread Emile van Sebille
EVE online uses stackless python (http://highscalability.com/eve-online-architecture) and has seen a max of some 40k simultaneous users. You might want to look into how they do it. Emile On 7/9/2014 3:36 AM, Arulnambi Nandagoban wrote: Hello all, Can anyone tell me the reliability level of

Multiple python versions, one dev environment???

2014-07-17 Thread Joep van Delft
Hello! The condensed version of the question would probably be: How does one deal with multiple interpreters and one package where you want to try some changes? The background: I made a trivial change to some package (docutils) to scratch a personal itch, and I want to offer this back to the c

Re: Python 3 is killing Python

2014-07-17 Thread Emile van Sebille
On 7/17/2014 11:15 AM, Rick Johnson wrote: Sadly, all of my calls to improve IDLE have been meet with rebukes about me "whining". The "powers that be" would wise to *UTILIZE* and *ENCOURAGE* my participation instead of *IGNORING* valuable talent and *IMPEDING* the expansion of this "private boys

Re: Multiple python versions, one dev environment???

2014-07-17 Thread Joep van Delft
> #!/bin/bash > script=`readlink -f -- "$1"` > case "$script" in > /usr/bin*) > exec python3 "$@" > ;; > esac > exec python2 "$@" > > /usr/local/bin/virtualenv====

Re: Multiple python versions, one dev environment???

2014-07-17 Thread Joep van Delft
On Thu, 17 Jul 2014 15:41:44 -0400 Ned Batchelder wrote: > > For testing one project on multiple versions of Python, use tox. > Its entire reason for being is to test Python code against multiple > environments, generally for different Python versions, but possibly > for other reasons, like diffe

Re: What is best way to learn Python for advanced developer?

2014-07-30 Thread Emile van Sebille
On 7/30/2014 1:47 PM, guirec.cor...@gmail.com wrote: That's cool but not very exhaustive. Do you more sources? I'd normally suggest reviewing the standard library after getting comfortable with the basics -- see https://docs.python.org/2/library/ But, if you've already done that and want to

Re: Dict when defining not returning multi value key error

2014-07-31 Thread Emile van Sebille
On 7/31/2014 2:16 PM, Ian Kelly wrote: On Thu, Jul 31, 2014 at 1:17 PM, Terry Reedy wrote: On 7/31/2014 7:24 AM, Dilu Sasidharan wrote: I am wondering why the dictionary in python not returning multi value key error when i define something like p = {'k':"value0",'k':"value1"} This is docu

Re: Why Python 4.0 won't be like Python 3.0

2014-08-18 Thread Emile van Sebille
On 8/18/2014 2:09 PM, Grant Edwards wrote: On 2014-08-18, Ethan Furman wrote: On 08/18/2014 07:51 AM, Grant Edwards wrote: To all of us out here in user-land a change in the first value in the version tuple means breakage and incompatibilities. And when the second value is "0", you avoid it u

Re: installing python 3

2014-09-09 Thread Guido van Rossum
Dear Ashley, Try describing your problem on StackOverflow.com. I'm sure someone there will help you. Good luck! --Guido On Sep 9, 2014 2:27 AM, "Ashley Forman" wrote: > Hello, > My name is Ashley Forman, and I am emailing because I cannot install > python onto my Mac laptop! I have installed

Re: Problem Installing Python

2014-09-11 Thread Emile van Sebille
On 9/11/2014 12:31 PM, osemen tosin wrote: Hi there, I tried installing Python and I could not continue without getting this error. "There is a problem with this installer package. A DLL required for this install to complete could not be run. Contact your support personnel or vendor package."

Re: protocol.py, brine.py, and compat.py causing trouble

2014-09-15 Thread Emile van Sebille
On 9/13/2014 11:44 PM, Josh English wrote: I do not know what these three filesare doing, but suddenly they have caught in a loop every time I try to run some code. This is where I managed to send a keybord interrupt. I was working just fine, tweaking a line, running the code, tweaking a l

Re: Syntax error in python unittest script

2014-09-24 Thread Emile van Sebille
On 9/24/2014 12:33 PM, Milson Munakami wrote: def tearDown(self): if self.failed: return duration = time.time() - self.startTime_ self.cleanup(True) if self.reportStatus_: self.

<    2   3   4   5   6   7   8   9   10   11   >