Member Avatar

Some time ago, I needed to know the pathname of my running application, in order to create a temporary file. As it seems ther are alot more options than I thought. So I applied all I could find in this little snippet. I also used the full names to make clear where everything is coming from. Guess I'll stick to `System.Environment.CurrentDirectory;` :) Let me know if you know others. Enjoy!

Member Avatar
+1 forum 1
Member Avatar

If someone was to try and build a pathname (in a source.doc) property, what would be the syntax ? All I'm looking for is: some phantom string variable declarations and how to build that pathname to a file Thanks again and Happy NY to all T

Member Avatar
+0 forum 1
Member Avatar

I am thinking of writing a path_name_class that would be easily adaptable to any file system, but I have run in this difficulty: it appears that some file systems allow **ALL unicode except null** characters in their directory entry (this is the case for example for exfat and many others (as reported by the wikipedia entry "comparison of file systems")). So here is a mystery I have not been able to solve even after googling a lot: how can you possibly represent a path in those circumstances as a wchar array ? Is NULL used as a the component separator …

Member Avatar
+0 forum 8
Member Avatar

Hi cannot get images to load any help would be gratefully recieved... [CODE] import pygame import sys from pygame.locals import * sys.path.append ("C:\\Python26\Bits\player.png") ###Will not Load saved image #triedC:\Python26\Bits\player.png # and tried C:\Python26\Bits #confusing or what!!! #Whole program not here # set up the window WINDOWWIDTH = 400 WINDOWHEIGHT = 400 windowSurface = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT), 0, 32) pygame.display.set_caption('Sprites and Sound') player = pygame.Rect(300, 100, 40, 40) playerImage = pygame.image.load('player.png') playerStretchedImage = pygame.transform.scale(playerImage, (40, 40)) windowSurface.blit(playerStretchedImage, player) pygame.display.update() while True: # check for the QUIT event for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() [/CODE]

Member Avatar
+0 forum 1
Member Avatar

i need to upload images in imagegallery throuhg plugin in '/wp-content/images' folder. for that i need to set this path in 'Miscellaneous Settings' given in wordpress. if i give '/wp-content/images' there, all the images i upload in wordpress will be going tho this folder.. otherwise if i give the option "Organize my uploads into month- and year-based folders" then the images uploaded willbe going to seperate folders but retriving that is difficult... how can i solve this....

Member Avatar
+0 forum 4
Member Avatar

A short look at creating lists of file names or full path names using the versatile Python module glob. Glob follows the standard wildcard protocol.

+1 forum 0

The End.