Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Not really the best way but here's an idea. You'll have to save the path of the config file somewhere. </p> <p>You could even save the path of the config file inside the config file... </p> <p>something like that:</p> <pre><code>config_file=%(here)s/development.ini </code></pre> <p>When this file will be loaded there will be an entry for it in <code>config.registry.settings</code>. From there you have two choices. You either write a file just like <code>pid</code> does with its <code>pid</code> but with your current setting file. Or you can create an api call to query the setting from the live application. to be honest, i'd write it in a file. Querying the setting from the app seems not so good. </p> <p>Then you'd have to open that file and read the path to the file.ini and then load it as a config file. </p> <p>Or you can try something like that:</p> <pre><code>ps -ax | egrep "`cat pyramid.pid`.*[s]tart" | cut -d" " -f14 </code></pre> <p>While running from python you could omit "cut" and cut it yourself from python to get the config ini file.</p> <p>in other words, you're getting the command line used for the pid contained inside pyramid.pid this file will only be created when in daemon mode. When you have the command line, you can get the config file an so on... The downside is that it will only work with pserve or anything that actually save the PID and use the config as argument. if you're using uWSGI and such, it might not be possible to do something like that. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload