473,241 Members | 1,454 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,241 software developers and data experts.

Reading config.ini in PythonWin.


I am new in Python Forum and quite new in Python programming as well. I
am working mainly with GIS and using Esri's geoprocessing tools.

I want to use .ini file to set the parameters, especially paths, in my
project. PythonWin 2.1. is my version. Windows is XP.

Why do I get the default back in the case below? Any way around?

The Paths,Temp is c:/temp.

>>> win32ui.SetProfileFileName('D:\\config.ini')
>>> Temp = win32ui.GetProfileVal('Paths','Temp','c:/')
>>> print Temp

Sep 4 '06 #1
0 1951

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Moth | last post by:
I have a web application that needs to read an xml configuration file. How can I specify this without knowing the path of the web application? I've tried using...
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
by: Marek | last post by:
Hi there, my WinForm application has to be installed in "no-touch-deployment" mode, so users can run it from the web. I need to read application's .config file but it does not work in ...
by: Jon Maz | last post by:
Hi All, I'm getting to grips with PHP and Apache (on Windows for current development, production site will be on Linux), and have a simple (I hope!) request. When you change the httpd.conf...
by: jassi | last post by:
Hi, i have an app.config file as follows : <?xml version="1.0" encoding="utf-8"> <configuration> <appSettings> <add key="button1.Text" value="cc1"/>
by: jason | last post by:
here is my config file (myapp.exe.config): <configuration> <startup> <supportedRuntime version="v1.1.4322" /> </startup> <appSettings> <add key="success" value="1" /> <add key="failure"...
by: Søren M. Olesen | last post by:
Hi I've created a Class library (myClasses.dll), and added a settings.settings to it using designer. However when I use this class library, it doesn't seem to read the settings...
by: Salty Dog | last post by:
I have the config file named properly but maybe I don't have it in the proper location. I have it in the root of the project folder. Is there someplace that I need to configure the Windows...
by: Vesa Leppanen | last post by:
Hi, I am new in python-list and quite new in Python programming as well. I am working mainly with GIS and using Esri's geoprocessing tools. I want to use .ini file to set the parameters,...
by: M Irfan | last post by:
Hello all, Recently I have started working in .NET 2.0. I am developing a web service application that references a DLL component written in C# 2.0. The component has its own config file which...
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.