Comments (8)
If you want to remove your own kernel startup and use one which IPython also uses in some places under the hood:
from IPython.kernel.multikernelmanager import MultiKernelManager
kernel_name = "python"
self.log.info("Starting a new kernel: %s" % kernel_name)
_km = MultiKernelManager(log=self.log, parent=self)
#_km.list_kernel_ids()
kernelid = _km.start_kernel(kernel_name=kernel_name)
kn = _km.get_kernel(kernelid)
kc = kn.client()
# now initalize the channels
kc.start_channels()
kc.wait_for_ready()
from rodeo.
what is self.log
in that code block?
I tested this out but it got the following error:
Traceback (most recent call last):
File "rodeo/rodeo.py", line 115, in <module>
main(directory)
File "rodeo/rodeo.py", line 96, in main
kernel = Kernel()
File "/Users/glamp/repos/yhat/prototypes/rodeo/rodeo/kernel.py", line 81, in __init__
self._kernel_manager = MultiKernelManager(parent=self)
File "/usr/local/lib/python2.7/site-packages/IPython/config/configurable.py", line 68, in __init__
kwargs['config'] = parent.config
AttributeError: 'Kernel' object has no attribute 'config'
Seems like I would still need the config file?
from rodeo.
self is in this case a LoggingConfigurable
, which has a logger
object at self.log
and a config
object as self.config
(the parent is needed to get config information from the parent to other classes and also access the main log). LoggingConfigurable
is quite nice, it gets you the traitlets, logs and the inheritable config and if you use IPython.config.application.Application
as the main class for your app you get comamand line handling and such things...
You can probably use it like _km = MultiKernelManager()
.
See here for the original code: https://github.com/JanSchulz/knitpy/blob/master/knitpy/knitpy.py#L639
from rodeo.
is there a way to run it without generating a config file?
from rodeo.
@glamp: _km = MultiKernelManager()
(without any parent/argument)?
Yes, a LoggingConfigurable
can be used without passing in a parent/config/log, e.g. you can use Knitpy().render(...)
directly without having a config object. The config object anyway does not depend on a file, you can build one yourself, if you want (the ipython config files are such a "builder").
from rodeo.
You can also use IPython.kernel.manager.start_new_kernel(....)
. That might be more appropriate as the UI only handles one kernel at a time.
from rodeo.
I got the error "failed to create process"(in win7) and:
Traceback (most recent call last):
File "rodeo.py", line 1, in
from .kernel import Kernel
SystemError: Parent module '' not loaded, cannot perform relative import
from rodeo.
I believe this works now
from rodeo.
Related Issues (20)
- why download rodeo so slowly
- Some Variables not showing up on the envoriment HOT 1
- Functions in global scope break the Environment viewer
- keras model fit with verbosity=1 print each line per second
- themes aren't global HOT 1
- WIndows installer doesnt ask for path but installs in C:
- Can't see themes in preferences HOT 1
- RuntimeError: dictionary changed size during iteration
- Download broken link on website HOT 8
- Rodeo Download pages are not working HOT 12
- please add the function of script autosave, or sometimes i will lost my script
- if you can add terminal of cmd like rstudio it could be better.
- environment can't update automaticly when i run the code
- code more than 500 lines, the hint and auto complete don't work.
- Does rodeo desktop support remote python interpreters?
- Can't see image
- A better alternative to Python IDE HOT 2
- Is the program abandoned?
- Rodeo installed from Github Releases: Says can't find python
- Rodeo IDE installed from Github Releases: Says can't find python HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rodeo.