473,404 Members | 2,195 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,404 software developers and data experts.

windows shortcut & relative pathnames

75
I have used relative path names in my application:
for example:
logo_image = Image.open("./data/logo.png")

everything has worked fine until now... I have compiled my code into exe and made installer, but if I make shortcut to windows desktop all those relative pathnames doesn't work anymore.

what is a proper way to write path names?

I can't write absolute path names either because my program could be located anywhere.

is there a way to get the directory location where my app is?
Apr 15 '08 #1
1 2719
dazzler
75
forget about above ;)
problem solved...
the problem seemed to be with my installer script (NSIS)
Apr 15 '08 #2

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

Similar topics

1
by: Hal Vaughan | last post by:
I've been using Runtime.exec() like this: Runtime rt = Runtime.getRuntime(); try {Process p = rt.exec("MyCommand.bat");} catch (Exception e) {do stuff} When I start my Java classes, I start...
7
by: mark | last post by:
I am designing a website at the moment and looking at the difference between relative and absolute url links which is driving me crazy! I would like to use relative paths, but it is proving very...
2
by: jayb | last post by:
I'd like to be able to access files on a remote system in an "invisible" manner from a Windows system. What I'm after is to be able to interact with the remote filesystem just as I would locally...
3
by: Stanislaw Findeisen | last post by:
Does anyone know how to create file shortcuts in Windows? The only way I know is like: --------------------------------------------------------------- import win32com.client ...
1
by: draco | last post by:
Hi, Let's say I have a dynamic library libapple.so with a method applemethod() which expects a filename string. I call this method from main() which is in the file foo.c. Now foo.c and apple.so...
1
by: Ted Polak | last post by:
I am trying to use a relative pathname to connect to a Database in a folder in my wwwroot directory. However, when I test the connection to the database, I get this error:...
2
by: Rob R. Ainscough | last post by:
I've setup a Windows Installer Setup Project for my VS 2005 VB.NET app -- it installs find, but my Desktop icon and Programs Menu icon do not run the app ..exe when I click on them -- I can't...
12
by: pac | last post by:
I'm preparing to distribute a Windows XP Python program and some ancillary files, and I wanted to put everything in a .ZIP archive. It proved to be inordinately difficult and I thought I would...
1
by: mohaakilla51 | last post by:
OK, so I am making a program, with C++ and wxWidgets in which it reads stuff from a text file. My problem is, I made an installer, and it puts a shortcut on the desktop, but, whenever you run the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.