|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
CherryPy and SVGHello, i have been using CherryPy along with Orbited, and till now everything is really great... but... one of the functionalities i want my website to have is to change an SVG file when new information arrives. I have being dealing with this, trying opera, explorer and firefox, thinking that the problem was my browser... till i founf this test site: http://jwatt.org/svg/demos/scripting-across-embed.html to test my browser. My surprise is that my browser works ok with that site, but is incapable to show the same ok, messages when i copy that site, and serve it with cherrypy!!! Investigating a little bit more, i've found that probably is the server's fault... and that i have to change the configuration file http://www.getsvg.com/get_svg_on_the_web And here goes the question!!! How should i do that??????:S --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVG> > Hello, i have been using CherryPy along with Orbited, and till now > everything is really great... but... one of the functionalities i want > my website to have is to change an SVG file when new information > arrives. > > I have being dealing with this, trying opera, explorer and firefox, > thinking that the problem was my browser... till i founf this test > site: http://jwatt.org/svg/demos/scripting-across-embed.html to test > my browser. My surprise is that my browser works ok with that site, > but is incapable to show the same ok, messages when i copy that site, > and serve it with cherrypy!!! > > Investigating a little bit more, i've found that probably is the > server's fault... and that i have to change the configuration file > http://www.getsvg.com/get_svg_on_the_web > > And here goes the question!!! How should i do that??????:S Probably the best would be a a minimal example so that we can try to reproduce the problem as well as the behavior you're getting, maybe errors even. - Sylvain -- Sylvain Hellegouarch http://www.defuze.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVGevidentemente.yo wrote: > Hello, i have been using CherryPy along with Orbited, and till now > everything is really great... but... one of the functionalities i want > my website to have is to change an SVG file when new information > arrives. > > I have being dealing with this, trying opera, explorer and firefox, > thinking that the problem was my browser... till i founf this test > site: http://jwatt.org/svg/demos/scripting-across-embed.html to test > my browser. My surprise is that my browser works ok with that site, > but is incapable to show the same ok, messages when i copy that site, > and serve it with cherrypy!!! > > Investigating a little bit more, i've found that probably is the > server's fault... and that i have to change the configuration file > http://www.getsvg.com/get_svg_on_the_web > > And here goes the question!!! How should i do that??????:S As the latter link says, you need to include svg and svgz in your mimetypes list: import mimetypes mimetypes.types_map['.svg'] = 'image/svg+xml' mimetypes.types_map['.svgz'] = 'image/svg+xml' Do that before starting the CherryPy engine/server. Robert Brewer fumanchu@... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVGYes, that's what i need!!! Can you tell me where should i change that configuration? cause i have looked in the cherrypy folder, and can't find "config file" looking file... and i don't want to change anything withot being sure:D On 5 jun, 17:22, "Robert Brewer" <fuman...@...> wrote: > evidentemente.yo wrote: > > Hello, i have been using CherryPy along with Orbited, and till now > > everything is really great... but... one of the functionalities i want > > my website to have is to change an SVG file when new information > > arrives. > > > I have being dealing with this, trying opera, explorer and firefox, > > thinking that the problem was my browser... till i founf this test > > site:http://jwatt.org/svg/demos/scripting-across-embed.htmlto test > > my browser. My surprise is that my browser works ok with that site, > > but is incapable to show the same ok, messages when i copy that site, > > and serve it with cherrypy!!! > > > Investigating a little bit more, i've found that probably is the > > server's fault... and that i have to change the configuration file > >http://www.getsvg.com/get_svg_on_the_web > > > And here goes the question!!! How should i do that??????:S > > As the latter link says, you need to include svg and svgz in your > mimetypes list: > > import mimetypes > mimetypes.types_map['.svg'] = 'image/svg+xml' > mimetypes.types_map['.svgz'] = 'image/svg+xml' > > Do that before starting the CherryPy engine/server. > > Robert Brewer > fuman...@... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVG> > Yes, that's what i need!!! Can you tell me where should i change that > configuration? cause i have looked in the cherrypy folder, and can't > find "config file" looking file... and i don't want to change anything > withot being sure:D Do that in any module that would be called before cherrypy.engine is called in your application. You can put it right before it if you want. It's a global settings. - Sylvain > > On 5 jun, 17:22, "Robert Brewer" <fuman...@...> wrote: >> evidentemente.yo wrote: >> > Hello, i have been using CherryPy along with Orbited, and till now >> > everything is really great... but... one of the functionalities i want >> > my website to have is to change an SVG file when new information >> > arrives. >> >> > I have being dealing with this, trying opera, explorer and firefox, >> > thinking that the problem was my browser... till i founf this test >> > site:http://jwatt.org/svg/demos/scripting-across-embed.htmlto test >> > my browser. My surprise is that my browser works ok with that site, >> > but is incapable to show the same ok, messages when i copy that site, >> > and serve it with cherrypy!!! >> >> > Investigating a little bit more, i've found that probably is the >> > server's fault... and that i have to change the configuration file >> >http://www.getsvg.com/get_svg_on_the_web >> >> > And here goes the question!!! How should i do that??????:S >> >> As the latter link says, you need to include svg and svgz in your >> mimetypes list: >> >> import mimetypes >> mimetypes.types_map['.svg'] = 'image/svg+xml' >> mimetypes.types_map['.svgz'] = 'image/svg+xml' >> >> Do that before starting the CherryPy engine/server. >> >> Robert Brewer >> fuman...@... > > > > -- Sylvain Hellegouarch http://www.defuze.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVGSorry for my newbiness:S Before starting meteor, i start Orbited(http://www.orbited.org), i have changed the configuration file as this: [global] proxy.enabled = 1 proxy.keepalive = 0 import mimetypes mimetypes.types_map['.svg'] = 'image/svg+xml' mimetypes.types_map['.svgz'] = 'image/svg+xml' [proxy] /cherryHMI -> ORBITED / -> http://127.0.0.1:4700 But still doesn't work... the SVGDocument interface continues to be not supported...:S(in apache works:( ) Should i change the other file that i start?? is a python module looking like this: import cherrypy from pyorbited.simple import Client orbit = Client() class ChatServer(object): users = [] def user_keys(self): return ['%s, %s, /cherryHMI' % (u, s) for u,s in self.users] @cherrypy.expose def join(self, user, session='0', id=None): if (user, session) not in self.users: self.users.append((user, session)) orbit.event(self.user_keys(), '<b>%s joined</b>' % user) @cherrypy.expose def msg(self, user, msg,session='0', id=None): orbit.event(self.user_keys(), '<b>%s</b> %s' % (user, msg)) if __name__ == '__main__': import os # This code is straight from the cherrypy StaticContent wiki # which can be found here: http://www.cherrypy.org/wiki/StaticContent current_dir = os.path.dirname(os.path.abspath(__file__)) # Set up site-wide config first so we get a log if errors occur. cherrypy.config.update({'environment': 'production', 'log.screen': True, 'server.socket_port': 4700, 'server.thread_pool': 0, 'tools.staticdir.root': current_dir}) conf = {'/static': {'tools.staticdir.on': True, 'tools.staticdir.dir': 'static'}} cherrypy.quickstart(ChatServer(), '/', config=conf) On 6 jun, 09:04, "Sylvain Hellegouarch" <s...@...> wrote: > > Yes, that's what i need!!! Can you tell me where should i change that > > configuration? cause i have looked in the cherrypy folder, and can't > > find "config file" looking file... and i don't want to change anything > > withot being sure:D > > Do that in any module that would be called before cherrypy.engine is > called in your application. You can put it right before it if you want. > It's a global settings. > > - Sylvain > > > > > > > On 5 jun, 17:22, "Robert Brewer" <fuman...@...> wrote: > >> evidentemente.yo wrote: > >> > Hello, i have been using CherryPy along with Orbited, and till now > >> > everything is really great... but... one of the functionalities i want > >> > my website to have is to change an SVG file when new information > >> > arrives. > > >> > I have being dealing with this, trying opera, explorer and firefox, > >> > thinking that the problem was my browser... till i founf this test > >> > site:http://jwatt.org/svg/demos/scripting-across-embed.htmltotest > >> > my browser. My surprise is that my browser works ok with that site, > >> > but is incapable to show the same ok, messages when i copy that site, > >> > and serve it with cherrypy!!! > > >> > Investigating a little bit more, i've found that probably is the > >> > server's fault... and that i have to change the configuration file > >> >http://www.getsvg.com/get_svg_on_the_web > > >> > And here goes the question!!! How should i do that??????:S > > >> As the latter link says, you need to include svg and svgz in your > >> mimetypes list: > > >> import mimetypes > >> mimetypes.types_map['.svg'] = 'image/svg+xml' > >> mimetypes.types_map['.svgz'] = 'image/svg+xml' > > >> Do that before starting the CherryPy engine/server. > > >> Robert Brewer > >> fuman...@... > > -- > Sylvain Hellegouarchhttp://www.defuze.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVG> > Sorry for my newbiness:S Before starting meteor, i start > Orbited(http://www.orbited.org), i have changed the configuration file > as this: > > [global] > proxy.enabled = 1 > proxy.keepalive = 0 > > import mimetypes > mimetypes.types_map['.svg'] = 'image/svg+xml' > mimetypes.types_map['.svgz'] = 'image/svg+xml' These three lines should be just after your "import cherrypy" below. - Sylvain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVGit doesn't work for me:S import cherrypy import mimetypes mimetypes.types_map['.svg'] = 'image/svg+xml' mimetypes.types_map['.svgz'] = 'image/svg+xml' from pyorbited.simple import Client orbit = Client() class ChatServer(object): users = [] def user_keys(self): return ['%s, %s, /cherryHMI' % (u, s) for u,s in self.users] @cherrypy.expose def join(self, user, session='0', id=None): if (user, session) not .......................................................... On 6 jun, 09:42, "Sylvain Hellegouarch" <s...@...> wrote: > > Sorry for my newbiness:S Before starting meteor, i start > > Orbited(http://www.orbited.org), i have changed the configuration file > > as this: > > > [global] > > proxy.enabled = 1 > > proxy.keepalive = 0 > > > import mimetypes > > mimetypes.types_map['.svg'] = 'image/svg+xml' > > mimetypes.types_map['.svgz'] = 'image/svg+xml' > > These three lines should be just after your "import cherrypy" below. > > - Sylvain You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: CherryPy and SVGAnyone can help me to configure my cherryPy to serve SVGs???:( i still haven't found a way to configure it correctly:'( --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cherrypy-users" group. To post to this group, send email to cherrypy-users@... To unsubscribe from this group, send email to cherrypy-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |