Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

here is a script i have made into a command named zhash on my laptop that uses zopen. http://ipal.net/python/zhash.py this command hashes each file in an uncompressed form even if it is compressed in ...
Skaperen News and Discussions 22 589 Jul-30-2021, 12:02 AM
    Thread: python3 vs python
Post: python3 vs python

are we ever going to use the name "python" (without the "3") as an alias/equivalent for "python3" in the context of the name of the executable? or will this be left up to the platform builder?
Skaperen News and Discussions 4 169 Jul-28-2021, 01:12 AM
    Thread: post error from cloudflare
Post: RE: post error from cloudflare

i'm not suggesting to not use them. maybe i want to, too. there might be an issue like it happens when the client is too slow which can happen when TCP is recovering a lost packet. just curious if ...
Skaperen Board 4 232 Jul-26-2021, 06:05 PM
    Thread: chopping a bytearray
Post: RE: chopping a bytearray

my aged memory must be corrupt and mixed that up with the system call. i like the distinct function idea. i will do that. i could even add that as a method for my zopen and ztopen classes.
Skaperen News and Discussions 2 184 Jul-25-2021, 11:47 PM
    Thread: post error from cloudflare
Post: RE: post error from cloudflare

i'm wondering how good their network is. or maybe something is bad about mine. i've also gotten these a few times on LinuxQuestions.org.
Skaperen Board 4 232 Jul-25-2021, 11:39 PM
    Thread: post error from cloudflare
Post: post error from cloudflare

how often to you get a post error from cloudflare when posting a reply or new thread here? what do you do when that happens?
Skaperen Board 4 232 Jul-23-2021, 01:12 AM
    Thread: chopping a bytearray
Post: chopping a bytearray

i have a large bytearray that i am writing to disk. i expect in most cases it will write the entire array in one call to binaryoutputfile.write(mybytearray). but, sometimes, there can be system cond...
Skaperen News and Discussions 2 184 Jul-23-2021, 01:08 AM
    Thread: maybe, maybe not
Post: maybe, maybe not

ha ha, i just ran across a case where i wanted to code a bool value of Maybe. maybe i should rethink this script. i already use None so it will have to be something else. i'm thinking ...
Skaperen Bar 1 181 Jul-22-2021, 12:03 AM
    Thread: while handling this exception, another ...
Post: while handling this exception, another ...

i have try/except within a higher except which if properly coded seems to work. how deeply can i nest try/except in the except handlers?
Skaperen News and Discussions 0 121 Jul-21-2021, 11:54 PM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

right. i am thinking i should just have functions zopen, ztopen, and topen to pass the varying parameters to the class. the difficulty is the complex relation of the file name to the sequence of (de...
Skaperen News and Discussions 22 589 Jul-21-2021, 10:29 PM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

the intention is to provide an instance that is appropriate for the particular file. if an instance of io.IOBase is appropriate, that's what should be returned. but, an instance of this class may be...
Skaperen News and Discussions 22 589 Jul-21-2021, 03:14 PM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

normally foo just means something arbitrary. in this case it was the class the caller was expecting to get an instance of, the method which would choose to make an instance of some other class that c...
Skaperen News and Discussions 22 589 Jul-21-2021, 02:57 AM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

what is the difference between object and cls? what i was expecting was foo.__new__() to make a new instance of foo.
Skaperen News and Discussions 22 589 Jul-20-2021, 01:20 AM
    Thread: sorting with numbers in text
Post: RE: sorting with numbers in text

i don't want to sort the numbers, exclusively. i want to sort what is between them ... ASCIIbetically for now ... too. Output:alpha2 alpha1234bar alpha1234foo beta gamma xyzzy delta virus
Skaperen News and Discussions 5 495 Jul-20-2021, 01:15 AM
    Thread: sorting with numbers in text
Post: RE: sorting with numbers in text

next: tobesorted = ['one trillion seven hundred million two','three hundred billion fifty five thousand twelve']
Skaperen News and Discussions 5 495 Jul-19-2021, 10:42 PM
    Thread: sorting with numbers in text
Post: RE: sorting with numbers in text

nice! what i did in C was just deal with the numbers. they were compared in such a way that the shorted number was prefixed by enough '0' characters to make it be the same length as the longer one. ...
Skaperen News and Discussions 5 495 Jul-19-2021, 10:30 PM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

i'm still a bit confused with that code. it's more about the __new__() method. i don't understand passing cls to it. all i need is a method with no args. i am reading docs for 3.7 and coding for 3...
Skaperen News and Discussions 22 589 Jul-19-2021, 10:06 PM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

so you want to see code. this is big, so i am not going to post it here. instead, you get a link: http://ipal.net/python/zopen.py [502 lines. 23122 bytes] this code is not finished but it is working...
Skaperen News and Discussions 22 589 Jul-18-2021, 01:57 AM
    Thread: class needs to refer a different class
Post: RE: class needs to refer a different class

(Jul-17-2021, 07:42 PM)ndc85430 Wrote: I'm confused about what you're trying to do then (Jul-17-2021, 07:42 PM)Yoriz Wrote: (Jul-16-2021, 06:19 AM)Yoriz Wrote: Are you able to show approximately...
Skaperen News and Discussions 22 589 Jul-18-2021, 01:20 AM
    Thread: sorting with numbers in text
Post: sorting with numbers in text

back when i coded in C, i implement a sort function that worked with key strings (C style) that could have a common pattern of numbers within each string, where the number of digits in each number cou...
Skaperen News and Discussions 5 495 Jul-17-2021, 11:48 PM

User Panel Messages

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