Yuan HOng wrote:
> Thanks Ian for the quick response. Following your tip I have now got
> pudge running.

The current directory (".") shows up (or doesn't show up) on the path
depending on how you start Python.  Apparently it doesn't show up for
you.  I would try setting the environmental variable PYTHONPATH=. so
that Pudge can be sure to find your module.  Otherwise I'm not sure,
you'll have to experiment with how to make your module visible from
outside the interactive interpreter.





> But on my first try I bump into the following error:
> 
> rhodium:~# pudge -m statemachine
> copying: 
> /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/template/base/layout.css
> -> ./layout.css
> copying: 
> /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/template/base/pudge.css
> -> ./pudge.css
> copying: 
> /usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/template/base/rst.css
> -> ./rst.css
> Traceback (most recent call last):
>   File "/usr/bin/pudge", line 5, in ?
>     pkg_resources.run_script('pudge==0.1', 'pudge')
>   File 
> "/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
> line 407, in run_script
>     self.require(requires)[0].run_script(script_name, ns)
>   File 
> "/usr/lib/python2.4/site-packages/setuptools-0.6a9-py2.4.egg/pkg_resources.py",
> line 920, in run_script
>     execfile(script_filename, namespace, namespace)
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/EGG-INFO/scripts/pudge",
> line 24, in ?
>     cli.main()
>   File "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/cli.py",
> line 73, in main
>     command.process_command()
>   File "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/cli.py",
> line 144, in process_command
>     command()
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/generator.py",
> line 85, in generate
>     self.time_func(None, self.generate_index)
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/generator.py",
> line 331, in time_func
>     return func(*args, **kw)
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/generator.py",
> line 191, in generate_index
>     self.expand_template('package-index.html', 'module-index')
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/generator.py",
> line 139, in expand_template
>     encoding='utf-8')
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/__init__.py",
> line 209, in write
>     return serializer.write(self, file, encoding, fragment)
>   File 
> "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py",
> line 58, in write
>     for text in self.generate(stream, encoding, fragment):
>   File 
> "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py",
> line 319, in generate
>     for ev, item in self.apply_filters(stream):
>   File 
> "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/serialization.py",
> line 77, in balancing_filter
>     for ev, item in stream:
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/pull.py",
> line 203, in _coalesce
>     for ev, item in stream:
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/filter.py",
> line 21, in transform_filter
>     for ev, item in apply_matches(stream, template, templates, apply_func):
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/filter.py",
> line 25, in apply_matches
>     for ev, item in stream:
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/pull.py",
> line 164, in _track
>     for p in stream:
>   File "/usr/lib/python2.4/site-packages/kid-0.8-py2.4.egg/kid/pull.py",
> line 203, in _coalesce
>     for ev, item in stream:
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/template/base/layout.py",
> line 77, in layout
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/template/base/package-index.py",
> line 48, in _pull
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/browser.py",
> line 108, in modules
>     m = self.find(m)
>   File 
> "/usr/lib/python2.4/site-packages/pudge-0.1-py2.4.egg/pudge/browser.py",
> line 94, in find
>     raise ImportError("Module not found: %s" % name)
> ImportError: Module not found: statemachine
> 
> I have a file statemachine.py under the home directory and I can
> import the module from that directory without problem. Where should I
> put the file for pudge to find it?
> 
> Anything wrong with my setup or the usage of pudge?
> 
> On 2/10/06, Ian Bicking <[EMAIL PROTECTED]> wrote:
> 
>>There are some problems with easy_install and SourceForge at the moment.
>> If you download the docutils .tar.gz file manually, and then run
>>"easy_install docutils-...tar.gz" then that should install properly.  If
>>you then restart from the beginning it will see your docutils installation.
>>
>>I can edit the Cheese Shop page to handle some of these issues, but with
>>SF there's no direct link that will work.
>>
>>
> 
> --
> Hong Yuan
> 
> 大管家网上建材超市
> 装修装潢建材一站式购物
> http://www.homemaster.cn
> 
> _______________________________________________
> Pudge mailing list
> [email protected]
> http://lesscode.org/mailman/listinfo/pudge


-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
Pudge mailing list
[email protected]
http://lesscode.org/mailman/listinfo/pudge

Reply via email to