« first day (897 days earlier)      last day (4067 days later) » 
09:00 - 20:0020:00 - 00:00

9:24 AM
morning
 
 
2 hours later…
11:17 AM
any one here?
 
11:49 AM
Yeah, @udaysagar
 
hey, thanks for being online
 
Just got back :)
 
class Story(object):
def __init__(self, uid):
self.uid = uid



def getuid(self):
print self.uid
why this is raising this error:
bound method Story.getuid of <Story object at 0x01ECA410
any idea
 
Seems like in the rest of your code, you have written
 
i have created an object to story
 
11:52 AM
print story.getuid
 
and calling getuid
 
instead of print story.getuid()
The method doesn't get invoked but rather the method's description is printed, try using the parentheses to actually call the method
 
k
thanks Jos
its working\
but, its printing extra "None"
to the end
@JosKraaijeveld
there?
 
Hrm
Can you paste the rest as well?
Oh, you're printing in getuid(), not returning anything
So try switching the print in your method to a return
 
oh, okay!
That Worked perfectly!
Thanks Jos!
 
12:09 PM
No problem!
 
12:48 PM
Jos, can we write the logic in the class itself?
instead of writing in the def
 
1:10 PM
I'm not quite sure what you mean
 
1:24 PM
new one-
i have two variables
a = 'hello jos, how are you?'
b = 'how'
if i give-
if b in a:
print True
its printing True
but if i give b = 'ho'
instead of 'how'
i want the code not to print True
But its printing True
what can i do, to print only whole words not parts...
?
 
2:17 PM
Well @udaysagar
'ho'
is still in a
Just not how.
Can you perhaps
explain what you want the code to do?
Because it appears you want it to print "True" if the string your defining is in the variable 'a'. And it is. But if you shorten b by one letter, that doesn't change the fact that those two letters are indeed in a.
So what you really want is:
Oh..he left.
if b in a:
print True
else: (enter key) print False
 
3:04 PM
:)
 
 
1 hour later…
pen
4:19 PM
Hai guise.
 
4:43 PM
haaaai
 
 
1 hour later…
5:54 PM
So how is everybody ?:)
 
I good.
And, are you good you good sir @jack?
 
Yah it's allright putting up with my dad's religous things on easter
 
Are you that young?
Why not run away? Is it worth it?
 
19
Went home from uni
for easter
 
oh, sometimes it sux to be young
 
5:57 PM
Where are you from?
 
South Africa, the rainbow nation :)
 
Thats cool i went there for 6 weeks to work on a game reserve
 
which one?
 
kwa madwala
 
never heard of it (but then again, there's much I don't know about this place)
did you find the ppl friendly than you are used to?
 
6:00 PM
Definitely a eye opener, very different from here in the UK
 
I hear ppl are cold(er) there.
so sad
 
It comes with the temperature lol
 
:)
do you have a blog?
 
Haha no sorry
 
why apologise?
 
6:02 PM
IT's what we english do !
 
anyways, I got a blog with over 600 posts
let's say 500 of them fall under the movies category
 
Nice man, you get alot of viewers?
 
rest is all else I feel like writing about
not many viewers I'm afraid
other stuff is computing-related, even some political stuff here and there
some theatre, music, ...
you think it's a good idea to just break this apart... have a separate movies blog
given it has so much content compared to the rest?
 
I suppose, what blog website do you use, is it possible to have two separate blogs under one url, or maybe you want to complete different url's for each blog
 
I use github pages
am planning to create movies.tshepang.net, and leave tshepang.net for all else
 
6:08 PM
If your doing your own then yes i would say just have a moves.tsgepang.net and then possible a life.tsgepang.net
 
I used to have a setup where I had movies.tshepang.net and arts.tshepang.net and computing.tshepang.net.
kinda messy
then consolidated all under tshepang.net
simple
 
gauteng province.
Same
 
yes
 
Not too messy if you get a nice interface
 
what you mean by 'Same'?
 
6:11 PM
Same province
 
@Xeon oh, sorry; thought I was talking to @jack
 
Tshepanf you made the python chat room? pretty cool,
 
:)
 
You mean you stay in Gauteng @Xeon?
 
