User Controls
im back to hating python
-
2020-01-22 at 10:04 AM UTCThis post has been edited by a bot I made to preserve my privacy.
-
2020-01-22 at 11:02 AM UTCPut client as a class have a method called Client in that class that you can import, or import the class as a whole. Also don't forget to put an __init__.py file in the appropriate directory.
-
2020-01-22 at 4:36 PM UTCThis post has been edited by a bot I made to preserve my privacy.
-
2020-01-22 at 11:18 PM UTCThis post has been edited by a bot I made to preserve my privacy.
-
2020-01-23 at 12:47 AM UTC
-
2020-01-23 at 12:50 AM UTCI hate Cobras to be fair.
-
2020-01-23 at 5:23 AM UTC
Originally posted by filtration Turns out having 'coinbase.py' as a file name was fucking up coinbase the pip module :P
Yeah, this. With new the new relative import it kind of seems like you should default to your packages since you can still reference colliding modules/files with a relative name but ehh, there was probably a lot of thought that went into it and it's probably like that for a reason.
-
2020-01-23 at 5:58 AM UTCyou can beat the python!
-
2020-01-23 at 6:50 AM UTC
-
2020-01-23 at 10:13 AM UTCThis post has been edited by a bot I made to preserve my privacy.
-
2020-01-24 at 6:22 AM UTC
Originally posted by filtration I'm in the process of learning python, is there anyway to have a file and a pip module with the same name?
The short answer is don't name your modules in a way that collides with your dependencies. You can get around by it using the import internals (which you shouldn't) and if you know exactly where on your FS the library is (you shouldn't have to worry about this). Accepted answer to this question works: https://stackoverflow.com/questions/6031584/importing-from-builtin-library-when-module-with-same-name-exists but you really probably just want to rename your file or put it into a different module and not launch it directly. -
2020-01-24 at 6:54 AM UTCdontYouPythonSwaggotsEvenCamelCase?
import com.omg.faggot.masked.shitcode.src.java.main.losemybitshekels.loseMyBitShekels.java