Go to advanced search

by Canedje
Sun Nov 06, 2016 3:56 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

I indeeed now using pymysql
It is working fine

I changed my standard mysql import in:

Code: Select all

import pymysql as mdb
mdb.install_as_MySQLdb()
After that it is running like mysql
by Canedje
Sun Nov 06, 2016 1:16 pm
Forum: Beginners
Topic: difference sudo vs gksudo?
Replies: 5
Views: 1575

Re: difference sudo vs gksudo?

thanks
that explains it to use it for a x window command
by Canedje
Sun Nov 06, 2016 12:51 pm
Forum: Beginners
Topic: difference sudo vs gksudo?
Replies: 5
Views: 1575

difference sudo vs gksudo?

What is the difference between the gksudo and sudo command?
by Canedje
Sun Nov 06, 2016 12:49 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

Solution found again.

use gksudo command instead of sudo
by Canedje
Sun Nov 06, 2016 12:42 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

Strange.
The other day I did try to use the HDMI connection again from ssh mode
It will not work anymore and also not get it operational again?

Help again?
by Canedje
Sun Nov 06, 2016 10:32 am
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

Thanks. This is a help
by Canedje
Sat Nov 05, 2016 8:50 pm
Forum: Troubleshooting
Topic: how automatic desktop login at startup
Replies: 2
Views: 909

how automatic desktop login at startup

In raspi-config you have 4 options how to start up at reboot.
there are two options for desktop GUI.
Automatic as pi or with different user and loging.

Is it possible to have also an automatic login as a different user then the standard pi login?
by Canedje
Sat Nov 05, 2016 8:40 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

I did found the solution. First you need to start up in GUI mode after reboot You need to enter the GUI mode under the same login as the ssh connection (not the standard pi or you are logged in as pi at the ssh also) then you need to execute at the ssh connection the command: export DISPLAY=:0.0 Thi...
by Canedje
Sat Nov 05, 2016 7:49 pm
Forum: Troubleshooting
Topic: Tkinter execute from ssh gives error
Replies: 1
Views: 1137

Tkinter execute from ssh gives error

I do have a ssh connection to my RPI3. I did write a small and easy Tkinter program by the ssh connection: from Tkinter import * # if you are working under Python 3, comment the previous line and comment out the following line #from tkinter import * root = Tk() w = Label(root, text="Hello Tkinter!")...
by Canedje
Fri Nov 04, 2016 10:57 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

Thanks.

I do more or less what is mentioned over there:

I did read something on internet:

that the error is because that the RPI cannot find the Display device.

It can be fixed by making a ssh -X connection.
I do use putty for my ssh connection. How do i make a ssh -X connection with Putty?
by Canedje
Fri Nov 04, 2016 10:27 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

Thanks for the answer. I tried all: running: sudo python3 gui.py python3 gui.py sudo python gui.py python gui.py Changing in the code Tkinter in tkinter depending onde python version. All the same result: Traceback (most recent call last): File "gui.py", line 5, in <module> root = Tk() File "/usr/li...
by Canedje
Fri Nov 04, 2016 10:08 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

I tried by using the next command: sudo apt-get install python3-mysqldb It said: Package python3-mysqldb is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source So this is not working I also trie...
by Canedje
Fri Nov 04, 2016 9:57 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

Thanks again.
Again one step further.
Now I do receive an import error for:

Code: Select all

   import MySQLdb as mdb
ImportError: No module named 'MySQLdb'
I quess i need to install Mysql for python 3.4?
I tried to reinstall mysql by using several methods without succes
by Canedje
Fri Nov 04, 2016 9:30 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

Thanks this was the problem. No I do have a new problem. I'm using Tornado. This was installed under Python2.7 Now under Python 3.4 it is not in the directory. and generating the next error while compiling: Traceback (most recent call last): File "webservertst.py", line 2, in <module> import tornado...
by Canedje
Fri Nov 04, 2016 9:25 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

Re: help to start with tkinter

Thanks for the answer.
I do run it by "sudo python3 gui.py".
This will generate this error

