Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 665823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:45:03+00:00 2026-05-13T23:45:03+00:00

when generating python wrappers with swig the python wrapper classes in the generated python

  • 0

when generating python wrappers with swig the python wrapper classes in the generated python file do not have an explicit self parameter, for example see below:

class PySwigIterator(_object):
    def value(*args): return _spatiotemporalnmf.PySwigIterator_value(*args)
    def incr(*args): return _spatiotemporalnmf.PySwigIterator_incr(*args)
    def decr(*args): return _spatiotemporalnmf.PySwigIterator_decr(*args)
    def distance(*args): return _spatiotemporalnmf.PySwigIterator_distance(*args)

I am developing with the eclipse pluging Pydev. Pydev always shows an error when it detects a method without explicit self parameter. I am aware of two methods to get rid of the errors: First, disable error checking for the whole project in the Pydev preferences. Second, add a #@NoSelf to every line with an error. I don’t want to use the first one, because I still want to get error warnings for my non-swig-generated files. Obviously the second one is also not very good, because I would have to do it by hand and every time I generate the file again, all #@NoSelfs will be gone.

My Question now is, is there a better way to achieve this?

Thanks

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:45:03+00:00Added an answer on May 13, 2026 at 11:45 pm

    As from the documentation, any file with the comment

    #@PydevCodeAnalysisIgnore
    

    inside will not be analyzed.

    Therefore, you just need to add it to all SWIG-generated files, and you should be OK. It is just one place to change, and you could even write a very small processor that will add it automatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any python packages that help generating SQL queries from variables and classes?
I have below variables try to make an auto generating SQL statement in python
I have problem in generating or getting decimal value in python. for now, I
I have a C++ program that keeps generating data. I have a python class
We have a c file called dbookpy.c, which will provide a Python binding some
I have to create a tlb file so I can access a Python COM
We're generating MP3 files on the fly in Python, and need to edit the
I am having some problems generating a list for a class in Python. I
Generating normal columnar data in excel file is quite easy but does any one
Im generating a file to present to the user for download, but the server

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.