I have below function & I am trying to get/store the contents of text file in another temp file(removing unnecessary line) with appending special character. But I also want the same content which is in temp text file with different special character next time but I am not able to do that.Below function is creating a temp file.To get desired
Tag: python-3.x
Pass multiple variables from one module to another
I have several modules in the folder “Programm/modules” which are called by another script in “Programm”. One for example looks like this: “calculate.py” this I would like to load into another module “print.py” But I get the error “ModuleNotFoundError: No module named ‘calculate'” What’s wrong? EDIT Thx guys, I can now load the module with: And I changed the return
Encountering Fatal Python error when I try to use pip in command prompt
I am a new programmer who is trying to follow this tutorial about pip. In the tutorial, you are asked to go into command prompt and type ‘pip’. You are supposed to get a list of general options and commands. However, when I type pip in my command prompt, I get this instead: (I am using Windows 10 and Python
How can I make a commmand that goes through a txt file and sends the text that i need?
Im trying to make an api key thingy in discord but i don’t know how to go through txt files one by one for ex test test2 test3 test4 If the first user sends !key it would send test if the 2nd user sends !key it would send test2.And so on. this is what i’ve made so far: But im
Could this selenium code be recreated using scrapy?
I’m interested in getting a better idea of what scrapy can do. Here is a very simple selenium code that interacts with a website, fills in some boxes, clicks some elements and downloads a file. Could this code be replicated using scrapy?, so that a code is written using scrapy that does the exact same thing. Answer “selenium code be
Plotly Text Annotation shows the same text throughout
I am trying to show the text on the bars based on some filtered data but the text shows the same value for the last item in the list. I can’t seem to find out what the issue is because display_texts itself gives me what I expect Answer You should remove texttemplate=display_texts and add text=display_texts to px.bar.
Is there a way to target a particular item in a list if it is not the first item [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 10 months ago. Improve this question So this is the issue: I want the function to print ‘yes’ as long as P0 is in the list(irrespective of whether P58 is in
Python module Wikipedia producing the wrong answer
Code It for some reason changes einstein family to epstein family and i have no idea why does anyone know why this error occurs? Answer Change the to I was looking through the wikipedia.py file and found that auto_suggest can change your RESULTS[i] to a close approximation and so by turning it to False it stops that and gives me
globas and exec in python
I have written code, to create variable and assign values using for loop. but I am getting result as None but even I tried to change the code with below modification, still getting the same Can some one help me to get the proper answer for this. Note: even I used exec function in the place of name (ex: exec(f'{names[num]}’)
How do I install GNU Radio in a Python virtualenv
I am trying to get gnuradio to work in a virtualenv. I want to keep my system somewhat clean and my project needs Python 3.9, but my system Python is 3.8 (Ubuntu 20.04.4 LTS). I install it using sudo apt install gnuradio, but then it ends up in the system dist-packages and I can’t import it in my virtualenv. The