Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Oct 4, 2020 19:13
@MattDMo thank you!
Oct 4, 2020 19:04
@MattDMo thank you, i will check that
Oct 4, 2020 18:58
@AndrasDeak i checked the author's online converter https://striprtf.dev/ , but its not working
is there any other python modules to convert rtf to txt
Oct 4, 2020 18:43
I tried to read the documentation github.com/joshy/striprtf , but i can't find any examples regarding headers/footers
Oct 4, 2020 18:36
Hi
I have a rtf file with header and footer in every page, im trying to convert the rtf to txt format
I'm using striprtf module to convert rtf to txt format, but its not printing the header and footer part while printing,
is there any way to print header and footer part.
im using this code
`from striprtf.striprtf import rtf_to_text
rtf = open(file.rtf,'r').read()
text = rtf_to_text(rtf)
print(text)
`
Oct 3, 2020 13:47
@VisheshMangla okay, thank you
Oct 3, 2020 13:42
@VisheshMangla open and .read() functions are working.
Im trying to read and compare two rtf files, also i wanted ignore some string values while comparing (i dont knw whether i can do that).
Oct 3, 2020 13:10
Hi,
I'm looking for python modules to read .rtf files,
please give me some suggestions
Jul 15, 2020 05:21
@metatoaster I tried this `f = open(dir_val.get() + os.sep + fname,'r',encoding="utf-8",errors="ignore")` and its working.
I will do more research and be more clear before posting a questions, from now on.
Thank you!!
Jul 15, 2020 05:02
I'm sorry, I'm not aware of the indentation.
I will try passing the encoding argument to open.
Jul 15, 2020 04:46
Hello!!
I posted a question on main site, its been 2 days and I didn't get any solutions,
Please give me some suggestions regarding this.
https://stackoverflow.com/q/62862439/12955442
Jul 13, 2020 06:32
@roganjosh I read the room rules, I will be following the room rules from now on!
Thank you
May 18, 2020 14:45
@MisterMiyagi okay understood
May 18, 2020 14:36
okay
May 18, 2020 14:31
Hi,
What should i use to get a file creation time in both windows and linux.
Im using 'getctime' in windows, but it brings the modified time in linux.
May 9, 2020 08:38
okay
May 9, 2020 08:37
thank you so much
May 9, 2020 08:36
so i can use the if condition like this,
`if (re.search(rf"\b(?=\w){re.escape(var1)}\b(?!\w)", s, re.IGNORECASE)) and (re.search(rf"\b(?=\w){re.escape(var2)}\b(?!\w)", s, re.IGNORECASE)):`
May 9, 2020 08:23
sure, thank you
May 9, 2020 08:22
im searching this in a excel sheet.
i need something like, if both val1 and val2 values present in a cell #do something...
i have to use regex because it may contains any alphanumeric in excel cell.
need to know whether var1 and var2(both) present atleast once
May 9, 2020 08:07
okay thank you!
May 9, 2020 08:00
Hii,
I have some doubts on python regex.
I'm using re.search using the variables(var1 and var2).
(re.search(rf"\b(?=\w){re.escape(var1)}|{re.escape(var2)}\b(?!\w)", s, re.IGNORECASE)
is that possible to search(re.search) both var1 and var2 values, instead of using or(|) operator.

question link: https://stackoverflow.com/questions/61680523/using-multiple-variables-with-regex-in-python
Apr 1, 2020 09:02
No i didnt, i will try that now, thank you.
Apr 1, 2020 09:01
yeah the error is at the end
Apr 1, 2020 08:58
The code should generate the output in the html file.
as exe file program asks for the input it runs fine and even it prints the output in the console.

error :Failed to execute script
but at the end error is like failed to execute the script
Apr 1, 2020 08:31
HI,
i created a py.exe using pyinstaller but my program is not getting executed.
Generally my code is running fine, but as a exe file its not running.
please give me some suggestions.
Mar 31, 2020 16:58
Hii
Im using pyinstaller to create a python exe file, some exe files are working and some exe files are not running.
Is there any other ways to generate a python exe file.
I need to run the python exe file in a pc where python is not istalled.
Any suggestions please.
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Aug 6, 2020 19:46
no, not in node.js
Aug 6, 2020 19:42
hai
i have some doubts on rsa encryption in javascript.
i have a public key generated in x.509 format,which is encoded with a Base64.
so what are the javascript libraries i should look for, to decode the public key and then encrypt as RSA public key
please give some suggestions.
Im still learning about these concepts, i hope the question is not bad.
Thank you!
 

 Python Ouroboros - The Rotating Knives

Messages from the Python room that didn't meet our standards o...
Jul 13, 2020 04:56
Hii,
please give some guidance to this
https://stackoverflow.com/q/62862439/12955442