How to access an absolute address through Python?

?

=?ISO-8859-1?Q?Ma=EBl_Benjamin_Mettler?=

volcano said:
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...
 
V

volcano

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

Marc 'BlackJack' Rintsch

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
 
V

volcano

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
 
F

Fred of UrlBit.Us

volcano said:
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.
 
S

Steve Holden

volcano said:
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
 
P

Paul Rubin

Steve Holden said:
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.
 
D

Dennis Lee Bieber

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?
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
ports)
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top