Title: Electrum appImage console Post by: browser528 on February 24, 2021, 12:53:52 PM Hej
I have a running Electrum Wallet and have started the Console and I have a prompt Please give me some explanation of what is the explanation of the text ans its meaning. Please use as simple/basic answer as possible. regards >>> 1+2 3 >>> then I do, with less success >>> my_private_key = random_key() Traceback (most recent call last): my_private_key = random_key() ^ SyntaxError: invalid syntax During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/.mount_electr163Txz/usr/lib/python3.7/site-packages/electrum/gui/qt/console.py", line 262, in exec_command exec(command, self.namespace, self.namespace) File "<string>", line 1, in <module> NameError: name 'random_key' is not defined >>> Title: Re: Electrum appImage console Post by: mocacinno on February 24, 2021, 01:01:34 PM Where did you get the console function random_key()?
It doesn't seems to be a function from electrum... https://github.com/spesmilo/electrum/search?q=random_key Code: >>>commands() Title: Re: Electrum appImage console Post by: browser528 on February 24, 2021, 05:31:23 PM It comes from a try to do
Pip install bitcoin from bitcoin import * Maybe stupid but anyhow a try. Is the cause of the missing function that this console can not import other libraries or is the appimage as such that not allow importing. regards Title: Re: Electrum appImage console Post by: mocacinno on February 25, 2021, 06:36:32 AM that is, in fact, a good question.... To be honest, i've never tried to import modules from electrum's console.
When trying right now, i had a similar experience, so you're probably correct in saying you cannot import external modules in electrum's console... Maybe we can leave this thread open to see if ThomasV has some additional info about this? Title: Re: Electrum appImage console Post by: ABCbits on February 25, 2021, 01:27:57 PM You got me curious, so i downloaded Electrum 4.0.9 AppImage and tried importing few library and here's the result
1. Importing built-in library shows no problem Code: >>> import sqlite3 2. Importing library required by Electrum (https://github.com/spesmilo/electrum/blob/master/contrib/requirements/requirements.txt (https://github.com/spesmilo/electrum/blob/master/contrib/requirements/requirements.txt)) shows no problem either Code: >>> import qrcode 3. Importing library installed with pip command shows same error Code: >>> import jellyfish However trying same thing with Electrum installed with pip from source code shows no problem. Code: >>> import jellyfish I think Electrum AppImage have it's own python and isolated from python or python library installed your OS. Title: Re: Electrum appImage console Post by: browser528 on February 26, 2021, 03:03:05 PM Thanks for your curiosity and efforts . I will definetely wait for some explanations.
Do you think an standard install without not using the appImage wallet would give other import possibilities. Or, do you think the the appimage is type of a 'virtual OS' and that the same is true for the wallet as such also. That was some questions and while on my way...... Can you locate some wallet program example for me to look at. Best regards Title: Re: Electrum appImage console Post by: HCP on February 27, 2021, 07:51:12 AM Can I ask why you need/want to be able to import modules on the Electrum console? ??? It's really not the place to be writing raw python code! :o
If you need to be creating a Python script, go ahead and create a Python script and then run it using Python... :P Title: Re: Electrum appImage console Post by: browser528 on February 27, 2021, 07:45:26 PM This is a hard question and I am not quite sure I can give a good answer , because the thoughts have a tendency to live its own life without a good thinking behind. However it started when I realised that installing an appImage was quite easy compared to other Linux installations where the screen is flashing with lines and lines and lines some of them in red which is very scary for an old fashioned Win user. I also had in mind that the appimage could be kind of VirtualBox installation isolated from rest of the OS. Further down the line of muddled thougths , wallet transactions would be sent at certain conditions such as date , time, low transaction fees........all this programmed into a wallet. regards |