« first day (2220 days earlier)   
00:00 - 16:0016:00 - 18:00

4:08 PM
@AndrasDeak even better:
>>> sequence = ''
>>> all(element is sequence for element in sequence)
True
>>> sequence in sequence
True
 
DSM
@vaultah: I was deliberately looking for a non-string..
 
:[
 
DSM
But it's still clever, I wouldn't have thought about the "is" part of that. :-)
 
eeesh. practiced what I had in my presentation. 20 minutes and I only touched the first component of our CI stack
time to really shorten my "intro"
didn't realize it was that long
woosh
 
just get raw content down. it's easier to shave off content once you know what components you need to keep for your central argument
 
4:13 PM
yeah. Maybe I should just keep throwing in that content and practicing, get it complete
and then trim
rather than going back now and trimming
 
yep. 40 minutes, 1 session is the type that you'll learn what you need based on feedback
 
yeah I'm planning on presenting to my team on Tuesday
Wednesday latest
 
Hello, I'm getting the error:   install_twisted_reactor
     from twisted.internet import _threadedselect
 ImportError: cannot import name '_threadedselect'           Using the twisted library, anyone know why? I can't find anything on it through google...
 
look inside the internet module of the twisted library and check that it exists
 
How would I go about that?
 
4:16 PM
what IDE are you using?
 
python is an interpreted language. open the file in any text editor.
 
pycharm
 
^^that or even simply look to the left in your project pane, and click through until you get to the twisted code
or even better yet. Use command-click (or if windows whatever equivalent) to navigate directly to the twisted code base
 
~~~i bet both of those approaches are just a click away~~~
 
4:19 PM
bold move cotton tristan, let's see if it plays off well.
 
So I looked through and can't seem to find it
_threadedselect ^^
 
well, there's your problem. your tutorial isn't meant for the version of twisted that you have, or is just wrong.
 
are you using a tutorial? If so, did you make sure you are actually matching the right versions (twisted is huge and has been around for a while)
 
i'd check the version of your twisted library and consult the official documentation.
 
Yep using a book
 
4:22 PM
Okay. Same approach.
 
This is all I can see: Twisted doesn't support Python 3 at the time of writing, so we'll assume that all the following Python code is intended to run on Python 2.7. It should be easy to port it to Python 3 eventually, as no deliberately incompatible design decisions are made. (On a related note, we'll also completely ignore Unicode-related issues, because resolving them properly depends on Python version
 
I'm not sure what you're asking now. You have a book that assumes Python 2, but you're using Python 3?
 
On the Twisted site it says: Twisted is an event-driven networking engine written in Python and licensed under the open source ​MIT license. Twisted runs on Python 2 and an ever growing subset also works with Python 3.
 
@Dominico909 A subset of twisted
 
I'm not sure if that means I need a different install or what. Couldn't find different instructions for Py3 on the site.
 
4:27 PM
@Dominico909 You're using Python 3 and using a book that assumes Python 2?
 
Yes
 
@Dominico909 dude....come on. 😀 The book is py2 and you're getting these issues trying to use py3. :)
 
You're all turned around. You need to make some decisions.
 
I don't think twisted is fully ready for python 2. I know that a lot of our twisted-based projects have not fully moved to py3
 
DSM
I know nothing about twisted, but it's at least possible it was an install failure and a c library wasn't built.
 
4:28 PM
If you pick Python 3, that book isn't helpful to you anymore. Don't ask us for help updating a book, unless you get the publisher to pay us.

If you stick with the book, use Python 2. Look for help using the official documentation to make sure you have the required components installed.
 
@Dominico909 set up a virtualenv in py2 and install twisted in that venv
 
@AndrasDeak: by the way, you can guess what the Gothdo's comment was by viewing the latest edit
It was quite harsh
 
Ugh, I hate it when people edit StackOverflow -> Stack Overflow.
 
@vaultah oh I had no idea there were revisions, thanks!
 
no problem :)
 
4:29 PM
REEEEEE there's a space in the brand name. How dare you type CocaCola and not Coca Cola REEEEEE
 
keep it REEEEEE
 
Ill switch to python 2 then and reinstall
 
@vaultah How are they even able to edit the nomination? I can't. I click the edit and the submit never works for me.
 
