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
The Share Library is already done by another person I Import it in Python and I need to use some function calls
2017-08-08T17:22:04.277233
Elanor
pythondev_help_Elanor_2017-08-08T17:22:04.277233
1,502,212,924.277233
89,203
pythondev
help
he told me to use extern , but I don't know what that mean in Python
2017-08-08T17:22:29.288653
Elanor
pythondev_help_Elanor_2017-08-08T17:22:29.288653
1,502,212,949.288653
89,204
pythondev
help
can you point to the source of the library so we know what sdk is?
2017-08-08T17:22:55.300476
Bruno
pythondev_help_Bruno_2017-08-08T17:22:55.300476
1,502,212,975.300476
89,205
pythondev
help
i think thats what he needs
2017-08-08T17:23:09.306668
Bruno
pythondev_help_Bruno_2017-08-08T17:23:09.306668
1,502,212,989.306668
89,206
pythondev
help
this sounds like you need to import the .so into python and call a function right?
2017-08-08T17:26:46.405633
Orpha
pythondev_help_Orpha_2017-08-08T17:26:46.405633
1,502,213,206.405633
89,207
pythondev
help
yes
2017-08-08T17:29:13.475073
Elanor
pythondev_help_Elanor_2017-08-08T17:29:13.475073
1,502,213,353.475073
89,208
pythondev
help
If I can get the source I will provide it to you
2017-08-08T17:29:32.484025
Elanor
pythondev_help_Elanor_2017-08-08T17:29:32.484025
1,502,213,372.484025
89,209
pythondev
help
but the function Name is Sdk_new2
2017-08-08T17:29:57.496638
Elanor
pythondev_help_Elanor_2017-08-08T17:29:57.496638
1,502,213,397.496638
89,210
pythondev
help
and SDK is the Main class name
2017-08-08T17:30:42.518337
Elanor
pythondev_help_Elanor_2017-08-08T17:30:42.518337
1,502,213,442.518337
89,211
pythondev
help
in C++
2017-08-08T17:30:53.523798
Elanor
pythondev_help_Elanor_2017-08-08T17:30:53.523798
1,502,213,453.523798
89,212
pythondev
help
Sounds like you could benefit from CFFI
2017-08-08T17:31:07.530760
Beula
pythondev_help_Beula_2017-08-08T17:31:07.530760
1,502,213,467.53076
89,213
pythondev
help
<https://cffi.readthedocs.io/en/latest/overview.html>
2017-08-08T17:31:08.531182
Beula
pythondev_help_Beula_2017-08-08T17:31:08.531182
1,502,213,468.531182
89,214
pythondev
help
well, the name doesnt mean much. we need to know what it does in C in order to do similar in python.
2017-08-08T17:31:25.538634
Bruno
pythondev_help_Bruno_2017-08-08T17:31:25.538634
1,502,213,485.538634
89,215
pythondev
help
I don't think they are trying to recreate it in Python, I think they want to use the shared lib from python
2017-08-08T17:32:14.561674
Beula
pythondev_help_Beula_2017-08-08T17:32:14.561674
1,502,213,534.561674
89,216
pythondev
help
CFFI is the easiest way IIRC
2017-08-08T17:32:21.564758
Beula
pythondev_help_Beula_2017-08-08T17:32:21.564758
1,502,213,541.564758
89,217
pythondev
help
I will take a look
2017-08-08T17:32:45.575659
Elanor
pythondev_help_Elanor_2017-08-08T17:32:45.575659
1,502,213,565.575659
89,218
pythondev
help
ah yea. i was thinking wrong.
2017-08-08T17:32:47.576917
Bruno
pythondev_help_Bruno_2017-08-08T17:32:47.576917
1,502,213,567.576917
89,219
pythondev
help
No what I'm going to do in Python just Functuon Calls
2017-08-08T17:33:08.586159
Elanor
pythondev_help_Elanor_2017-08-08T17:33:08.586159
1,502,213,588.586159
89,220
pythondev
help
may have gotten lost above. but looking to see how others may be deploying docker on aws. either their container service or beanstalk or something else.
2017-08-08T17:59:31.279097
Bruno
pythondev_help_Bruno_2017-08-08T17:59:31.279097
1,502,215,171.279097
89,221
pythondev
help
We did Mesos, so using an orchestration system
2017-08-08T17:59:55.289567
Beula
pythondev_help_Beula_2017-08-08T17:59:55.289567
1,502,215,195.289567
89,222
pythondev
help
ah. yea, rancher came to mind too.
2017-08-08T18:00:08.295668
Bruno
pythondev_help_Bruno_2017-08-08T18:00:08.295668
1,502,215,208.295668
89,223
pythondev
help
i havent touched mesos
2017-08-08T18:00:14.297976
Bruno
pythondev_help_Bruno_2017-08-08T18:00:14.297976
1,502,215,214.297976
89,224
pythondev
help
Kubernetes, Mesos, Rancher, Swarm - take your pick :slightly_smiling_face:
2017-08-08T18:01:24.328742
Beula
pythondev_help_Beula_2017-08-08T18:01:24.328742
1,502,215,284.328742
89,225
pythondev
help
the place im trying to get an interview with i guess is using docker with aws.
2017-08-08T18:01:37.334118
Bruno
pythondev_help_Bruno_2017-08-08T18:01:37.334118
1,502,215,297.334118
89,226
pythondev
help
Everywhere seems to say that these days :wink:
2017-08-08T18:01:53.340634
Beula
pythondev_help_Beula_2017-08-08T18:01:53.340634
1,502,215,313.340634
89,227
pythondev
help
or they want to. or something.
2017-08-08T18:02:13.348875
Bruno
pythondev_help_Bruno_2017-08-08T18:02:13.348875
1,502,215,333.348875
89,228
pythondev
help
yea
2017-08-08T18:02:18.351190
Bruno
pythondev_help_Bruno_2017-08-08T18:02:18.351190
1,502,215,338.35119
89,229
pythondev
help
hi everyone, please advice a book to study Python 3 for BEGINNERS
2017-08-08T18:20:59.766673
Laverne
pythondev_help_Laverne_2017-08-08T18:20:59.766673
1,502,216,459.766673
89,230
pythondev
help
<@Laverne> Two came up today that are good: * <http://python101.pythonlibrary.org/index.html>
2017-08-08T18:23:34.819597
Beula
pythondev_help_Beula_2017-08-08T18:23:34.819597
1,502,216,614.819597
89,231
pythondev
help
I always suggest automate the boring stuff
2017-08-08T18:23:54.826358
Lamonica
pythondev_help_Lamonica_2017-08-08T18:23:54.826358
1,502,216,634.826358
89,232
pythondev
help
not sure about the book but at least the web uses python 3: <https://automatetheboringstuff.com/chapter1/>
2017-08-08T18:24:04.829803
Lamonica
pythondev_help_Lamonica_2017-08-08T18:24:04.829803
1,502,216,644.829803
89,233
pythondev
help
That's the link I was trying to get :slightly_smiling_face:
2017-08-08T18:24:07.830781
Beula
pythondev_help_Beula_2017-08-08T18:24:07.830781
1,502,216,647.830781
89,234
pythondev
help
<@Lamonica> :taco:
2017-08-08T18:24:11.832295
Beula
pythondev_help_Beula_2017-08-08T18:24:11.832295
1,502,216,651.832295
89,235
pythondev
help
:slightly_smiling_face:
2017-08-08T18:24:27.837928
Lamonica
pythondev_help_Lamonica_2017-08-08T18:24:27.837928
1,502,216,667.837928
89,236
pythondev
help
Both are free online
2017-08-08T18:24:34.840132
Beula
pythondev_help_Beula_2017-08-08T18:24:34.840132
1,502,216,674.840132
89,237
pythondev
help
THANKS:+1:
2017-08-08T18:24:53.846515
Laverne
pythondev_help_Laverne_2017-08-08T18:24:53.846515
1,502,216,693.846515
89,238
pythondev
help
cross posting here -- <https://stackoverflow.com/questions/45576378/boost-python-library-linking-issue-undefined-symbol/45578139?noredirect=1#comment78117846_45578139>
2017-08-08T21:37:22.853625
Tameika
pythondev_help_Tameika_2017-08-08T21:37:22.853625
1,502,228,242.853625
89,239
pythondev
help
should I only ask questions in here if I have them?
2017-08-08T22:26:05.441689
Steve
pythondev_help_Steve_2017-08-08T22:26:05.441689
1,502,231,165.441689
89,240
pythondev
help
<@Steve> this is typically a place for generic python questions or if there isnt a more specific place to ask your question if it's about a particular library or topic (such as <#C0LMFRMB5|django>, <#C07EYDP25|webdev>, <#C2J4B66PK|machine_learning>, etc.)
2017-08-08T22:31:48.506290
Marcie
pythondev_help_Marcie_2017-08-08T22:31:48.506290
1,502,231,508.50629
89,241
pythondev
help
cool thanks
2017-08-08T22:36:40.559996
Steve
pythondev_help_Steve_2017-08-08T22:36:40.559996
1,502,231,800.559996
89,242
pythondev
help
if you have 3 files as follows : `/usr/lib/x86_64-linux-gnu/libboost_python-py27.so /usr/lib/x86_64-linux-gnu/libboost_python-py34.so /usr/lib/x86_64-linux-gnu/libboost_python.so`
2017-08-09T01:36:24.926101
Tameika
pythondev_help_Tameika_2017-08-09T01:36:24.926101
1,502,242,584.926101
89,243
pythondev
help
How do I link the `libboost_python-py34.so`to `-lboost_python`?
2017-08-09T01:36:53.931168
Tameika
pythondev_help_Tameika_2017-08-09T01:36:53.931168
1,502,242,613.931168
89,244
pythondev
help
Hm, how terrible of an idea is it to use classes as a sort of symbol, instead of using an enum? Something like this: ``` #!/usr/bin/env python3 class Symbol: pass class State(Symbol): pass class FireTheMissiles(State): pass class WaitAround(State): pass def perform_action(action: State) -&gt; None: if action is FireTheMissiles: print("On!") elif action is WaitAround: print("Off!") else: raise Exception("Unhandled action '{}'".format(action.__name__)) perform_action(FireTheMissiles) ```
2017-08-09T08:29:17.544801
Lanita
pythondev_help_Lanita_2017-08-09T08:29:17.544801
1,502,267,357.544801
89,245
pythondev
help
Stringly typed functions suck and there's no native symbols type AFAIK(?)
2017-08-09T08:30:46.578385
Lanita
pythondev_help_Lanita_2017-08-09T08:30:46.578385
1,502,267,446.578385
89,246
pythondev
help
<@Lanita> your conditions are all wrong. `if isinstance(action, FireTheMissiles)` is the correct one
2017-08-09T08:30:47.578684
Collette
pythondev_help_Collette_2017-08-09T08:30:47.578684
1,502,267,447.578684
89,247
pythondev
help
<@Collette>, no, I'm not instantiating the State classes
2017-08-09T08:31:33.596337
Lanita
pythondev_help_Lanita_2017-08-09T08:31:33.596337
1,502,267,493.596337
89,248
pythondev
help
Let's make it like this or something: ``` class Symbol: def __init__(self): raise Exception("Shouldn't be instantiated!") ``` ...to make sure that nobody tries instantiating the symbols
2017-08-09T08:32:51.626345
Lanita
pythondev_help_Lanita_2017-08-09T08:32:51.626345
1,502,267,571.626345
89,249
pythondev
help
a bit like how None is not callable
2017-08-09T08:33:47.648436
Lanita
pythondev_help_Lanita_2017-08-09T08:33:47.648436
1,502,267,627.648436
89,250
pythondev
help
`def perform_action(action: State)` declaration means that `action` is an instance of `State` :slightly_smiling_face:
2017-08-09T08:34:15.659631
Collette
pythondev_help_Collette_2017-08-09T08:34:15.659631
1,502,267,655.659631
89,251
pythondev
help
Ah, sorry, yes. Hm, is there a way to signify a non-instantiated class?
2017-08-09T08:34:43.671006
Lanita
pythondev_help_Lanita_2017-08-09T08:34:43.671006
1,502,267,683.671006
89,252
pythondev
help
type(WaitAround) is `&lt;class 'type'&gt;` so I guess that'd be weird...
2017-08-09T08:35:32.690615
Lanita
pythondev_help_Lanita_2017-08-09T08:35:32.690615
1,502,267,732.690615
89,253
pythondev
help
why use a class for that and not a string or whatever ?
2017-08-09T08:35:40.693710
Ciera
pythondev_help_Ciera_2017-08-09T08:35:40.693710
1,502,267,740.69371
89,254
pythondev
help
ovv, an error in stringly typed code won't be detected until runtime
2017-08-09T08:36:17.708252
Lanita
pythondev_help_Lanita_2017-08-09T08:36:17.708252
1,502,267,777.708252
89,255
pythondev
help
It's `Type[State]`, but I'd go with enums
2017-08-09T08:36:33.714702
Collette
pythondev_help_Collette_2017-08-09T08:36:33.714702
1,502,267,793.714702
89,256
pythondev
help
with this, you would have some file symbols.py where you'd import all the "symbols" you're using
2017-08-09T08:36:35.715461
Lanita
pythondev_help_Lanita_2017-08-09T08:36:35.715461
1,502,267,795.715461
89,257
pythondev
help
is there no way to add type check for string in a list or something like that in mypy ?
2017-08-09T08:37:43.741853
Ciera
pythondev_help_Ciera_2017-08-09T08:37:43.741853
1,502,267,863.741853
89,258
pythondev
help
jsut asking as I have nerver used it
2017-08-09T08:37:52.745514
Ciera
pythondev_help_Ciera_2017-08-09T08:37:52.745514
1,502,267,872.745514
89,259
pythondev
help
Ah, now I remember, the problem with enum is that until 3.6 there was no built-in way to automatically generate enums. Also, the syntax in 3.6 is really ugly either way
2017-08-09T08:40:42.815772
Lanita
pythondev_help_Lanita_2017-08-09T08:40:42.815772
1,502,268,042.815772
89,260
pythondev
help
Ugly? What's a better syntax?
2017-08-09T08:41:26.834001
Collette
pythondev_help_Collette_2017-08-09T08:41:26.834001
1,502,268,086.834001
89,261
pythondev
help
ah, after looking at it, Enum seems like a much better choice
2017-08-09T08:42:13.853410
Lanita
pythondev_help_Lanita_2017-08-09T08:42:13.853410
1,502,268,133.85341
89,262
pythondev
help
malinoff, having one auto() for every new possible value is really ugly
2017-08-09T08:42:48.868227
Lanita
pythondev_help_Lanita_2017-08-09T08:42:48.868227
1,502,268,168.868227
89,263
pythondev
help
The syntax is clearly a compromise for python not having proper enums to begin with
2017-08-09T08:43:38.888859
Lanita
pythondev_help_Lanita_2017-08-09T08:43:38.888859
1,502,268,218.888859
89,264
pythondev
help
maybe something like... sym FIRE_THE_MISSILES sym WAIT_AROUND StateEnum = SymbolCollection("StateEnum", FIRE_THE_MISSILES, WAIT_AROUND) (assuming that this was implemented way earlier, of course). This would allow symbols "on their own" as well as a collection of symbols. Perhaps that might as well be a list though, it really depends on how you're using enums to begin with
2017-08-09T08:48:30.011550
Lanita
pythondev_help_Lanita_2017-08-09T08:48:30.011550
1,502,268,510.01155
89,265
pythondev
help
I vaguely recall using `WHATEVER = object()` in the past for this sort of purpose
2017-08-09T09:10:00.608057
Gabriele
pythondev_help_Gabriele_2017-08-09T09:10:00.608057
1,502,269,800.608057
89,266
pythondev
help
Enum is new in 3.4
2017-08-09T09:11:34.654604
Beula
pythondev_help_Beula_2017-08-09T09:11:34.654604
1,502,269,894.654604
89,267
pythondev
help
How to run multiple tests output in a single class
2017-08-09T12:19:08.810901
Ok
pythondev_help_Ok_2017-08-09T12:19:08.810901
1,502,281,148.810901
89,268
pythondev
help
?
2017-08-09T12:19:20.818243
Suellen
pythondev_help_Suellen_2017-08-09T12:19:20.818243
1,502,281,160.818243
89,269
pythondev
help
please elaborate :slightly_smiling_face:
2017-08-09T12:19:25.821160
Suellen
pythondev_help_Suellen_2017-08-09T12:19:25.821160
1,502,281,165.82116
89,270
pythondev
help
I will text u in pm
2017-08-09T12:36:54.449923
Ok
pythondev_help_Ok_2017-08-09T12:36:54.449923
1,502,282,214.449923
89,271
pythondev
help
why not do it here?
2017-08-09T12:37:40.476037
Meg
pythondev_help_Meg_2017-08-09T12:37:40.476037
1,502,282,260.476037
89,272
pythondev
help
Ok i am having an issue trying to get subprocess to print back a ping -R command
2017-08-09T12:40:03.559337
Ressie
pythondev_help_Ressie_2017-08-09T12:40:03.559337
1,502,282,403.559337
89,273
pythondev
help
in the same shell?
2017-08-09T12:40:31.575902
Meg
pythondev_help_Meg_2017-08-09T12:40:31.575902
1,502,282,431.575902
89,274
pythondev
help
what code?
2017-08-09T12:40:32.576910
Meg
pythondev_help_Meg_2017-08-09T12:40:32.576910
1,502,282,432.57691
89,275
pythondev
help
p = subprocess.Popen([‘ping’,‘<http://XXX.XXX.XXX.XXX|XXX.XXX.XXX.XXX>’], stdout= subprocess.PIPE,stderr= subprocess.PIPE) out, error = p.communicate() print(out)
2017-08-09T12:40:42.582511
Ressie
pythondev_help_Ressie_2017-08-09T12:40:42.582511
1,502,282,442.582511
89,276
pythondev
help
the XXX is ip
2017-08-09T12:40:46.585217
Ressie
pythondev_help_Ressie_2017-08-09T12:40:46.585217
1,502,282,446.585217
89,277
pythondev
help
i just sanatized it
2017-08-09T12:40:51.588140
Ressie
pythondev_help_Ressie_2017-08-09T12:40:51.588140
1,502,282,451.58814
89,278
pythondev
help
i just get nothing big fat nothing printed to the console
2017-08-09T12:41:14.601656
Ressie
pythondev_help_Ressie_2017-08-09T12:41:14.601656
1,502,282,474.601656
89,279
pythondev
help
does `subprocess.check_output(same_command)` output something?
2017-08-09T12:41:45.619849
Suellen
pythondev_help_Suellen_2017-08-09T12:41:45.619849
1,502,282,505.619849
89,280
pythondev
help
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py”, line 618, in check_output raise ValueError(‘stdout argument not allowed, it will be overridden.‘) ValueError: stdout argument not allowed, it will be overridden.
2017-08-09T12:44:18.709667
Ressie
pythondev_help_Ressie_2017-08-09T12:44:18.709667
1,502,282,658.709667
89,281
pythondev
help
nono, without `stdout` and `stderr` and whatnot
2017-08-09T12:44:53.731069
Suellen
pythondev_help_Suellen_2017-08-09T12:44:53.731069
1,502,282,693.731069
89,282
pythondev
help
Traceback (most recent call last): File “/Users/stephenziehr/Downloads/ping.py”, line 7, in &lt;module&gt; p = subprocess.check_output([‘ping’,‘8.8.8.8’], stdout= subprocess.PIPE,stderr= subprocess.PIPE) File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py”, line 618, in check_output raise ValueError(‘stdout argument not allowed, it will be overridden.‘) ValueError: stdout argument not allowed, it will be overridden.
2017-08-09T12:44:54.731441
Ressie
pythondev_help_Ressie_2017-08-09T12:44:54.731441
1,502,282,694.731441
89,283
pythondev
help
actually, your first code works for me :confused:
2017-08-09T12:46:11.778365
Suellen
pythondev_help_Suellen_2017-08-09T12:46:11.778365
1,502,282,771.778365
89,284
pythondev
help
p = subprocess.Popen([‘ping’, ‘8.8.8.8’])
2017-08-09T12:46:12.778876
Orpha
pythondev_help_Orpha_2017-08-09T12:46:12.778876
1,502,282,772.778876
89,285
pythondev
help
could it be a OS X specific issue?
2017-08-09T12:46:25.786701
Suellen
pythondev_help_Suellen_2017-08-09T12:46:25.786701
1,502,282,785.786701
89,286
pythondev
help
yeah idk i have had subproc work just fine before
2017-08-09T12:46:39.795268
Ressie
pythondev_help_Ressie_2017-08-09T12:46:39.795268
1,502,282,799.795268
89,287
pythondev
help
I am trying to run a ping -R
2017-08-09T12:46:44.798261
Ressie
pythondev_help_Ressie_2017-08-09T12:46:44.798261
1,502,282,804.798261
89,288
pythondev
help
and pring out the results
2017-08-09T12:46:49.801050
Ressie
pythondev_help_Ressie_2017-08-09T12:46:49.801050
1,502,282,809.80105
89,289
pythondev
help
print
2017-08-09T12:46:54.804240
Ressie
pythondev_help_Ressie_2017-08-09T12:46:54.804240
1,502,282,814.80424
89,290
pythondev
help
what os are you using?
2017-08-09T12:47:16.817419
Antionette
pythondev_help_Antionette_2017-08-09T12:47:16.817419
1,502,282,836.817419
89,291
pythondev
help
OSX
2017-08-09T12:47:24.822064
Ressie
pythondev_help_Ressie_2017-08-09T12:47:24.822064
1,502,282,844.822064
89,292
pythondev
help
but the target for this is Linux at the end of the day i think
2017-08-09T12:47:34.827987
Ressie
pythondev_help_Ressie_2017-08-09T12:47:34.827987
1,502,282,854.827987
89,293
pythondev
help
might not have had -c 1 arg?
2017-08-09T12:48:28.859259
Antionette
pythondev_help_Antionette_2017-08-09T12:48:28.859259
1,502,282,908.859259
89,294
pythondev
help
in original code
2017-08-09T12:48:31.861246
Antionette
pythondev_help_Antionette_2017-08-09T12:48:31.861246
1,502,282,911.861246
89,295
pythondev
help
so it was timing out
2017-08-09T12:48:35.863337
Antionette
pythondev_help_Antionette_2017-08-09T12:48:35.863337
1,502,282,915.863337
89,296
pythondev
help
damn it
2017-08-09T12:48:41.867027
Suellen
pythondev_help_Suellen_2017-08-09T12:48:41.867027
1,502,282,921.867027
89,297
pythondev
help
yes!
2017-08-09T12:48:42.867987
Suellen
pythondev_help_Suellen_2017-08-09T12:48:42.867987
1,502,282,922.867987
89,298
pythondev
help
I haven't even thought about it
2017-08-09T12:48:55.875468
Suellen
pythondev_help_Suellen_2017-08-09T12:48:55.875468
1,502,282,935.875468
89,299
pythondev
help
very likely the cause, as `communicate()` waits for the EOF or process termination
2017-08-09T12:49:46.906637
Suellen
pythondev_help_Suellen_2017-08-09T12:49:46.906637
1,502,282,986.906637
89,300
pythondev
help
yeah i got traffic now but i did not get the route print
2017-08-09T12:53:21.034521
Ressie
pythondev_help_Ressie_2017-08-09T12:53:21.034521
1,502,283,201.034521
89,301
pythondev
help
is `-R` present?
2017-08-09T12:53:44.047884
Suellen
pythondev_help_Suellen_2017-08-09T12:53:44.047884
1,502,283,224.047884
89,302