Yes.
 
6:12 PM
@jack not at all
 
Oh on your profile it says owner of
 
I am just one of the regulars, who also happens to be one of the 'room owners'
 
kk
 
@Xeon interesting; where?
 
Pretoria
 
6:13 PM
@jack warning... bad joke: you are missing a 'k'
 
tsssshhhh
 
@Xeon I got a flat there. Used to stay there for years.
 
haha
 
Ah.
 
I was even schooled at TUT
 
6:14 PM
Your webpage loaded pretty fast, hosted here?
 
github Pages
it's statically-generated
 
0o
 
I don't know what that is.
But
It sounds cool.
If you do any online gaming, you may know me as Owatch.
 
@Xeon what?
 
6:16 PM
^ (I mean I don't know what statically generated is)
 
You play Dayz?
 
I do.
 
I think i found your steam prfile
 
oh, the explanation is on the link I posted above: tshepang.net/what-me-loves-about-static-website-generation
 
6:18 PM
^ Yep.
@Tshepang So, do you still have to purchase the domain?
 
@Xeon I don't do much gaming; when I do though, I don't wanna stop (stuff is addictive)
@Xeon I bought tshepang.net several months ago
 
it's crazy how quickly league of legends is growing though isn't it
 
@Tshepang Oh. I was also thinking of buying my own domain
 
but am not sure what you mean
 
But then I thought about it, and realized I had no use for it.
 
6:19 PM
@Xeon why though
 
I haven't done anything notable.
@jack My friends pursaded me to start playing
 
@Xeon I hesitated for a long time, but it was not a smart move for me... I've moved through various blogging services, and each time, my links got broken.
 
@jack I guess I'm not hooked yet.
 
@Xeon ouch; self-deprecating aren't you
:)
 
@Tshepang No point paying a subscription for a domain you would probably be the only one visiting.
 
6:22 PM
for sure
 
Of course, I've had a lot of big dreams of doing stuff. But I realize they are sort of far fetched now.
 
but if ever you start a blog, do buy one soon after
@Xeon if you start a blog, make that your first post :)
in fact I wanna see the stuff u were thinking of
 
@Tshepang I guess I'm not much for blogging.
 
the crazy stuff :)
what
but Jeff wants you to
Jeff Atwood
 
def Jeff():
Who is Jeff
?
 
6:25 PM
founder of Stack Overflow
sorry, I thought he did not need an intro
 
@Tshepang I'm new here, sorry.
:D \
 
wow, 38 days hey
damn!
my rep may not show, but I been around almost 3 years now
 
Yeah. Learning Python got a little tough just doing internet searches.
Thought I should join a forum.
 
how do you like it so far?
 
It's fun.
I want to learn more.
Except I feel like I'm cheating being here.
Geting answers, and not really learning.
 
6:28 PM
why
sometimes you want a quick answer, and sometimes you are stuck
 
I need a good book to learn. And I have one, (short one for making games lol) in python. Except I can never get myself to read it.
 
don't feel guilty
 
@Xeon exact same you at uni?
 
lazy hey
 
Not yet.
lol
@Tshepang Unfortunately. Maybe I'll force myself tonight.
 
6:30 PM
@Xeon may I recommend Think Python
 
No not lazy, interent searches are okay, but SO, not only answer's the question but gives better alternatives
 
(I promised myself I'd read it before allowing myself to buy more)
 
Found that on Amazon
 
6:30 PM
yes
 
Was one of, or a similar version. In my basket
*cart
@Tshepang so.
I was going to say something about Seacom, but I forgot.
 
so @jack, what should my movie blog name be?
@Xeon ok
 
@Tshepang Oh yeah, are you on Mweb?
 
man i suck at creative names lol i use variable names 'z''x''c'!
 
@Xeon am using Cell C R1800 package
 
6:35 PM
0ooooo
Sounds fancy
If it's what I think it is.
 
cheapest mobile broadband you can get in SA
 
(Like a subscription rate for ADSL?)
 
200GB worth
 
Oh
:/
 
expires after 12 months
 
6:36 PM
Thought it was an ADSL monthly cost.
Which would be pretty sick.
 
I wish I was that rich :)
it's worth it cellc.co.za/giganite, at least for me
 
