473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Change Gateway Programmatically

Dear Pythoneer,
I need to toggle the gateway ip of my windows xp machine quite
often due to some software requirements. I just want to know whether i
could do it programmatically using Python.
If so how?

Jan 11 '06 #1
5 1945

Godwin Burby wrote:
Dear Pythoneer,
I need to toggle the gateway ip of my windows xp machine quite
often due to some software requirements. I just want to know whether i
could do it programmatically using Python.
If so how?


I am sure there must be some elegant python way but you may also like
to check out "netsh.exe", which comes with every XP.

Jan 11 '06 #2
Well netsh turned out to be the perfect solution for my problem(even
though doing it in python would have given me some kicks). I managed it
with two .bat files for toggling the gateway ips. Thank you friend.

Jan 11 '06 #3

Godwin Burby wrote:
Well netsh turned out to be the perfect solution for my problem(even
though doing it in python would have given me some kicks). I managed it
with two .bat files for toggling the gateway ips. Thank you friend.


there is os.system/os.open* if you want to put python in the equation
;-)

Jan 11 '06 #4
Godwin Burby wrote:
I need to toggle the gateway ip of my windows xp machine quite
often due to some software requirements. I just want to know whether i
could do it programmatically using Python.
If so how?


os.system("route ...") could work.

for details on the route command, use "route /?" at the windows command
prompt.

</F>

Jan 11 '06 #5
Thanx again.

Jan 11 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phillip J. Eby | last post by:
PEP: 333 Title: Python Web Server Gateway Interface v1.0 Version: $Revision: 1.1 $ Last-Modified: $Date: 2004/08/27 17:30:09 $ Author: Phillip J. Eby <pje at telecommunity.com> Discussions-To:...
3
by: roger beniot | last post by:
I would like to figure out how to detect an IP address change for an XP/Win2K3 machine that is leasing an IP via DHCP (and do it in C#)... Is there any event that indicates an IP address...
1
by: Noozer | last post by:
How to change IP Gateway simply? Just looking for some sample code... Could be VB6 or VB Net 2005.... I want to have a Tray icon. When double clicked it changes the TCPIP gateway to a...
18
by: Grant Edwards | last post by:
Could whoever is responsible for the gateway that is grabbing my postings off of Usenet and e-mailing them out please fix the headers in the mail messages so that I don't get the bounce messages?...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.