Do I need to install something for an X-window display surrounding?
by Canedje
Fri Nov 04, 2016 8:47 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Re: Conversion python 2 to 3.4

Thanks.
So it is not allowed to mix both in the syntax of the line?
by Canedje
Fri Nov 04, 2016 8:39 pm
Forum: Python
Topic: Conversion python 2 to 3.4
Replies: 14
Views: 2159

Conversion python 2 to 3.4

I do try to run a python2 programm with python 3 compiler. I suddenly receive a lot of errors. for example: st = time.time() gives an error: sudo python3 webserver.py File "webserver.py", line 23 ts = time.time() ^ TabError: inconsistent use of tabs and spaces in indentation I really don't understan...
by Canedje
Fri Nov 04, 2016 7:52 pm
Forum: Python
Topic: help to start with tkinter
Replies: 11
Views: 3142

help to start with tkinter

I try to start to make a simpel GUI with tinker. I try to do the most simpel start: from tkinter import * # if you are working under Python 3, comment the previous line and comment out the following line #from tkinter import * root = Tk() w = Label(root, text="Hello Tkinter!") w.pack() root.mainloop...
by Canedje
Thu Oct 27, 2016 8:59 pm
Forum: Troubleshooting
Topic: mounting to other RPI not working
Replies: 4
Views: 653

Re: mounting to other RPI not working

Thanks.
I figured it out. It's working now!!
by Canedje
Thu Oct 27, 2016 8:34 pm
Forum: Troubleshooting
Topic: mounting to other RPI not working
Replies: 4
Views: 653

Re: mounting to other RPI not working

No that will be the problem.

How to create this set up the NFS share on the other Pi? Or where to find a good tutorial?
by Canedje
Thu Oct 27, 2016 8:14 pm
Forum: Troubleshooting
Topic: mounting to other RPI not working
Replies: 4
Views: 653

mounting to other RPI not working

I'll try to mount one RPI directory to an other RPI. I did create the directory: /mnt/PI and added a line into /etc/fstab: //192.168.2.185:/home/ewh /mnt/PI nfs rw 0 0 where "//192.168.2.185j :/home/ewh" is the mounted directory at the other RPI. After reboot or mount -a command there is still no mo...
by Canedje
Thu Oct 27, 2016 5:23 pm
Forum: Troubleshooting
Topic: Installing new RPI 3B problems
Replies: 4
Views: 652

Re: Installing new RPI 3B problems

I did read several posts around this subject and they are quit confusing. I do have it working now but I do think it orchanized in the wrong way. I did use both systems : /etc/network/interfaces. I configures this file like: auto lo iface lo inet loopback iface eth0 inet static address 192.168.2.187...
by Canedje
Thu Oct 27, 2016 4:06 pm
Forum: Troubleshooting
Topic: Installing new RPI 3B problems
Replies: 4
Views: 652

Re: Installing new RPI 3B problems

Epoch, thanks. The passwd problem is solved.

I don't understand how to use fixed adresses bij dhcpcd? Or how to remove it?
In my old RPI i used /etc/network/interfaces working fine?
by Canedje
Thu Oct 27, 2016 3:16 pm
Forum: Troubleshooting
Topic: Installing new RPI 3B problems
Replies: 4
Views: 652

Installing new RPI 3B problems

I just bought an extra RPI 3 B and trying to initiate it. I try to fix the ip adresses for wifi and eth using the same code as used in an older RPI 3 in /etc/network/interfaces. It lookes like: auto lo iface lo inet loopback iface eth0 inet static address 192.168.2.187 netmask 255.255.255.0 network ...
by Canedje
Fri Jan 15, 2016 10:28 pm
Forum: Troubleshooting
Topic: Thread removed???
Replies: 16
Views: 1261

Re: Thread removed???

You should also analyse how they gained access (probably userid=pi, password=raspberry, pi still has sudo and sudo still doesn't need a password). You should also assume, until you've checked, that EVERY device on your LAN is also compromised. I agree. I did change the password of pi in the past. N...

Go to advanced search