473,910 Members | 4,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Machine Name

How does one get the machine name with Python that the actual script is
running on? Obviously, one could parse the hosts file but I was
wondering if there was a quick way to get it done?

thanks,

Harlin Seritt

Aug 23 '05 #1
1 2792
Harlin Seritt wrote:
How does one get the machine name with Python that the actual script is
running on? Obviously, one could parse the hosts file but I was
wondering if there was a quick way to get it done?

thanks,

Harlin Seritt
from socket import gethostname
gethostname() 'bigboy'


regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Aug 24 '05 #2

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

Similar topics

2
3119
by: Go Browns! | last post by:
hello everyone. i am new to the group so i aplogize if this question has been answered recently... our sql db machine is too old. we bought a new server with which to replace it. the trick is, we want to keep the name of the machine and db instance the same. obviously, we don't plan on having two machine with the same name on the network at the same time. how do we handle this?
1
4408
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String *ipAddress = S""; IDictionary *server_config = dynamic_cast<IDictionary*>(ConfigurationSettings::GetConfig("ServerAddress") ); ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
3
5374
by: | last post by:
This question references to KB articles: http://support.microsoft.com/default.aspx?scid=kb;EN-US;315158 http://support.microsoft.com/default.aspx?scid=kb;EN-US;317012 I'm running Advanced Server 2000 as a domain controller with IIS 5 (I know I shouldn't be doing this - just a test machine). I am using the default ASP.NET (v1.1) machine.config file..... <processModel..... userName="machine" password="AutoGenerate"..... />
4
1196
by: Raghu Raman | last post by:
Hi, How can i run my project after copied from one machine. After Coping the project folder from one machine to other machine, i simply create the virtual directory with the same name as it was in the other machine.Eventhough i create the same name for the virtual directory , my project won't running.It is telling the error like imachine_independanat and debugger is not attached .
11
2131
by: PK9 | last post by:
I'm having trouble accessing my database (error: The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data) . I know that I need to give the IUSR_<Machine Name> access to my database, but when I right click my database (or folder the db resides in) and select properties, I do NOT get a security tab where I can give other accounts access. ...
27
2572
by: Javier Martinez | last post by:
Hi I have asp application in a machine with a virtual directory referring a shared directory in another machine When I try to load any aspx page of my portal I get the following error: Mensaje de error del analizador: We can't load the type 'JULIAN.Global'.
5
2815
by: Khalique | last post by:
Hi everyone, I Hope that someone will be able to give me a hint to the solution to my problem. I have developed a web service (vb.net) that needs to access the folders / files and copy files to and from the public folder on the client machine. It is not a public web service, only accessible on intranet. The anonymous access is disabled. Windows authentication is enabled. Web.Config sets <identity impersonate="true" /> Using a test app,...
6
1922
by: Michael | last post by:
I am running an application that requires "Full Trust" which is declared in the assembly. How do I trap for the System.Security.Policy.PolicyException that is raised by a local machines CAS if its current policy will not allow "Full Trust", ie its running in the Intranet Zone. I am trying to trap the error to advise users to have adm revise policy to permit running the program otherwise a cryptic debug screen is raised.
5
2869
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath) Dim section As New MembershipSection section = rootWebConfig1.GetSection("system.web/membership")
2
1631
by: jason | last post by:
Hello everyone, I am writing to discover if there is a way, through System libraries or some other method, to acquire the name of the local machine from within an object library DLL. In case it is relevant, I have an object library DLL that performs a generic "error handling" process for each exception that is thrown by either itself, or by an application that is using the DLL. One of the pieces of information that the generic error...
0
9879
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11349
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10541
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9727
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7250
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5939
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6142
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4337
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.