That sounds more helpful to your case [ :
 
> Hi Gothdo, thank you for calling me out on that. It's an honest mistake that I won't be making again.
 
4:30 PM
@Dominico909 Spend some time trying to get us to work before asking more questions about a book that we won't have on hand and for which we don't know the context.
 
if that's seriously a response to "missing a space in Stack Overflow", I really don't know what to think
 
@tristan What do you mean? Do you want a link to the book and the page number?
 
people trumping each other on the mod nomination page...
 
@Dominico909 God no.
If you have a book and you followed the instructions and it doesn't work, burn the book for heat.
 
yeah, you'd have to give the edition of the book as well, page numbers are prone to changing
@BhargavRao it's a new nomination, you could edit it too at first
it probably gets locked after n hours
 
4:33 PM
Well I can do that if anyone is interested but at this point ill go burn the book for heat
 
Hi, new in Python
when i print a object it is printing like
<Campaign> {
"id": "6041040141472"
}
how i can get id from this ?
 
@Dominico909 It seems that Twisted only works on Python 2.7. That's what is clearly printed on their download page. If you got your hopes up on the mention of "subset working on Python 3", it seems that it's only mentioned on that paragraph and nowhere* else.
 
@AndrasDeak I could edit it only when it had no comments. :/
 
@BhargavRao hmm....
 
@Dominico909 If you are trying to get things going on an officially unsupported version of Python, you should check to see what the authors are actually doing to make this happen => twistedmatrix.com/trac/wiki/Plan/Python3
 
4:34 PM
@AkashKumar I bet my_object.id would work.
 
OK, it's official. The election's rigged. The nomination page is clearly a disaster for SOcracy.
2
 
@AkashKumar What's the statement you're executing that's giving you back that string? print(obj) ?
 
would it help more to show screenshots of the UI of the application I am talking about in my presentation, or a large flow diagram that I can talk about the different features, in a single slide
 
@AkashKumar what vaultah suggested may work.
 
Alright thanks for your help guys. Time to go remove a lot of parentheses from print statements
 
4:36 PM
@Dominico909 stackoverflow.com/questions/32032697/… you can leave it
 
that ^
 
Sad to hear you do that, but you gotta do what you gotta do. Statement your prints away
 
@Jovito
code is:
_object = AdAccount('act_%s' % ad_account_id)
for var_campaign in _object.get_campaigns():
print(var_campaign)
 
@tristan OOh fancy thanks
 
@Dominico909 no worries. if you're just looking to learn more about python and async and want to use python 3, there are other options
 
4:37 PM
it didn't work
AttributeError: 'Campaign' object has no attribute 'id'
 
@AkashKumar Isn't the id you're looking for ad_account_id?
 
@AkashKumar was worth a try:P
 
rbrb
 
rbrb
 
been up for a couple hours and i'm still on SO. i think it's time to stop pretending and just play video games instead of procrastinating here
 
4:38 PM
when i print a whole object
[<Campaign> {
"id": "6055812746472"
}, <Campaign> {
"id": "6055586655072"
}, <Campaign> {
"id": "6053524968272"
}, <Campaign> {
"id": "6053013273872"
 
if you're feeling adventurous, dir(obj) will tell you the available methods and attributes of obj
@tristan have fun if you do:)
 
thanks :)
 
later @tristan
 
laters :)
 
Cya tris, Take care
@AkashKumar try str(object).
 
4:40 PM
@AndrasDeak Regarding your comment on Samuel Liew's nomination: in my comment I was complaining that he wrote "StackOverflow" instead of "Stack Overflow". He edited his nomination and fixed that, so I deleted my comment.
 
<Campaign> {
"id": "6016475214272"
}
 
@Gothdo I see, thanks for the info
I'm not sure mucking up the discussion on the nomination page is constructive, though
 
@AkashKumar From where are you getting this Campaign object?
 
leaving aside the importance of the typography of SO:P
 
@BhargavRao I was about to ask that.
 
4:42 PM
i'm using Facebook Ads API
from facebookads.adobjects.campaign import Campaign
 
I think it's actually called AdAccount.
 
campaign = objects.Campaign(parent_id = my_account.get_id_assured())
@AkashKumar Are you the one instantiating Campaign objects?
 
i'm trying to get all campaigns
code:
_object = AdAccount('act_%s' % ad_account_id)
for var_campaign in _object.get_campaigns():
print(var_campaign)
i don't know to convert return data into JSON or Hash
 
4:45 PM
@AkashKumar what does dir(var_campaign) say?
 
(examples have stuff like Campaign.Field.name)
 
@Jovito
https://gist.github.com/AkashkumarDev/90c63f3897270855259f14a2272cc9e4
 
Try Campaign.Field.id
 
(that's ^ what I meant)
 
or Campaign.get('id')
 
4:48 PM
well, except your object instead of Campaign which is the class
 
or Campaign.get_id().
 
no no no I've got it
 
works !

_object = AdAccount('act_%s' % ad_account_id)
for var_campaign in _object.get_campaigns():
print(var_campaign[Campaign.Field.id])
 
that ^
:)
 
thanks :)
 
4:48 PM
Say Thanks to Andras ;)
 
:)
 
@AndrasDeak thanks ;)
 
haha, no worries:D
I like guessing in subjects I don't know anything about
 
5:11 PM
rhubarb for now
 
bye Andras
 
Cya
 
00:00 - 16:0016:00 - 18:00

« first day (2220 days earlier)