82150

Genshi - how to print out all variables in scope

Quite simply I'd like to print out all variables that are in scope in my genshi template, as a debugging and discovery measure. Is there a way to do it?

Answer1:

The standard Python function locals() (which returns a dict) works for me. I'm using Genshi 0.5.1, and as you'll see, everything seems to be in __data__.

${repr(locals())}

Recommend

  • oauth2client.client.AccessTokenRefreshError: invalid_grant Only in Docker
  • accessing audio files from Google Cloud Storage when using Google Speech
  • GAE Cloud Endpoints API Explorer stopped working
  • WOPI Host not called
  • Way to represent unknown file size in FTP LIST?
  • pthread_create memory leak
  • Overflow: hidden but i still want to have the empty scrollbar
  • Time taken for Hadoop job to execute
  • Using an enum contained in a Cloud Endpoint model on a Android client
  • Java Garbage collection, setting reference to null
  • rapply over a nested list in R
  • Powershell Hash Table to HTML
  • Randomizing -and remembering that randomisation- multiple choice questions in php
  • Spring integration inbound-gateway Fire an event when queue is empty
  • How do I retrieve the user information of a user authenticated with Apache's mod_ldap?
  • How to specify input and output paths from cmd.exe for a PowerShell script?
  • ThreadStatic in asynchronous ASP.NET Web API
  • Debugging VB6 Code From Visual Studio 2010
  • Django invalid literal for int() with base 10
  • WPF ICommand CanExecute(): RaiseCanExecuteChanged() or automatic handling via DispatchTimer?
  • How solve “Qt: Untested Windows version 10.0 detected!”
  • xtable package: Skipping some rows in the output
  • How to use carriage return with multiple line?
  • debug library loaded with ctypes using gdb
  • C++ Partial template specialization - design simplification
  • Control modification in presentation layer
  • Debugging ASP.NET on a built-in web server suddenly stops
  • How to extract text from Word files using C#?
  • Javascript Callbacks with Object constructor
  • How can I use Kendo UI with Razor?
  • Adding custom controls to a full screen movie
  • align graphs with different xlab
  • Return words with double consecutive letters
  • Confusion with PayPal's monthly billing cycle
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Does armcc optimizes non-volatile variables with -O0?
  • Reading document lines to the user (python)
  • Observable and ngFor in Angular 2
  • Conditional In-Line CSS for IE and Others?
  • Python/Django TangoWithDjango Models and Databases