How to access an absolute address through Python?

Discussion in 'Python' started by volcano, Feb 11, 2007.

  1. volcano

    volcano Guest

    Can it be done, and if yes - how?
    volcano, Feb 11, 2007
    1. Advertisements

  2. Define address. Are you talking about URLs? File paths? Postal
    addresses? Memory addresses? Whatever addresses?
    I'm afraid the people on this list can't read your thoughts...
    =?ISO-8859-1?Q?Ma=EBl_Benjamin_Mettler?=, Feb 11, 2007
    1. Advertisements

  3. volcano

    volcano Guest

    I presumed that "absolute" address somehow qualifies my question. If
    it is not - I was talking about physical computer memory, on PC - to
    be more specific.
    volcano, Feb 11, 2007
  4. In pure Python it's not possible and even in C it might be difficult to
    get an absolute *physical* memory address unless you run DOS. Modern
    operating systems tend to use some virtualisation of memory. :)

    What's your goal? What do you expect at the memory address you want to

    Marc 'BlackJack' Rintsch
    Marc 'BlackJack' Rintsch, Feb 11, 2007
  5. volcano

    volcano Guest

    My goal is to sync program with external equipment through a register
    defined as an absolute physical address. I know how to do it from C -
    was curious if it may be done from Python. Can it be done?

    Thanks, Mark
    volcano, Feb 11, 2007
  6. Your best bet will be to create a C library callable from Python to do it
    for you. There may be such a beast in existence already, but it should not
    be hard at all to do, given the simplicity of the requirements.
    Fred of UrlBit.Us, Feb 11, 2007
  7. volcano

    Steve Holden Guest

    No. You'd have to use a compiled extension.

    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd
    Skype: holdenweb
    Blog of Note:
    See you at PyCon?
    Steve Holden, Feb 11, 2007
  8. volcano

    volcano Guest

    volcano, Feb 11, 2007
  9. volcano

    Paul Rubin Guest

    Well, you don't necessarily have to deal with the C API or ctypes; it
    may be enough to invoke an external program that accesses the
    necessary memory address.
    Paul Rubin, Feb 11, 2007
  10. /proc/kmem
    Grant Edwards, Feb 11, 2007
  11. On Windows you'd have to create an OS-level driver module that runs
    with the needed privileges (just take a look at how many utilities are
    out there to grant user programs access to physical serial and parallel
    Wulfraed Dennis Lee Bieber KD6MOG

    (Bestiaria Support Staff: )
    Dennis Lee Bieber, Feb 12, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.