|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
New to Python: Get client IP address in Spyce
So, I have a Spyce page that I want to use to get the client's IP address. I know this is something simple but I just can't get it working.
I tried the following code: Code:
=cgi.os.getenv('REMOTE_ADDR')
But all I get back is "None". Many thanks, Joel |
|
#2
|
||||
|
||||
|
You're looking for is the env() function in spyces request module.
Quote:
http://spyce.sourceforge.net/doc-mod_request.html Mark. |
|
#3
|
|||
|
|||
|
Thanks
Hey Netytan,
Thanks a million for straightening me out. I should have posted this much earlier and saved myself many frustrations. I've lurked here long enough to know that you are the man and I wasn't let down ![]() I'm digging this python thing but I'm still trying to get my arms around the different modules in spyce vs python. For some reason, I have a much harder time navigating the documentation than I do in PHP or Java (okay, that's probably 'cuz I'm much more familiar with them ). Thanks again, Joel |
|
#4
|
||||
|
||||
|
No problem at all Galberras anything else i can help you with dont hesitate to ask
. Thanks for the kind words ![]() I know what your talking about Pythons docs are so big that its not always easy to get to where you want, the trick with Spyce is to stick to its modules where possible. Mark. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > New to Python: Get client IP address in Spyce |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|