These are chat archives for openworm/ChannelWorm

20th
Jun 2015
Chee Wai Lee
@cheelee
Jun 20 2015 14:50
A newbie question to anyone who happens to know - I'm trying to figure out why cprofile.py does not exist in the python 2.7 packages of both the native Mac OS X Yosemite development environment, and the homebrew package. All my attempts to search the web have garnered no hints why this might be so - everyone just says "python -m cprofile -o <out> <ourcode>.py" should work. On my installation this just results in a no module found error, with a similar result if I went into interpreter mode and typed "import cprofile" ("import profile" works however.) If nobody knows, I'll set up a VirtualBox Ubuntu environment to see if this is happening only to Macs. Thanks!
Joe Bowen
@joebowen
Jun 20 2015 14:51
try "import cProfile"... I think that's the issue
Chee Wai Lee
@cheelee
Jun 20 2015 14:51
I tried that in the interpreter. Same error.
There's supposed to be a cprofile.py file somewhere, but I cannot find it.
It wasn't even in the git repository mirror for Python 2.7, so that was kinda weird.
Chee Wai Lee
@cheelee
Jun 20 2015 14:54
Thanks. I'll see if I can just take that file and plug it into the lib folder
Joe Bowen
@joebowen
Jun 20 2015 14:54
python is case sensitive, so make sure you're looking for cProfile and not cprofile.
Chee Wai Lee
@cheelee
Jun 20 2015 14:55
hmmm that may have been it, let me try again. Thanks!
omg ... I'm a dunce.
it had been working all along.
Joe Bowen
@joebowen
Jun 20 2015 14:55
lol, it happens to all of us... :-)
Chee Wai Lee
@cheelee
Jun 20 2015 14:56
lol thanks again! I had spent hours wondering why nobody else on the internet seemed to know ... it just felt weird.
Joe Bowen
@joebowen
Jun 20 2015 14:57
the joys of programming... where the change of a capital letter can ruin your day :-P
when I used to work in C, the same was true of semicolons...
Chee Wai Lee
@cheelee
Jun 20 2015 14:58
yup, I've fallen into those traps before where a missing semicolon got me messed up for a long time.
Being mildly dyslexic did not help
well in this case it hurt.
Well lesson learned! If something is "not found" I have one more candidate to eliminate before I go trawling the internet!
Joe Bowen
@joebowen
Jun 20 2015 15:02
lol. Well, if you have any more python questions, feel free to ask. We have a few people here who really know python.
Chee Wai Lee
@cheelee
Jun 20 2015 15:02
Awesome, thanks!
I've always only ever modified other people's python code, and only ever as "glue code."
Joe Bowen
@joebowen
Jun 20 2015 15:05
Always a good place to start. My uncle always calls it "code liberation" and I've come to realize it's the not-so-secret secret of the industry.
Chee Wai Lee
@cheelee
Jun 20 2015 15:06
lol :)
Gonna cut out for a bit, and then be back. Am deliberately draining the battery of this new laptop to 0.
Joe Bowen
@joebowen
Jun 20 2015 15:07
later. I'm gonna get back to working on some other things.
Chee Wai Lee
@cheelee
Jun 20 2015 15:07
later!