469,282 Members | 1,913 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

How to access an absolute address through Python?

Can it be done, and if yes - how?

Feb 11 '07 #1
9 2422
volcano schrieb:
Can it be done, and if yes - how?
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...
Feb 11 '07 #2
On Feb 11, 2:21 pm, MaŽl Benjamin Mettler <m...@mediamonger.chwrote:
volcano schrieb:
Can it be done, and if yes - how?

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...
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.

Feb 11 '07 #3
In <11*********************@k78g2000cwa.googlegroups. com>, volcano wrote:
On Feb 11, 2:21 pm, Ma√ęl Benjamin Mettler <m...@mediamonger.chwrote:
>volcano schrieb:
Can it be done, and if yes - how?

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...

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.
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
access?

Ciao,
Marc 'BlackJack' Rintsch
Feb 11 '07 #4
On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
In <1171197574.776135.96...@k78g2000cwa.googlegroups. com>, volcano wrote:
On Feb 11, 2:21 pm, MaŽl Benjamin Mettler <m...@mediamonger.chwrote:
volcano schrieb:
Can it be done, and if yes - how?
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...
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.

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
access?

Ciao,
Marc 'BlackJack' Rintsch
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

Feb 11 '07 #5
volcano wrote:
On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
....
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
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
-- http://UrlBit.Us - Bite those URLs down to size!
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Feb 11 '07 #6
volcano wrote:
On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
[...]
>What's your goal? What do you expect at the memory address you want to
access?

Ciao,
Marc 'BlackJack' Rintsch

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?
No. You'd have to use a compiled extension.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007

Feb 11 '07 #7
On Feb 11, 3:46 pm, Steve Holden <s...@holdenweb.comwrote:
volcano wrote:
On Feb 11, 2:46 pm, Marc 'BlackJack' Rintsch <bj_...@gmx.netwrote:
[...]
What's your goal? What do you expect at the memory address you want to
access?
Ciao,
Marc 'BlackJack' Rintsch
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?

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

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007

Steve, Fred, thank you. This is exactly what I have done, though I did
hope for shortcut. Life is tough:)!

Feb 11 '07 #8
Steve Holden <st***@holdenweb.comwrites:
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?
No. You'd have to use a compiled extension.
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.
Feb 11 '07 #9
On 2007-02-11, volcano <Ma*********@gmail.comwrote:
Can it be done,
Yes.
and if yes - how?
/proc/kmem

--
Grant Edwards grante Yow! Nipples, dimples,
at knuckles, NICKLES,
visi.com wrinkles, pimples!!
Feb 11 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Samuel Schulenburg | last post: by
6 posts views Thread by David Siroky | last post: by
reply views Thread by TheCoder | last post: by
33 posts views Thread by Benjamin M. Stocks | last post: by
6 posts views Thread by Jon Slaughter | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.