Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Subject: Got "ValueError: Attempted relative import in non-package" when use ropemacs.
Newsgroups: gmane.emacs.help
Date: Tuesday 28th February 2012 21:32:09 UTC (over 4 years ago)
Recently I try use ropemacs and friends to simplify and speedup my coding
experience in Python language.

When all my code stay in single file - all ok. But when come time to split
code to several files I get error:

  ValueError: Attempted relative import in non-package

in *Python* buffer when visit Python file which use relative import:

  from .blogger import *
  from .wordpress import *

File hierarchy:

  /blog4y/blog4y.py
  /blog4y/blogger.py
  /blog4y/wordpress.py

Note that my application:

  #!/usr/bin/env python
  from blog4y import blog4y
  blog4y.start()

work fine when called from  directory...

I am newbie for Python and rope. I think that solution lie in customising
/blog4y/blog4y/.ropeproject/config.py file...

Next morning I try to read ropemacs manual but first look say that I don't
resolve this problem myself...

-- 
Best regards!
 
CD: 3ms