Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Parse String between 2 Delimiters and add as single list items
Post: RE: Parse String between 2 Delimiters and add as s...

(Apr-11-2021, 11:00 PM)bowlofred Wrote: (Apr-11-2021, 09:52 PM)lastyle Wrote: ouch my Bad, i posted to the wring Subcategory. My python version is 2.7.18 2.7 won't have f-strings. Just change the...
lastyle General Coding Help 5 445 Apr-11-2021, 11:03 PM
    Thread: Parse String between 2 Delimiters and add as single list items
Post: RE: Parse String between 2 Delimiters and add as s...

(Apr-11-2021, 09:41 PM)bowlofred Wrote: Except for not having brackets around it, this appears to be valid JSON. I'd add the brackets and parse as JSON. That will give you a list of dicts that you...
lastyle General Coding Help 5 445 Apr-11-2021, 09:52 PM
    Thread: Parse String between 2 Delimiters and add as single list items
Post: Parse String between 2 Delimiters and add as singl...

Hi all. I`ve got a big string that contains multiple different data. The dataitems are seperated by {data} I want to grab the data between theese 2 delimiters { and } and add them as a single item ...
lastyle General Coding Help 5 445 Apr-11-2021, 09:24 PM
    Thread: for x to y step from basic in Python
Post: RE: for x to y step from basic in Python

Thanks a lot, thats EXACTLY doing what i was looking for. I didnt understand the Range Startement and building. Now with that Solution i finally got the Idea how it`s working. CHEEERS!!!
lastyle Data Science 3 661 Aug-25-2020, 09:10 PM
    Thread: for x to y step from basic in Python
Post: for x to y step from basic in Python

Hi all, i previously asked for a Solution for a routine which compares two values and also does a step. It probably was explained to complicated to understand, so i coded the working Solution in Basi...
lastyle Data Science 3 661 Aug-25-2020, 06:05 PM
    Thread: while x < x and z not c
Post: while x < x and z not c

Hi all, i am in need of some guide ;-) The situation is : I have some files that contain Datasets of 5 records. now i want to re arrange the Files to contain e.g. 200 records. There is no need t...
lastyle Data Science 0 573 Aug-23-2020, 02:42 PM
    Thread: Convert Int Value bigger 256 to Unicode
Post: RE: Convert Int Value bigger 256 to Unicode

Fixed it myself. Sometimes its so easy,but you simply are to blind and dont notice its already a Function available def changeprg(): a = 0 fc = 0 lc = 1 lst3=[] addstr="" with io.open("ud- "+...
lastyle General Coding Help 4 819 Mar-19-2020, 11:48 AM
    Thread: Convert Int Value bigger 256 to Unicode
Post: RE: Convert Int Value bigger 256 to Unicode

(Mar-18-2020, 07:22 AM)DeaD_EyE Wrote: chr(4096) (Mar-18-2020, 07:28 AM)ndc85430 Wrote: Why do you have these mixed values in the first place? I need to exchange the content "PRG" with a Filecount...
lastyle General Coding Help 4 819 Mar-18-2020, 09:22 PM
    Thread: Convert Int Value bigger 256 to Unicode
Post: Convert Int Value bigger 256 to Unicode

Hi all, i need to save a list which contains mixed data of unicode and int values. I`d need to convert the int values before adding them to the list to unicode else the io.open moans that the values...
lastyle General Coding Help 4 819 Mar-17-2020, 11:07 PM
    Thread: Return all Values which can divided by 9
Post: RE: Return all Values which can divided by 9

(Mar-16-2020, 12:10 PM)scidam Wrote: I can give you a hint. If a number n is divisible by m without rest, n % m = 0. Try the following examples 9 % 9 18 % 9 27 % 9Hope this helps. Yep, thx a lot, di...
lastyle General Coding Help 2 579 Mar-16-2020, 09:22 PM
    Thread: Return all Values which can divided by 9
Post: Return all Values which can divided by 9

Hi all i am searching for a funtion or simmilar solution that returns if a value can be divided by 9 without rest. I was trying with Modulo operation but this didnt give me the correct result for n...
lastyle General Coding Help 2 579 Mar-16-2020, 11:57 AM
    Thread: Replace Bytes in File between Value X and Y with Z
Post: RE: Replace Bytes in File between Value X and Y wi...

(Feb-04-2020, 06:35 PM)Larz60+ Wrote: What have you tried so far? to be honest, nothing. I dont know which function i should use for a compare between value x and y In vb.net i am more experienced ...
lastyle Data Science 3 901 Feb-04-2020, 07:52 PM
    Thread: Replace Bytes in File between Value X and Y with Z
Post: Replace Bytes in File between Value X and Y with Z

Hi all I`ve got a File that contains different Byte Values and i need some of them to be exchanged. Idea is to read the entire File into an Array and then using a routine like : If byte Value is be...
lastyle Data Science 3 901 Feb-04-2020, 04:56 PM
    Thread: Read file Into array with just $0d as Newline
Post: RE: Read file Into array with just $0d as Newline

I was testing with this the Evening and it seems that i need to Convert the messy foreign c64 Chars to UTF before processing by the Script. So my thought was to parse the whole textfile and replace t...
lastyle Data Science 5 1,173 Feb-03-2020, 11:58 PM
    Thread: Read file Into array with just $0d as Newline
Post: RE: Read file Into array with just $0d as Newline

This is looking good so far. But the unicode mess is from the System where it comes from and sadly has to be saved later on aswell else the names wont be displayed properly To be specific. The file c...
lastyle Data Science 5 1,173 Feb-03-2020, 05:09 PM
    Thread: Read file Into array with just $0d as Newline
Post: RE: Read file Into array with just $0d as Newline

(Feb-03-2020, 04:37 AM)Larz60+ Wrote: just strip it off, it's not really needed for line in lines: line = line.strip()I tried this before but this results in a single line that contains just 75...
lastyle Data Science 5 1,173 Feb-03-2020, 11:54 AM
    Thread: Read file Into array with just $0d as Newline
Post: Read file Into array with just $0d as Newline

I have a Textfile that contains several Lines, but just contains $0d as new Line instead of $0d $0a When i load this into a List with with open(filename)as f: lines =f.readlines() p...
lastyle Data Science 5 1,173 Feb-02-2020, 10:58 PM
    Thread: get "Birthdate" from File inside a Zipfile
Post: get "Birthdate" from File inside a Zipfile

I am using the zipfile Module to extract and detect the Birthdate of a file inside a Zip, but as soon as i extract the file to get the Date from the File i recieve the current Date when the File was e...
lastyle Data Science 0 507 Jan-05-2020, 12:34 AM
    Thread: Search file with *filename* python 3.8
Post: RE: Search file with *filename* python 3.8

(Dec-22-2019, 02:29 PM)snippsat Wrote: (Dec-22-2019, 12:01 PM)lastyle Wrote: But os.Path.Isdir returns the complete pathNo it return True or False,it dos a test if it's a folder and that folder ex...
lastyle Data Science 13 2,689 Dec-22-2019, 11:13 PM
    Thread: Search file with *filename* python 3.8
Post: RE: Search file with *filename* python 3.8

But os.Path.Isdir returns the complete path. So I need to check if the return value if it contains bestfile.
lastyle Data Science 13 2,689 Dec-22-2019, 12:01 PM

User Panel Messages

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