Re: Recommendation for GUI lib?

2016-06-11 Thread Jan Erik Moström
Thanks everybody for your answers. I really appreciate your answers and I do have a few things to investigate later this summer (after finishing my current "excursion" into Java, and trying to learn KDB/Q). = jem -- https://mail.python.org/mailman/listinfo/python-list

Re: pytz and Python timezones

2016-06-11 Thread Irmen de Jong
On 11-6-2016 13:37, Johannes Bauer wrote: > Hi there, > > first off, let me admit that I have a hard time comprehensively wrapping > my head around timezones. Everything around them is much more > complicated than it seems, IMO. They might not seem complicated, but actually they are. Mindboggling

Re: which library has map reduce and how to use it for this case

2016-06-11 Thread Michael Selik
> > On Friday, June 10, 2016 at 10:04:09 PM UTC+8, Michael Selik wrote: > > You'll need to explain the problem in more detail. Instead of talking > about operators and columns, what is the actual, real-world problem? On Sat, Jun 11, 2016 at 2:21 AM meInvent bbird wrote: > there are six operato

Re: movie from pictures

2016-06-11 Thread Karim
On 10/06/2016 23:31, alex wright wrote: I find shlex.split to be most useful to make my arguments a list in these cases. On Jun 9, 2016 3:28 PM, "MRAB" wrote: On 2016-06-09 19:58, Peter Otten wrote: Nev wrote: Thank you for your reply. I tried something like this in python code: from sub

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread mad scientist jr
Thanks to everyone for your replies. I see my script was as horrific as I feared, but I read all the responses and made a few changes. I'm not 100% sold on not checking types, but took it out, because it made sense that other programmers might want to use some custom type with my functions for

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread mad scientist jr
For those who don't want to have to wade through comments, here is a version without so many comments: # For Python 3.x # This script creates multiple numbered empty folders # in the desired location. To change the folder names # or location, edit function get_default_options. import datetime im

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread Marc Brooks
Look into docstrings. They will make your code much more readable to a Python reader. On Sat, Jun 11, 2016 at 2:16 PM mad scientist jr wrote: > For those who don't want to have to wade through comments, here is a > version without so many comments: > > # For Python 3.x > # This script creates mul

Re: i'm a python newbie & wrote my first script, can someone critique it?

2016-06-11 Thread MRAB
On 2016-06-11 18:59, mad scientist jr wrote: Thanks to everyone for your replies. I see my script was as horrific as I feared, but I read all the responses and made a few changes. I'm not 100% sold on not checking types, but took it out, because it made sense that other programmers might wan

pytz and Python timezones

2016-06-11 Thread Johannes Bauer
Hi there, first off, let me admit that I have a hard time comprehensively wrapping my head around timezones. Everything around them is much more complicated than it seems, IMO. That said, I'm trying to do things the "right" way and stumbled upon some weird issue which I can't explain. I'm unsure w

the global keyword:

2016-06-11 Thread Marcin Rak
Hi to all. I have the following file named Solver.py: * from Test import some_function, my_print from Test import test_var some_function() my_print() print(test_var) * and I have the following Test.py: **

Re: the global keyword:

2016-06-11 Thread Random832
On Sat, Jun 11, 2016, at 19:44, Marcin Rak wrote: > So my question is, how the heck is it possible that I get 5 as the last > value printed? the global test_var (global to Test.py) I set to 44 when I > ran some_function()??? does anyone have a clue they could throw my way? Importing a variable fr

Re: the global keyword:

2016-06-11 Thread MRAB
On 2016-06-12 00:50, Random832 wrote: On Sat, Jun 11, 2016, at 19:44, Marcin Rak wrote: So my question is, how the heck is it possible that I get 5 as the last value printed? the global test_var (global to Test.py) I set to 44 when I ran some_function()??? does anyone have a clue they could thr

Re: the global keyword:

