first off... a litte explanation as to what I'm doing...

this is basically a way for me to create an update system for my program...
the webhost I'm using allows hot-file linkage, so there's nothing that's improper...
(except for my compy not having net)

anyways...
the structure I have for my setup involves a series of .py files in a single directory:

http://tcll5850.hostoi.com/
-Universal Model Converter/
--UMC/
---1.py
---2.py
---3.py
---4.py

(reason for the 'UMC' directory is it's the name of the actual .py file for the program)

what will happen is the current version on the local machine will be compaired with the versions on the server:

SvrVsn = int([D.replace('.py','') for D in os.listdir('http://tcll5850.hostoi.com/Universal Model Converter/') if D.endswith('.py')][-1])

if SvrVsn > CurVsn:
    print 'Update detected!'
else:
    pass #you get the point

my problem (as in all obviousness) is os.listdir()
since it's only capable of handling local calls >_>

my question is... what can I use in place of it??
(again... no net on compy (posting from Wii), and all I have is the Python (2.6.2) installation)

EDIT: Note: SvrVsn would be 4 as it would be the last value in the list

I suppose that you normally access your own website using an ftp client, so you should be able to list remote directories with the ftplib module.

I suppose that you normally access your own website using an ftp client, so you should be able to list remote directories with the ftplib module.

alright...
I'll look into that, and thanx ;)

I'll post if I fail/succeed XDD

hmm...
I don't particularly like the fact of having to use login info >_>
is there a workaround to how I could encode the info or something??

or can I access the info on my site w/o it??

*rethinks*
I guess I could use a method of error testing using a while loop with urllib and set an appending value to check for the file version...
(if the file doesn't open, then it doesn't exist)
^where the appending value would stop the while loop if greater than 4 for my example below...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.