Your a Python programmer. One of the best I know in the chat. How can you not get paid a lot?
 
@jack you think "Tshepang at the movies" is too lame?
 
@Tshepang It's awkward.
You need
 
it's a bit Cliché.
But it could work
 
6:38 PM
Tshepang's Media
 
@Xeon nice
 
@jack thanks
 
the whole blog would be only about movies
"Media" is too general
 
@0oh
 
I can make it boring, like "Tshepang & movies"
 
6:40 PM
@Tshepang I like to learn by making programs, do either of those two books do that sort of thing?
 
@jack most especially Think Python, but yeah, both do
 
Wait, are you blogging about movies in a casual sense? Or actually almost reviewing them ?
 
Think Python is written really as a teaching book, so there so so many exercises there
@Xeon I write a post on almost every movie I watch
that's why there's well over 500 of them
 
Any new good movies come out recently?
 
I also do yearly reviews.
 
6:43 PM
@Tshepang Yes. But is it like a serious critique, or not?
 
Man, those (yearly reviews) take forever to compose. But can be fun.
 
Then you need a more serious name.
 
@Xeon oh, if you are asking if I'm a pro, not this is just a hobby
 
@Tshepang Oh.
@Jack I heard that Olympus has Fallen is alright.
 
my reviews are quite short normally... 2 or 3 paragraphs
@jack a recent release that I really enjoyed is Django 1.5
oh sorry, I mean Django Unchained :)
 
6:45 PM
@Xeon Any ones out in online stores? I'm not near any movie theaters here in scotland :(
@Tshepang Seen it, thought it was good
Very interesting history for the USA
 
@Jack Oh. Well. In certain 'online stores'. There is.
Thanks Steam!
Want to upload a newer profile pic
I have a jpeg, and a png version
Error on both attempts: "Image must be a .jpg or .png"
*-*/
Anyone have time to help explain something in python to me? :D
 
Shoot
 
Alright. So what I've got is a tkinter window that collects user input from a bunch of different input boxes. Then, when the user hits a button, it's supposed to over-write a text file in a certain way.
What I need it to do. Is simple print the first letter (That I tell it to) in the first line of the text file, followed by a space, then the user input.
It will keep doing this for each input box: print a letter in "column" 1, a space, the user input's letter., next line-repeat
 
I should say I won't be much help as a starter to python, but i'm sure someone will know, they allways do usually :)
 
not me, sorry
 
6:52 PM
Okay.
 
don't be afraid of asking on the main site
 
Martijn Pieters is usually the guy to ask when he is on
or kevin
or um
there's a few i should credit :P
 
Maybe I'll put up a post
I just don't want to get a barrage of re-post comments
And then get voted off.
 
@Xeon please, do not be scared from asking
so what if you get down-voted?
 
Then I get banned from asking anymore
Happened before.
 
6:55 PM
People in python are normally chill if you give the right rep in return
 
you need just learn and listen to the advice, if ever someone actually explains why your post is bad
 
@Xeon Here?
 
@jack Yep.
 
@Xeon to you?
 
Which board python?
 
6:56 PM
only blatant abusers get banned, but I doubt you are one of them
 
The problem is you have to get rep to be unbanned
And when you know nothing, you can't.
 
@Xeon you don't have to know anything
look at me
 
@Tshepang I'm pretty sure you know a lot.
 
I got lots of rep just by fixing other's posts
 
You've been helping me a lot before with stuff, I remember
 
6:58 PM
@Xeon am glad; thanks
 
@Tshepang I allready love think python, the way they explain is awesome
 
@jack yeah, the guy is a real good teacher
I found some of his exercises hard though (puny brain!)
 
brb
 
@Tshepang What sort of projects do you do in python?
I'm just sort of curious as to what people in general around here do
 
7:14 PM
@Xeon Scripting + Teaching
 
@jozefg Ah. What do you mean by scripting?
 
my most effort is being maintainer/developer of wajig: code.google.com/p/wajig
 
Doesn't that mean like writing a program, which one could also confuse for a script. (Because I can't tell the difference)
I think a script is like a shorter piece of code than a program
 
