Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: what to return for an empty list
Post: what to return for an empty list

i have a function to test if multiple items all meet a certain condition. another function is to test if multiple items all fail to meet a certain condition. two more functions do these tests if any...
Skaperen General Coding Help 0 4 1 hour ago
    Thread: os.listdir() and follow_symlinks
Post: RE: os.listdir() and follow_symlinks

(Yesterday, 07:05 AM)bowlofred Wrote: If you pass a symlink to readdir(), it follows it, and there are no options not to. Since this is how POSIX has worked for a long time, most folks will assume t...
Skaperen General Coding Help 6 278 1 hour ago
    Thread: os.listdir() and follow_symlinks
Post: RE: os.listdir() and follow_symlinks

case A: the given path is a directory case B: the given path is a symlink to a directory other functions differentiate these cases in exceptions. i was just thinking listdir and/or scandir ought to,...
Skaperen General Coding Help 6 278 Yesterday, 12:51 AM
    Thread: compare parts of a 2-tuple differently
Post: compare parts of a 2-tuple differently

i have a function that returns a 2-tuple. i have a previous value from that same function i want to compare it with. the previous value is an item from a dictionary. the [1] item of the tuple is a ...
Skaperen General Coding Help 0 191 May-18-2024, 08:52 PM
    Thread: program wanted for Posix
Post: RE: program wanted for Posix

(May-13-2024, 11:08 AM)snippsat Wrote: Skaperen you should show some effort when posting these requestsi usually have, at least, made some effort offline, in this case i searched for such a program...
Skaperen Bar 4 382 May-18-2024, 06:21 PM
    Thread: how would you feel if ...
Post: RE: how would you feel if ...

i don't see much different between . and besides appearance. would (2 spaces) be allowed as equivalent to (1 space)? i think i could handle this if it were done since the beginning. might...
Skaperen Bar 15 6,141 May-18-2024, 06:02 PM
    Thread: os.listdir() and follow_symlinks
Post: os.listdir() and follow_symlinks

many functions call with a file system path can also choose whether to follow symlinks (usually the default) or not. is there a way to make this choice with os.listdir()? what about a file descripto...
Skaperen General Coding Help 6 278 May-18-2024, 05:44 PM
    Thread: looking for UTF-8 tools
Post: looking for UTF-8 tools

i have a bunch of strange bytes that when produced on a certain website will show some nice graphics and certain characters. when output on my terminal i get some garbage plus those characters. i su...
Skaperen Bar 0 148 May-17-2024, 04:36 AM
    Thread: short version of os.listdir()
Post: RE: short version of os.listdir()

(May-15-2024, 05:25 PM)Gribouillis Wrote: (May-15-2024, 02:22 AM)Skaperen Wrote: how to open a directory as a file in Python? trivial in C.How do you do that in C? Isn't it a call to opendir() and...
Skaperen General Coding Help 11 551 May-15-2024, 06:05 PM
    Thread: short version of os.listdir()
Post: RE: short version of os.listdir()

the desire to get 32 to 256 at a time is not so i can have a loop do one at a time. it's so i can get all the names from a directory block with a single physical read operation. i created a test dir...
Skaperen General Coding Help 11 551 May-15-2024, 02:22 AM
    Thread: short version of os.listdir()
Post: RE: short version of os.listdir()

(May-12-2024, 03:15 AM)deanhystad Wrote: Don’t use os.listdir. Use pathlib.iterdirit gives me only ONE (1) at a time. i guess that's what "iter" implies. this is going to take "forever". is there...
Skaperen General Coding Help 11 551 May-15-2024, 01:58 AM
    Thread: short version of os.listdir()
Post: RE: short version of os.listdir()

(May-12-2024, 05:14 AM)Pedroski55 Wrote: What do you want to do with 70 million files??reduce it to about 700 files or maybe even fewer.
Skaperen General Coding Help 11 551 May-15-2024, 01:49 AM
    Thread: Please make a script
Post: RE: Please make a script

(May-13-2024, 08:30 PM)Centsicles Wrote: I think he would want nf.exe to be on my pc unfortunately his version of nf.exe? ask him if this is his want for your computer. is this computer accessing ...
Skaperen Bar 10 578 May-14-2024, 11:21 PM
    Thread: short version of os.listdir()
Post: short version of os.listdir()

is there a way to shorten os.listdir() such as to have it only read several (like maybe 32 to 256) names at a time? i need to scan through a massively huge directory and it is have trouble with it be...
Skaperen General Coding Help 11 551 May-12-2024, 12:22 AM
    Thread: program wanted for Posix
Post: program wanted for Posix

maybe you know the "head" command. maybe you know the "tail" command. i'd like to see someone create a "headtail" command that outputs the head of a file followed by the tail of that same file. if ...
Skaperen Bar 4 382 May-11-2024, 11:54 PM
    Thread: Please make a script
Post: RE: Please make a script

sounds like he goofed the update. tell him to show you how to make a backup of all your files. then tell him to show you how to re-install the OS. find a friend who owns a computer with full rights...
Skaperen Bar 10 578 May-11-2024, 11:45 PM
    Thread: Aspiring systems administrator wants a python book.
Post: RE: Aspiring systems administrator wants a python ...

have you ever written a shell script? rewrite them into Python, just for some extra practice. then try some arithmetic problems. finally, write the Python code to turn iron into gold.
Skaperen News and Discussions 1 314 May-11-2024, 11:24 PM
    Thread: which way would be better?
Post: which way would be better?

which way would be better (WWWBB)? 1.from stat import S_ISREG,S_ISDIR,S_ISLNK,S_ISBLK,S_ISCHR from stat import S_ISFIFO,S_ISSOCK,S_ISPORT,S_ISDOOR,S_ISWHT def _get_type(a): """Get type of file o...
Skaperen General Coding Help 3 332 May-10-2024, 12:26 AM
    Thread: can a number preceed a line of code?
Post: RE: can a number preceed a line of code?

yeah, the multi-line literal will be a huge problem if i don't thoroughly parse all the Python code (including the multi-line literal and/or continuation). the original goal was mixing the Python cod...
Skaperen News and Discussions 4 445 May-09-2024, 02:50 AM
    Thread: can a number preceed a line of code?
Post: RE: can a number preceed a line of code?

it looks like i need to use a scheme with something other than just a number, such as maybe a number followed by something such as ":". i want to be sure this containment scheme cannot ever look like...
Skaperen News and Discussions 4 445 May-07-2024, 10:17 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020