[Tutor] CheckButtons reset to default values

2017-02-10 Thread Pooja Bhalode
Hi, I have a bunch of checkbuttons in my code and a default settings button which restores the original setting in the checkbuttons. The code is given below: var1 = IntVar() var2 = IntVar() var3 = IntVar() var4 = IntVar() Checkbutton(frame1, text = "Vertices", variable=var1,

[Tutor] Help

2017-02-10 Thread Sasiliyu Adetunji
Please assist with this assignment Write a function my_sort which takes in a list of numbers (positive integers). The function should return a list of sorted numbers such that odd numbers come first and even numbers come last. Regards ___ Tutor mailli

[Tutor] Can I can use subprocess module for connecting to linux from windows

2017-02-10 Thread Basavaraj Lamani
Hi, down votefavorite Manual testing: I have installed putty in windows10 machine and by using putty, I will do SSH connection to Linux machine(VM). I enter username and password to

Re: [Tutor] CheckButtons reset to default values

2017-02-10 Thread Peter Otten
Pooja Bhalode wrote: > Hi, > > I have a bunch of checkbuttons in my code and a default settings button > which restores the original setting in the checkbuttons. The code is given > below: > > > var1 = IntVar() > var2 = IntVar() > var3 = IntVar() > var4 = IntVar() > Checkbut

Re: [Tutor] Help

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 02:05, Sasiliyu Adetunji wrote: > Please assist with this assignment > > Write a function my_sort which takes in a list of numbers (positive > integers). > > The function should return a list of sorted numbers such that odd numbers > come first and even numbers come last. def my_sort

Re: [Tutor] Can I can use subprocess module for connecting to linux from windows

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 06:48, Basavaraj Lamani wrote: > putty, I will do SSH connection to Linux machine(VM). I enter username and > password to access Linux machine(VM) then I enter different commands to > install application in Linux machine. > > Automation: I want to automate above manual task by using p

Re: [Tutor] Help

2017-02-10 Thread Joaquin Alzola
>Please assist with this assignment >Write a function my_sort which takes in a list of numbers (positive >integers). >The function should return a list of sorted numbers such that odd numbers >come first and even numbers come last. You can search for even or odd numbers with the modulo (%) opera

Re: [Tutor] CheckButtons reset to default values

2017-02-10 Thread Pooja Bhalode
Hi Peter, The code is as shown below. I have put it in the manner you have told me. root = Tk() root.title("Design of Experiments with Parameter Estimation") root.geometry("1000x1000") def DesignPoint(): print "Inside Design Point" rootdesign=Tk() rootdesign.title("Estimation of Exp

Re: [Tutor] CheckButtons reset to default values

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 15:56, Pooja Bhalode wrote: > root = Tk() > root.title("Design of Experiments with Parameter Estimation") > root.geometry("1000x1000") > > def DesignPoint(): > rootdesign=Tk() You should o0nly have one root. This create a new root everytime you xcall Designpoint and even if thats

[Tutor] Climata package

2017-02-10 Thread fei fan
Hi tutor, Do you know of any good resources to extract data using the climata package and to convert these data in .geojson format? Thanks, Fei ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.

Re: [Tutor] Climata package

2017-02-10 Thread Alan Gauld via Tutor
On 10/02/17 20:07, fei fan wrote: > Hi tutor, > > Do you know of any good resources to extract data using the climata > package and to convert these data in .geojson format? This forum is for the core language and standard library so this is a bit off topic, you might get a better response on th

[Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
I was playing around with type() tonight. If I type (pun intended), I get: py3: type(5) So I naively thought a test for type int should go like: py3: type(5) == "" False Hmm. So I tried these other failing tests: py3: type(5) == File "", line 1 type(5) == ^ SyntaxErro

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread Zachary Ware
On Fri, Feb 10, 2017 at 7:34 PM, boB Stepp wrote: > So my question is why does "type(5)" result in "", but > the correct Boolean test is "type(5) == int"? I suspect it has > something to do with the built-in attributes of Python objects that I > currently know so very little about. Try `help(rep

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread Alex Kleider
On 2017-02-10 17:34, boB Stepp wrote: I was playing around with type() tonight. . I've also "played around" with this subject- Here's a source: http://stackoverflow.com/questions/152580/whats-the-canonical-way-to-check-for-type-in-python ... and a successful experiment: alex@X301n3:~$

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread Ben Finney
boB Stepp writes: > I was playing around with type() tonight. If I type (pun intended), I get: > > py3: type(5) > Ceci n'est pas un ‘int’. > So I naively thought a test for type int should go like: > > py3: type(5) == "" > False > > Hmm. The output from the REPL can only be text. But a type,

[Tutor] Python-list thread: int vs. float

2017-02-10 Thread boB Stepp
I have been following the thread "int vs. float" (https://mail.python.org/pipermail/python-list/2017-February/719287.html) on the main list. A search for the OP on the Tutor archive came up negative, so I am hoping he is not following Tutor tonight (Or anytime prior to the due date for his homewor

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread eryk sun
On Sat, Feb 11, 2017 at 1:34 AM, boB Stepp wrote: > I was playing around with type() tonight. If I type (pun intended), I get: > > py3: type(5) > `type` is a metaclass that either creates a new class (given 3 arguments: name, bases, and dict) or returns a reference to the class of an existing o

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
On Fri, Feb 10, 2017 at 7:50 PM, Zachary Ware wrote: > Try `help(repr)` and `int` on its own at the interactive prompt, and py3: help(repr) Help on built-in function repr in module builtins: repr(obj, /) Return the canonical string representation of the object. For many object types, i

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
On Fri, Feb 10, 2017 at 8:05 PM, eryk sun wrote: > Speaking of classes and metaclasses, note that you can't call > int.__repr__(int) to get this representation, because the __repr__ > special method of int is meant for instances of int such as int(5). This bit got me experimenting. Since the in

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread eryk sun
On Sat, Feb 11, 2017 at 4:32 AM, boB Stepp wrote: > > This bit got me experimenting. Since the integer "5" is an integer > object instance, I am wondering why I can't do: > > py3: 5.__repr__() > File "", line 1 > 5.__repr__() > ^ > SyntaxError: invalid syntax > > , but I can do

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
Thanks for the detailed information. I have a final really nitpicky question. On Fri, Feb 10, 2017 at 11:27 PM, eryk sun wrote: > On Sat, Feb 11, 2017 at 4:32 AM, boB Stepp wrote: >> >> This bit got me experimenting. Since the integer "5" is an integer >> object instance, I am wondering why I

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread eryk sun
On Sat, Feb 11, 2017 at 3:22 AM, boB Stepp wrote: > > py3: help(repr) > Help on built-in function repr in module builtins: > > repr(obj, /) > Return the canonical string representation of the object. > > For many object types, including most builtins, eval(repr(obj)) == obj. > > Question:

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
On Fri, Feb 10, 2017 at 11:49 PM, eryk sun wrote: > On Sat, Feb 11, 2017 at 3:22 AM, boB Stepp wrote: >> >> py3: help(repr) >> Help on built-in function repr in module builtins: >> >> repr(obj, /) >> Return the canonical string representation of the object. >> >> For many object types, in

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread eryk sun
On Sat, Feb 11, 2017 at 6:22 AM, boB Stepp wrote: > On Fri, Feb 10, 2017 at 11:49 PM, eryk sun wrote: > >> It's from the function's __text_signature__. >> >> >>> repr.__text_signature__ >> '($module, obj, /)' >> >> It means "obj" is a positional-only argument that cannot be passed as a >

Re: [Tutor] Test for type(object) == ???

2017-02-10 Thread boB Stepp
On Sat, Feb 11, 2017 at 12:57 AM, eryk sun wrote: > > The '/' syntax for positional-only arguments is documented in PEP 457. > > https://www.python.org/dev/peps/pep-0457 At https://www.python.org/dev/peps/pep-0457/#id14 in PEP 457 it says: >From the "ten-thousand foot view", and ignoring *arg