had a disconnection there, sorry
 
@Tshepang Thanks
 
7:15 PM
Example: I work on a maven project at my lab with several modules (means several config files) and I wrote a program to find and search those files with a regular expression and display results
 
currently though, I help a lot with Pyramid documentation: pyramid.readthedocs.org/en/master
 
@jozefg I see.
 
Its like 14 lines of python I could write in Java/C++/what have you buts its nice in python. (or haskell actually)
 
@Tshepang Thanks for that too.
 
well, the word "script" is often contested
but I, like you, I do take a script to mean a short program
 
7:17 PM
Oh.
Yeah, agree @Tshepang For me, a script is far more specific in objective, and use.
 
I have several, a few of which are public: bitbucket.org/tshepang/scripts
 
Like, it's less polished, but it gets what you want done.
 
a script is normally something written quickly, and often useful for just one task
throwaway
 
@Tshepang Yeah.
 
Im slowly in the proecess of moving my perl scripts to python..
 
7:20 PM
Brb, going to get some food.
 
@jozefg nice; Perl may rock in many ways, but man, the syntax!
 
For me its the global state... i feel like crying a little bit with $1 $2 and $` etc... The functional programmer in my curls up and dies a little
Plus python has whitespace and its kinda cute :)
 
I haven't done much of it, but there was one time I tried clean/factorise some super-ugly Perl code and... not good
one of CPython core devs made a nice presentation on some of the reasons why Python rocks: pyvideo.org/video/1669/keynote-3
watching that video made me appreciate the language even more than I already do
 
I know what you mean.. and cool! do you work in any other languages besides python?
 
at work, I do a lot of C/C++
am not so good at it, and C++ is so hard!
but I do get work done
we do some embedded work, and we need the speed
 
7:26 PM
Ah I've been doing C++ for a while.. If you haven't read effective C++ you should
and yep that's usually the story I hear for C++
not so much legacy code nowadays it seems
 
thanks for the recommendation
 
Back
I wanted to ask
While you may not buy a domain name
Is it still possible to set up a sort of 'web page'
based solely off your ip
Of course, it would be ineffective. But I thought it would be possible
 
interesting Q; I have no idea
 
because as far as I know
Domain names are intended to simply ip addresses
So..
 
Hi @Angel
 
7:32 PM
hi
I have a question to solve my problem
 
whats new and exciting?
 
Nothing exciting just facing the problem
@Tshepang
 
@Angel wsup
 
@Tshepang just fine !! you tell
 
you tell?
 
7:39 PM
@Tshepang i post the link above of my problem can you please help me out for it
http://stackoverflow.com/questions/15718591/how-to-enhance-my-dataset-output-using-python/15719025?noredirect=1#15719025
 
lol
 
lemme look
 
1 important update for windows 7
internet explorer 10
no thanks nice try though
 
@Tshepang okay
 
question not so clear
what is "orthodb_id"
 
7:44 PM
@Tshepang What you want to know
orthodb_id is the name of the column
 
oh I see
It's also not clear what sort of output you want.
is it output.txt or the text at the end of the post
 
@Tshepang its the text at the end of the post , i mentioned it as require output
 
aarrggh noo
my computer ahs started to do that thing where it sutters when playing media
every so often
 
@Angel your handle on English is a problem
shouldn't that be "required"?
 
@Tshepang output.txt is the output which i getting with my code , and required output is the output which i want
 
7:48 PM
I see
 
@Tshepang Yes , English is not my mother language
 
can you edit your post with that clarification
@Angel me too
but we need to be better at it, else... we struggle
 
@Tshepang yeah i try to be
 
anyways, it appears you are using text format I is not familiar with, so someone else will have to help you
@Angel kool
 
@Tshepang Okay thanks
 
7:52 PM
for example, I was about to ask what all those ">" are for
@Angel what's wrong with the answer given?
 
@Tshepang its '>' for nothing , its just show that the next sentence is now start , you can take it as number
@Tshepang Given answer is the parsing , i know about the parsing , but i am so close to the output with my code
 
oh, I see
 
09:00 - 20:0020:00 - 00:00

« first day (897 days earlier)      last day (4067 days later) »