2016-06-11 Thread Marcin Rak
On Saturday, 11 June 2016 18:51:11 UTC-5, Random832 wrote: > On Sat, Jun 11, 2016, at 19:44, Marcin Rak wrote: > > So my question is, how the heck is it possible that I get 5 as the last > > value printed? the global test_var (global to Test.py) I set to 44 when I > > ran some_function()??? does

Re: the global keyword:

2016-06-11 Thread Marcin Rak
On Saturday, 11 June 2016 19:09:29 UTC-5, MRAB wrote: > On 2016-06-12 00:50, Random832 wrote: > > On Sat, Jun 11, 2016, at 19:44, Marcin Rak wrote: > >> So my question is, how the heck is it possible that I get 5 as the last > >> value printed? the global test_var (global to Test.py) I set to 44 w

Re: the global keyword:

2016-06-11 Thread Random832
On Sat, Jun 11, 2016, at 20:09, MRAB wrote: > Not true. Importing doesn't copy the value. > > Importing a name creates a new name in the local scope that refers to > the same object that the imported name referred to. Yes, the value of a variable is a reference to an object. Can we not have anot

Re: the global keyword:

2016-06-11 Thread Random832
On Sat, Jun 11, 2016, at 20:12, Marcin Rak wrote: > What about variables that are user defined classes? Are they referenced > or copied? It will reference the same object, but if the variable is reassigned in the original module it will still not update the imported variable. -- https://mail.pyt

how to record path in well format and easy to read?

2016-06-11 Thread meInvent bbird
https://gist.github.com/hoyeunglee/3fea29ed4aadb5dbc11c41f9a36070dc i discover my code can not record the path because i do recursive call at the end of function however, i want to do full combination at the end of function before calling recursive call, for seeing the result path, choose call

Re: the global keyword:

2016-06-11 Thread Steven D'Aprano
On Sun, 12 Jun 2016 11:26 am, Random832 wrote: > On Sat, Jun 11, 2016, at 20:09, MRAB wrote: >> Not true. Importing doesn't copy the value. >> >> Importing a name creates a new name in the local scope that refers to >> the same object that the imported name referred to. MRAB is correct here. >

Re: the global keyword:

2016-06-11 Thread Ned Batchelder
On Saturday, June 11, 2016 at 8:13:50 PM UTC-4, Marcin Rak wrote: > On Saturday, 11 June 2016 19:09:29 UTC-5, MRAB wrote: > > On 2016-06-12 00:50, Random832 wrote: > > > On Sat, Jun 11, 2016, at 19:44, Marcin Rak wrote: > > >> So my question is, how the heck is it possible that I get 5 as the last

Re: the global keyword:

2016-06-11 Thread Ned Batchelder
On Saturday, June 11, 2016 at 11:38:33 PM UTC-4, Steven D'Aprano wrote: > On Sun, 12 Jun 2016 11:26 am, Random832 wrote: > > > On Sat, Jun 11, 2016, at 20:09, MRAB wrote: > >> Not true. Importing doesn't copy the value. > >> > >> Importing a name creates a new name in the local scope that refers

Re: how to record path in well format and easy to read?

2016-06-11 Thread meInvent bbird
https://gist.github.com/hoyeunglee/350ac2dd496f7c1c95a428f847e6f2b1 then can not run deep 3 in python sagecloud >>> mresult = DFS(b, 3, 3, mylist, path) ('deep=', 3) ({'11': 1, '10': 1, '00': 0, '01': 1}, {'11': 1, '10': 0, '00': 0, '01': 0}) ({'11': 1, '10': 1, '00': 0, '01': 1}, {'11': 1, '10':

Re: how to record path in well format and easy to read?

2016-06-11 Thread meInvent bbird
i forget why i do combination of 2 operators now i change not to use combination of 2 operators https://gist.github.com/hoyeunglee/58df4c41a63a2f37e153cbdbc03c16bf i run mresult = DFS(b, 2, 2, mylist, path) it do not have deep 2 and deep 1 in the path they only separated in the list however