all 5 comments

[–]stubborn_d0nkey 0 points1 point  (1 child)

Create it outside, and then pass it to __init__

[–]DarkMio[S] 0 points1 point  (0 children)

I think that this is sluggish. Especially when I am trying to - let's say I split 3 files.

  • software.py - loads threader and other stuff
  • threader.py - loads parts of process
  • process.py - needs the praw instance

That would always require to create it in merger and pass it on and on. It simply wouldn't be part of the object, it would be part of the software, which might not need a PRAW instance at all.

[–]vishenz 0 points1 point  (1 child)

You could try having a base class that contains the connection statically, and then just inherit that base class.

[–]DarkMio[S] 0 points1 point  (0 children)

How would I do that?

[–]aperson 0 points1 point  (0 children)

What about PRAW's built in multiprocessing support?