workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
i think pyyaml is the defacto.
2017-07-26T14:50:23.247653
Johana
pythondev_help_Johana_2017-07-26T14:50:23.247653
1,501,080,623.247653
87,403
pythondev
help
just be careful the import is `yaml`
2017-07-26T14:51:24.283356
Ciera
pythondev_help_Ciera_2017-07-26T14:51:24.283356
1,501,080,684.283356
87,404
pythondev
help
got it.
2017-07-26T14:51:41.292671
Myong
pythondev_help_Myong_2017-07-26T14:51:41.292671
1,501,080,701.292671
87,405
pythondev
help
should I use the `- item` or `[item]` for a list?
2017-07-26T14:54:29.392128
Myong
pythondev_help_Myong_2017-07-26T14:54:29.392128
1,501,080,869.392128
87,406
pythondev
help
Personally I prefer `- item` but depend if you have a long list I guess
2017-07-26T14:55:48.438707
Ciera
pythondev_help_Ciera_2017-07-26T14:55:48.438707
1,501,080,948.438707
87,407
pythondev
help
okay wow this is insanely more simple
2017-07-26T14:57:33.500907
Myong
pythondev_help_Myong_2017-07-26T14:57:33.500907
1,501,081,053.500907
87,408
pythondev
help
is there a reason to maintain a globals file for any reason with the yaml
2017-07-26T14:58:56.550290
Myong
pythondev_help_Myong_2017-07-26T14:58:56.550290
1,501,081,136.55029
87,409
pythondev
help
depends what you want to be user configurable or not
2017-07-26T15:00:04.591113
Ciera
pythondev_help_Ciera_2017-07-26T15:00:04.591113
1,501,081,204.591113
87,410
pythondev
help
I think I'm gonna just leave the .yaml file for someone to add more items to if they want to configure it any more. I'm gonna use `tkinter` to make dropdowns to select an item from lists
2017-07-26T15:06:27.816048
Myong
pythondev_help_Myong_2017-07-26T15:06:27.816048
1,501,081,587.816048
87,411
pythondev
help
tkinter is alright!
2017-07-26T16:06:44.795802
Suellen
pythondev_help_Suellen_2017-07-26T16:06:44.795802
1,501,085,204.795802
87,412
pythondev
help
lots of people thing otherwise
2017-07-26T16:06:52.799893
Suellen
pythondev_help_Suellen_2017-07-26T16:06:52.799893
1,501,085,212.799893
87,413
pythondev
help
but it's got TTK for native widgets, pygubu for visual editing of your app...
2017-07-26T16:07:14.811883
Suellen
pythondev_help_Suellen_2017-07-26T16:07:14.811883
1,501,085,234.811883
87,414
pythondev
help
Hello all, I want to get value of b from the dictionary mentioned below cursor = {a: [{b: 'Oregon', c: 223, d: 35}], e: 118686L}
2017-07-26T16:46:01.082479
Susie
pythondev_help_Susie_2017-07-26T16:46:01.082479
1,501,087,561.082479
87,415
pythondev
help
cursor[a][0][b]?
2017-07-26T16:48:25.162646
Johana
pythondev_help_Johana_2017-07-26T16:48:25.162646
1,501,087,705.162646
87,416
pythondev
help
`ValueError: dictionary update sequence element #0 has length 1; 2 is required` Getting this issue currently while passing a parent class to a create a new child class. I would like to pass both the parent as well as a list to the class.
2017-07-26T16:53:45.337021
Myong
pythondev_help_Myong_2017-07-26T16:53:45.337021
1,501,088,025.337021
87,417
pythondev
help
can you provide a small code sample <@Myong> ?
2017-07-26T16:55:40.399918
Beula
pythondev_help_Beula_2017-07-26T16:55:40.399918
1,501,088,140.399918
87,418
pythondev
help
Yeah
2017-07-26T16:56:46.436092
Myong
pythondev_help_Myong_2017-07-26T16:56:46.436092
1,501,088,206.436092
87,419
pythondev
help
oh wait that's the wrong part
2017-07-26T16:57:40.466423
Myong
pythondev_help_Myong_2017-07-26T16:57:40.466423
1,501,088,260.466423
87,420
pythondev
help
one sec
2017-07-26T16:57:42.467316
Myong
pythondev_help_Myong_2017-07-26T16:57:42.467316
1,501,088,262.467316
87,421
pythondev
help
I was previously destroying root every time, but I'd like to just destroy the frame so it doesnt close out 4 times and open back up...
2017-07-26T16:58:46.502615
Myong
pythondev_help_Myong_2017-07-26T16:58:46.502615
1,501,088,326.502615
87,422
pythondev
help
and the settings one is a list
2017-07-26T16:59:32.527878
Myong
pythondev_help_Myong_2017-07-26T16:59:32.527878
1,501,088,372.527878
87,423
pythondev
help
well it's a dict of lists
2017-07-26T16:59:58.542423
Myong
pythondev_help_Myong_2017-07-26T16:59:58.542423
1,501,088,398.542423
87,424
pythondev
help
`settings['route']` is a list though as well as `settings['base_url']`
2017-07-26T17:00:10.549807
Myong
pythondev_help_Myong_2017-07-26T17:00:10.549807
1,501,088,410.549807
87,425
pythondev
help
I tried using `*args`
2017-07-26T17:00:57.576131
Myong
pythondev_help_Myong_2017-07-26T17:00:57.576131
1,501,088,457.576131
87,426
pythondev
help
I think your super calls are a bit weird, you probably want `super(Values, self).__init__(parent, choices)` or if your're on py3: `super().__init__(*args)`
2017-07-26T17:01:05.580143
Beula
pythondev_help_Beula_2017-07-26T17:01:05.580143
1,501,088,465.580143
87,427
pythondev
help
Gotcha, probably just looking at old code examples
2017-07-26T17:01:19.588113
Myong
pythondev_help_Myong_2017-07-26T17:01:19.588113
1,501,088,479.588113
87,428
pythondev
help
Not sure of your issue there though
2017-07-26T17:01:22.589392
Beula
pythondev_help_Beula_2017-07-26T17:01:22.589392
1,501,088,482.589392
87,429
pythondev
help
Yeah it's odd you could be right though
2017-07-26T17:01:34.595972
Myong
pythondev_help_Myong_2017-07-26T17:01:34.595972
1,501,088,494.595972
87,430
pythondev
help
I had super earlier actually it was working find
2017-07-26T17:01:43.600897
Myong
pythondev_help_Myong_2017-07-26T17:01:43.600897
1,501,088,503.600897
87,431
pythondev
help
fine now that I think about it
2017-07-26T17:01:48.603518
Myong
pythondev_help_Myong_2017-07-26T17:01:48.603518
1,501,088,508.603518
87,432
pythondev
help
I think it's how you're passing to the super though
2017-07-26T17:02:19.620221
Beula
pythondev_help_Beula_2017-07-26T17:02:19.620221
1,501,088,539.620221
87,433
pythondev
help
I think the signature is `Frame(master, ...options)` - so you may need to unpack your dict as options
2017-07-26T17:02:45.634353
Beula
pythondev_help_Beula_2017-07-26T17:02:45.634353
1,501,088,565.634353
87,434
pythondev
help
`super().__init__(parent, **options)`
2017-07-26T17:02:53.638630
Beula
pythondev_help_Beula_2017-07-26T17:02:53.638630
1,501,088,573.63863
87,435
pythondev
help
oh wait, I don't need to pass `self` to super... :facepalm:
2017-07-26T17:04:18.684192
Myong
pythondev_help_Myong_2017-07-26T17:04:18.684192
1,501,088,658.684192
87,436
pythondev
help
hmmm, still same issue
2017-07-26T17:05:37.725634
Myong
pythondev_help_Myong_2017-07-26T17:05:37.725634
1,501,088,737.725634
87,437
pythondev
help
turns out tkinter Frames object cant take in 3 arguments unless the 3rd is a dictionary
2017-07-26T17:07:25.781445
Myong
pythondev_help_Myong_2017-07-26T17:07:25.781445
1,501,088,845.781445
87,438
pythondev
help
I was trying to find the docs on the signature more, they are certainly lacking
2017-07-26T17:08:02.800067
Beula
pythondev_help_Beula_2017-07-26T17:08:02.800067
1,501,088,882.800067
87,439
pythondev
help
Yeah pretty abysmal tbh
2017-07-26T17:08:15.806796
Myong
pythondev_help_Myong_2017-07-26T17:08:15.806796
1,501,088,895.806796
87,440
pythondev
help
Nearly done though
2017-07-26T17:08:18.808504
Myong
pythondev_help_Myong_2017-07-26T17:08:18.808504
1,501,088,898.808504
87,441
pythondev
help
And another issue... How am I supposed to pass in anything to this class if it cant take more than one argument...
2017-07-26T17:12:09.921062
Myong
pythondev_help_Myong_2017-07-26T17:12:09.921062
1,501,089,129.921062
87,442
pythondev
help
What do you mean? Only the parent can't take more than one - your class can though
2017-07-26T17:15:16.010829
Beula
pythondev_help_Beula_2017-07-26T17:15:16.010829
1,501,089,316.010829
87,443
pythondev
help
are there anymore easter eggs in python than 'import this'?
2017-07-26T19:30:34.909485
Kari
pythondev_help_Kari_2017-07-26T19:30:34.909485
1,501,097,434.909485
87,444
pythondev
help
'import this' is the surest way to a guilt trip in Python
2017-07-26T19:31:17.921232
Levi
pythondev_help_Levi_2017-07-26T19:31:17.921232
1,501,097,477.921232
87,445
pythondev
help
lol
2017-07-26T19:31:32.925134
Kari
pythondev_help_Kari_2017-07-26T19:31:32.925134
1,501,097,492.925134
87,446
pythondev
help
there's `from __future__ import braces`
2017-07-26T19:34:35.973198
Marcie
pythondev_help_Marcie_2017-07-26T19:34:35.973198
1,501,097,675.973198
87,447
pythondev
help
and `import antigravity`
2017-07-26T19:34:49.976821
Marcie
pythondev_help_Marcie_2017-07-26T19:34:49.976821
1,501,097,689.976821
87,448
pythondev
help
`from stackoverflow import quicksort`
2017-07-26T19:36:14.998802
Levi
pythondev_help_Levi_2017-07-26T19:36:14.998802
1,501,097,774.998802
87,449
pythondev
help
^^^ best help advice you've ever seen in your entire life.
2017-07-26T19:36:41.005668
Levi
pythondev_help_Levi_2017-07-26T19:36:41.005668
1,501,097,801.005668
87,450
pythondev
help
lol xkcd one nice
2017-07-26T19:47:06.165790
Kari
pythondev_help_Kari_2017-07-26T19:47:06.165790
1,501,098,426.16579
87,451
pythondev
help
`import hello`
2017-07-26T19:55:53.299585
Beula
pythondev_help_Beula_2017-07-26T19:55:53.299585
1,501,098,953.299585
87,452
pythondev
help
I have a stupid question: I'm doing a tutorial on making command line apps with argparse. I'm most comfortable working in a Jupyter notebook, though - obviously I'll need to transfer it to a script eventually, but is there a way I could like simulate user input in a Jupyter cell instead of switching back and forth between text editor and shell?
2017-07-26T21:28:05.509217
Chanel
pythondev_help_Chanel_2017-07-26T21:28:05.509217
1,501,104,485.509217
87,453
pythondev
help
<@Chanel> yup! by default `arg_parse()` just looks for the command line arguments from `sys.argv` but you can pass your own list of arguments to it
2017-07-26T21:31:10.547684
Marcie
pythondev_help_Marcie_2017-07-26T21:31:10.547684
1,501,104,670.547684
87,454
pythondev
help
Aha! Awesome, thanks! :slightly_smiling_face:
2017-07-26T21:31:42.554497
Chanel
pythondev_help_Chanel_2017-07-26T21:31:42.554497
1,501,104,702.554497
87,455
pythondev
help
i enjoy building cli apps with argparse but lately click has been my go to.
2017-07-26T22:23:03.167162
Johana
pythondev_help_Johana_2017-07-26T22:23:03.167162
1,501,107,783.167162
87,456
pythondev
help
click is super nice
2017-07-26T22:54:00.514937
Marcie
pythondev_help_Marcie_2017-07-26T22:54:00.514937
1,501,109,640.514937
87,457
pythondev
help
but i never use it unless i'm pulling in at least one other dependency
2017-07-26T22:54:22.519071
Marcie
pythondev_help_Marcie_2017-07-26T22:54:22.519071
1,501,109,662.519071
87,458
pythondev
help
You can always vendor it
2017-07-26T23:16:28.753617
Collette
pythondev_help_Collette_2017-07-26T23:16:28.753617
1,501,110,988.753617
87,459
pythondev
help
click is slick
2017-07-26T23:18:04.769436
Marilyn
pythondev_help_Marilyn_2017-07-26T23:18:04.769436
1,501,111,084.769436
87,460
pythondev
help
<@Collette> true true
2017-07-26T23:22:51.817048
Marcie
pythondev_help_Marcie_2017-07-26T23:22:51.817048
1,501,111,371.817048
87,461
pythondev
help
Hello, `HTTP GET` is giving `400` on one machine but works perfectly fine (`200`) on other machine for the same URL. Any ideas why?
2017-07-27T01:19:16.983943
Katheryn
pythondev_help_Katheryn_2017-07-27T01:19:16.983943
1,501,118,356.983943
87,462
pythondev
help
machine 1 ``` &gt;&gt;&gt; import requests &gt;&gt;&gt; requests.get(url) &lt;Response [400]&gt; ``` machine 2 ``` &gt;&gt;&gt; import requests &gt;&gt;&gt; requests.get(url) &lt;Response [200]&gt; ```
2017-07-27T01:20:42.998120
Katheryn
pythondev_help_Katheryn_2017-07-27T01:20:42.998120
1,501,118,442.99812
87,463
pythondev
help
Both use the same version of `requests`
2017-07-27T01:21:24.005370
Katheryn
pythondev_help_Katheryn_2017-07-27T01:21:24.005370
1,501,118,484.00537
87,464
pythondev
help
is there anything in the returning body of your 400?
2017-07-27T01:27:14.061455
Marcie
pythondev_help_Marcie_2017-07-27T01:27:14.061455
1,501,118,834.061455
87,465
pythondev
help
Hi all, I want to write a program to get the MySQL status through the command line. E.g The command what I am doing is `msqladmin -u username -p password status` (there is no space between -p and password.) But I don't want to provide password through the command line. But give the input as password to the command line on asking password. Like ``` msqladmin -u username -p status password ****** ``` Is there a way to do it?
2017-07-27T01:29:55.087716
Delisa
pythondev_help_Delisa_2017-07-27T01:29:55.087716
1,501,118,995.087716
87,466
pythondev
help
oh, thanks <@Marcie> , just checked the returned `text` from the request. my machine’s IP is blacklisted, oops
2017-07-27T01:29:57.088089
Katheryn
pythondev_help_Katheryn_2017-07-27T01:29:57.088089
1,501,118,997.088089
87,467
pythondev
help
that'd do it!
2017-07-27T01:31:41.106684
Marcie
pythondev_help_Marcie_2017-07-27T01:31:41.106684
1,501,119,101.106684
87,468
pythondev
help
<@Delisa> technically `subprocess.Popen` has a `communicate` method to do this
2017-07-27T01:43:35.228448
Marcie
pythondev_help_Marcie_2017-07-27T01:43:35.228448
1,501,119,815.228448
87,469
pythondev
help
but after 10 years of python i still can never get any subprocess thing to handle input properly and i hate it
2017-07-27T01:43:52.231263
Marcie
pythondev_help_Marcie_2017-07-27T01:43:52.231263
1,501,119,832.231263
87,470
pythondev
help
ooh cool i found a handy library called `sh` that isn't awful
2017-07-27T01:55:45.357365
Marcie
pythondev_help_Marcie_2017-07-27T01:55:45.357365
1,501,120,545.357365
87,471
pythondev
help
<@Delisa> you can use `sh` to easily get this result: ```import sh result = sh.mysqladmin('-h', '127.0.0.1', '-u', 'root', '-p', 'status', _in='password') print(result.stdout)```
2017-07-27T01:56:09.361996
Marcie
pythondev_help_Marcie_2017-07-27T01:56:09.361996
1,501,120,569.361996
87,472
pythondev
help
is it just a subprocess with some helpers ?
2017-07-27T01:59:26.398549
Ciera
pythondev_help_Ciera_2017-07-27T01:59:26.398549
1,501,120,766.398549
87,473
pythondev
help
its like subprocess for humans
2017-07-27T02:02:15.434297
Marcie
pythondev_help_Marcie_2017-07-27T02:02:15.434297
1,501,120,935.434297
87,474
pythondev
help
from the documentation, stuff like this: ```from subprocess import Popen, PIPE, STDOUT mysql_check = Popen(['mysqladmin', '-h', '127.0.0.1', '-u', 'root', '-p', 'status'], stdout=PIPE, stdin=PIPE, stderr=STDOUT) out, err = mysql_check.communicate(input=b'password') print(out)```
2017-07-27T02:06:29.483829
Marcie
pythondev_help_Marcie_2017-07-27T02:06:29.483829
1,501,121,189.483829
87,475
pythondev
help
should work, but never does
2017-07-27T02:06:34.484841
Marcie
pythondev_help_Marcie_2017-07-27T02:06:34.484841
1,501,121,194.484841
87,476
pythondev
help
yeah i'm looking through the doc
2017-07-27T02:07:02.490414
Ciera
pythondev_help_Ciera_2017-07-27T02:07:02.490414
1,501,121,222.490414
87,477
pythondev
help
seems nice
2017-07-27T02:07:06.491192
Ciera
pythondev_help_Ciera_2017-07-27T02:07:06.491192
1,501,121,226.491192
87,478
pythondev
help
<@Marcie> I tried it already. But it's asking for password.
2017-07-27T02:32:35.813367
Delisa
pythondev_help_Delisa_2017-07-27T02:32:35.813367
1,501,122,755.813367
87,479
pythondev
help
<@Delisa> yeah i couldn't get the `subprocess.Popen` version working without asking for a password either
2017-07-27T02:33:22.824178
Marcie
pythondev_help_Marcie_2017-07-27T02:33:22.824178
1,501,122,802.824178
87,480
pythondev
help
the `sh` version works though
2017-07-27T02:33:27.825325
Marcie
pythondev_help_Marcie_2017-07-27T02:33:27.825325
1,501,122,807.825325
87,481
pythondev
help
<@Marcie> Sorry subprocess is not working, But sh is working fine.
2017-07-27T02:34:18.836802
Delisa
pythondev_help_Delisa_2017-07-27T02:34:18.836802
1,501,122,858.836802
87,482
pythondev
help
Correct. But documentation saying like that subprocess will work.
2017-07-27T02:35:18.850538
Delisa
pythondev_help_Delisa_2017-07-27T02:35:18.850538
1,501,122,918.850538
87,483
pythondev
help
<@Marcie> Thank you. One problem is that will work for linux versions only. I want to work it for windows also.
2017-07-27T02:41:01.927819
Delisa
pythondev_help_Delisa_2017-07-27T02:41:01.927819
1,501,123,261.927819
87,484
pythondev
help
Hey guys, working in tkinter and having an issue with the Frames I am instantiating are going in the wrong order. Maybe it's something stupid, but I'm not too sure.
2017-07-27T09:31:50.581811
Myong
pythondev_help_Myong_2017-07-27T09:31:50.581811
1,501,147,910.581811
87,485
pythondev
help
I need to attach a command to a button in tkinter, and it has to be able to attach to another widget/Frame which does not yet exist. So without using `lambda` I get an error because the key does not exist within the dictionary
2017-07-27T11:09:29.799678
Myong
pythondev_help_Myong_2017-07-27T11:09:29.799678
1,501,153,769.799678
87,486
pythondev
help
But I also need to run more than one single expression
2017-07-27T11:09:41.807144
Myong
pythondev_help_Myong_2017-07-27T11:09:41.807144
1,501,153,781.807144
87,487
pythondev
help
How can I reference something that does not exist?
2017-07-27T11:09:51.813842
Myong
pythondev_help_Myong_2017-07-27T11:09:51.813842
1,501,153,791.813842
87,488
pythondev
help
It sucks because it works with `command=lambda: ` but with a `command=func` which I sort of need because I need to grab some data from the fields when the button is clicked.
2017-07-27T11:31:17.671244
Myong
pythondev_help_Myong_2017-07-27T11:31:17.671244
1,501,155,077.671244
87,489
pythondev
help
Look at `functools.partial`
2017-07-27T11:32:11.707725
Beula
pythondev_help_Beula_2017-07-27T11:32:11.707725
1,501,155,131.707725
87,490
pythondev
help
You can make a partially applied function and delay the execution
2017-07-27T11:32:33.723553
Beula
pythondev_help_Beula_2017-07-27T11:32:33.723553
1,501,155,153.723553
87,491
pythondev
help
Is the function invoked right away though? Either one seems like it should fail
2017-07-27T11:33:14.750497
Beula
pythondev_help_Beula_2017-07-27T11:33:14.750497
1,501,155,194.750497
87,492
pythondev
help
Well here's what happens
2017-07-27T11:33:28.760751
Myong
pythondev_help_Myong_2017-07-27T11:33:28.760751
1,501,155,208.760751
87,493
pythondev
help
So I have a main root for my application
2017-07-27T11:33:34.764928
Myong
pythondev_help_Myong_2017-07-27T11:33:34.764928
1,501,155,214.764928
87,494
pythondev
help
&gt; It sucks because it works with `command=lambda: ` but with a `command=func` which I sort of need because I need to grab some data from the fields when the button is clicked.
2017-07-27T11:33:48.774151
Suellen
pythondev_help_Suellen_2017-07-27T11:33:48.774151
1,501,155,228.774151
87,495
pythondev
help
and I have 3 classes, one for each different "page" which are all `Tk.Frame` objects
2017-07-27T11:33:51.776292
Myong
pythondev_help_Myong_2017-07-27T11:33:51.776292
1,501,155,231.776292
87,496
pythondev
help
`lambda: func(button1.text, button2.text)`?
2017-07-27T11:34:04.785048
Suellen
pythondev_help_Suellen_2017-07-27T11:34:04.785048
1,501,155,244.785048
87,497
pythondev
help
Now in order to show the next frame after a submit button I have to have the next Frame available and already initialized. However in order to initialize the Frame which I want to show I have to also create that function that runs on click which requires the next Frame to also be initializied, but it hasn't been initialized yet because the first one is still being initializied lol
2017-07-27T11:35:31.842272
Myong
pythondev_help_Myong_2017-07-27T11:35:31.842272
1,501,155,331.842272
87,498
pythondev
help
Slightly confusing I will show code
2017-07-27T11:35:37.845978
Myong
pythondev_help_Myong_2017-07-27T11:35:37.845978
1,501,155,337.845978
87,499
pythondev
help
wait, lambdas "execute" when you access them
2017-07-27T11:35:58.860346
Suellen
pythondev_help_Suellen_2017-07-27T11:35:58.860346
1,501,155,358.860346
87,500
pythondev
help
i.e. `lambda: func(x)` - `func` won't be called until you click the button
2017-07-27T11:36:27.879796
Suellen
pythondev_help_Suellen_2017-07-27T11:36:27.879796
1,501,155,387.879796
87,501
pythondev
help
There is basically a `dict` with `Frame: Frame obj`
2017-07-27T11:36:38.886822
Myong
pythondev_help_Myong_2017-07-27T11:36:38.886822
1,501,155,398.886822
87,502