These are chat archives for spyder-ide/public

26th
Sep 2018
Victor Maryama
@Sup3rGeo
Sep 26 2018 16:52
Hi! Is it currently possible to integrate the spyder widgets (e.g. editor) in a custom pyqt5 application? I was looking at the code, but I thought about asking here to maybe get some pointers on that. Thanks!
Carlos Cordoba
@ccordoba12
Sep 26 2018 16:58
It should be possible but you need to use our config system too because most of our widgets are tightly coupled to that system
Victor Maryama
@Sup3rGeo
Sep 26 2018 17:02
@ccordoba12 thanks! Is this the part I have to "emulate" in my app to create a instance configured of the CodeEditor widget to add to my app? https://github.com/spyder-ide/spyder/blob/8a616b1f94915db817ebd1f3583c8a5d9ff443ef/spyder/plugins/editor/widgets/editor.py#L2266
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 17:15
@Sup3rGeo I assume means our configuration system, i.e. the stuff under the config directory, that you can see imported on lines 32-35 and 55, and used hundreds of places throughout the file, involving getting user preferences, environment variables, runtime parameters ,etc . But don't take my word for it; I'm the new guy haha.
Carlos Cordoba
@ccordoba12
Sep 26 2018 17:18
@Sup3rGeo, what I meant is what @CAM-Gerlach said
gnutrol
@gnutrol
Sep 26 2018 20:18
so why were ya'll so tied to using anaconda for spyder?
like i installed it using pip and it works fine
like what's wrong with an executable app, or container?
just seems like tethering it to anaconda is just creating an extra layer people have to go through to start using the product
Carlos Cordoba
@ccordoba12
Sep 26 2018 20:41
@gnutrol, because you can break quite easily your installation with pip. That's not so much the case with pip 10+ but it's still problematic
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:44
Spyder is developed by volunteers and the community, so we have limited resources to help people with their individual install problems with pip. Nevertheless, we still fully test it with pip and fix any bugs on our end that arise, and IIRC many of our main developers run it with pip themselves. We just aren't able to provide specific individual "customer support" so to speak since we get an enormous volume of help requests as it is.
gnutrol
@gnutrol
Sep 26 2018 20:45
ok; that's fair. i mean, im very grateful you did all the work to make it pip-ready, i'm really enjoying using spyder a lot
but why not make it an executable app, like with pyCharm or RStudio?
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:47

like what's wrong with an executable app, or container?

We used to offer this, but it was a large amount of work to maintain and many/most scientific Python users were already using Anaconda (or another distribution focused around Spyder, like WinPython) already, so it was much less overhead in those cases. There is also the whole Qt aspect, since we abstract everything through our QtPy shim that allows the user to pick their own Qt backend (although currently PyQt5 is the primary one supported). With the removal of the open source exception in PyQt5, we could be in hot water if we distributed it with Spyder since its GPL and Spyder is MIT.

gnutrol
@gnutrol
Sep 26 2018 20:48
ahh
ok, that makes sense
thanks for answering!
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:49
Also, Rstudio and PyCharm are both commercial projects and are under the GPL, and are not written in Python and directly based on the whole PyData stack like Spyder is so its a quite different situation.
Vs. Spyder is 100% written in, by and for the Scientific Python community, supported through various grants, institutional channels, company time and (in large part) contributions of ordinary users
gnutrol
@gnutrol
Sep 26 2018 20:51
mhm; it's definitely beneficial to have an alternative to pycharm and other IDE's, and so far spyder's crushing it
sorry if im bothering ya'll with all these questions, just curious: do you think you can get a lot of the useful features of spyder (e.g., the variable explorer) without needing it to be built on top of a specific python build?
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:53
That's what this is for, plying us with questions! :)
We officially support Python 2.7 and 3.4-3.7 , so any of those versions + the core dependencies should work, though I'm not exactly sure what you're asking?
gnutrol
@gnutrol
Sep 26 2018 20:55
for example, i can run code from various different python builds I have (or builds of any language) in sublime, by just specifying the build in a settings file
is spyder restricted to the python environment i installed it in?
i guess more specifically, i have a few python environments strictly for hosting websites, and others for doing things like plotting or animations. am i able to run a script from the editor in a different python environment than the one i installed spyder in?
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:57
Yes, you can! With the changes in Spyder 3.3.0 and 3.3.1, and further improvements (graphical environment and package management, environments linked to projects, etc) in Spyder 4, you can use any Python environment (virtualenv/conda env) on your system, including an entirely different Python install from the one Spyder's on, and you can even connect to existing kernels or seamlessly work with one on a remote machine connected via SSH with full support for the Variable Explorer, completion, etc.
gnutrol
@gnutrol
Sep 26 2018 20:58
wow, nice; that's a pretty big game changer than
thanks for all the help; solid work on the spyder project, really enjoying using it
CAM Gerlach
@CAM-Gerlach
Sep 26 2018 20:59

it's definitely beneficial to have an alternative to pycharm and other IDE's, and so far spyder's crushing it

Great to hear! Spyder 4 should be even more so in terms of making major improvements to the key areas heavyweight IDEs like PyCharm currently have an advantage in, particularly in a brand-new debugger, an overhauled completion/introspection architecture to be the same one used by Atom and VSCode, better project and environment management, refactoring and project templates, and numerous improvements to the editor and its features (which are already implemented in the released Spyder 4 beta 1).

@gnutrol Here's a guide we wrote on using multiple environments with Spyder
Thanks for all the kind words :) Its users like you that really keep us going.