Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Jun 20, 2017 11:04
Ok, thanks for the input.
Jun 20, 2017 11:01
are there any guidelines for repr?
Jun 20, 2017 11:00
I was more thinking if the output was used somewhere else, it might be better to keep stuff on a single line.
Jun 20, 2017 10:59
Ok, I guess that is up in the air then :)
Jun 20, 2017 10:53
Hi guys, I was wondering if there are any Python guidelines on how to write str. Is it good style to keep things on a single line or?
Feb 15, 2017 13:11
@PM2Ring that worked thanks
Feb 15, 2017 12:51
Hi I'm have a tool (not written by me) that uses pickle to dump os.environ. It works on python 2.7 but fails under python3. Reproduce:

```
import os
import sys
import pickle
pickle.dump(os.environ, sys.stdout)
```
Python3 error:
```
AttributeError: Can't pickle local object '_createenviron.<locals>.decode'
```

Any ideas?
Nov 22, 2016 09:41
The tool is not mine.. I'm just extending it. When I build the tool it makes itself stand-alone.. By copying all dependencies into it's own folder structure
Nov 22, 2016 09:39
Yes, so I have my source in src/lib1/lib1.py but when the tool builds itself (basically) it copies it to another location - it is like a plug-in I'm making.
Nov 22, 2016 09:28
He he, ok that bad?
Nov 22, 2016 09:28
Yeah, that's not within my control :)
Nov 22, 2016 09:27
The tool copies my folder lib1/lib1.py into it's own folder structure.. that is why - when I run the tool I have to import from that toollib/extras thing
Nov 22, 2016 09:26
Ok :) tell me - where did I go wrong?
Nov 22, 2016 09:22
Hi guys, I've got a problem. I'm using a tool that will take my src/lib1/lib1.py and make it available under import toollib.extras.lib1.lib1. This gives me problems in my unit-tests since I have some code that does the import toollib.extras.lib1.lib1, but that is not really where it is when running the stand-alone unti-test. So my question is: Is there a good way to make it such the toollib.extras part point to my src folder when unit-testing. Hope there is enough context :)
 

HTML / CSS / WebDesign

This room is now defunct. RIP.
Apr 26, 2015 21:05
ok, interesting
Apr 26, 2015 21:01
Ok, thanks
Apr 26, 2015 21:01
Lets say something like:

.highlight,.highlight-ipynb { .err { border:1px solid red}}

But I guess that is not legal?
Apr 26, 2015 20:58
ok, but I need to repeat the .err twice
Apr 26, 2015 20:57
Hi guys I have a question about CSS:

´´´
.highlight .err,.highlight-ipynb .err {
border:1px solid #FF0000;
}
´´´
Can this be written in a more compact way
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Sep 23, 2014 12:12
@sehe ok that's interesting
Sep 23, 2014 12:09
Yes, guess I could use a lambda. I was just surprised that binding make_shared didn't work
Sep 23, 2014 12:05
Hi guys, I'm trying to std::bind to std::make_shared for a non default constructable object .. and I having some problems any ideas: ideone.com/Ss4uvB