Go to advanced search

by paddyg
Sun Sep 29, 2013 8:54 am
Forum: Python
Topic: RaspberryPi python code not working with xively
Replies: 12
Views: 2142

Re: RaspberryPi python code not working with xively

Well there's lots of stuff about getting python scripts to run automatically at start up so you probably can find out from posts like this: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=37&t=49153 What I would do is put a python oneliner 'hello world' script into my autorun and get that working,...
by paddyg
Thu Sep 26, 2013 9:57 am
Forum: Python
Topic: GCalCron2 (Google Calendar Crontab GUI) Python Errors
Replies: 5
Views: 3235

Re: GCalCron2 (Google Calendar Crontab GUI) Python Errors

the line it doesn't like is trying to execute a command line $ at TIME.. on my pi 'at' doesn't seem to exist and I get '-bash: at: command not found' you need to enable the at command for your script to work. The problem is that 'at' is basically impossible to search for on google so I suspect all y...
by paddyg
Thu Sep 26, 2013 7:19 am
Forum: Python
Topic: RaspberryPi python code not working with xively
Replies: 12
Views: 2142

Re: RaspberryPi python code not working with xively

well you could search your code for the word 'while' or just inspect it. I just pasted your code into geany and there were line numbers, but if you look down your listing, towards the end you have # Listing the temps in the window, delete read_temp2() if needed while True: print(read_temp1(), read_t...
by paddyg
Tue Sep 24, 2013 7:17 pm
Forum: Python
Topic: [SOLVED] [Errno 97] Address family not supported by protocol
Replies: 8
Views: 27700

Re: [Errno 97] Address family not supported by protocol

good sleuthing. I did have a suspicion along those lines "..or router port forwarding or firewall or.." but hedged myself by suggesting everything else as well!
by paddyg
Tue Sep 24, 2013 7:13 pm
Forum: Python
Topic: Python and VisualStudio
Replies: 2
Views: 2753

Re: Python and VisualStudio

I think you can use iron python on visual studio and you could then run the .NET stuff on the pi with mono. Possibly! But why not just use c# if you really, really want to use vs (it is 1,000% nicer to use than eclipse or geany etc but at what cost) python ought to be transferable. i.e. get it worki...
by paddyg
Tue Sep 24, 2013 5:51 pm
Forum: Python
Topic: [SOLVED] [Errno 97] Address family not supported by protocol
Replies: 8
Views: 27700

Re: [Errno 97] Address family not supported by protocol

Hmm. Just to eliminate a host of variable causes I have set up an email for you on my mail server (no charge!*). Try this on your pi. import imaplib IMAP_SERVER='eldwick.org.uk' IMAP_PORT=993 try: M = imaplib.IMAP4_SSL(IMAP_SERVER, IMAP_PORT) rc, resp = M.login('jdmoore@eldwick.org.uk', 'jdmoore') p...
by paddyg
Tue Sep 24, 2013 2:12 pm
Forum: Python
Topic: RaspberryPi python code not working with xively
Replies: 12
Views: 2142

Re: RaspberryPi python code not working with xively

well I would have thought you still wanted to return the actual temperature from the function... However the other thing that looks odd is that you have a loop forever just printing None, read_temp2() the code after this will never execute so it seems odd to have a sleep at the end with a comment th...
by paddyg
Tue Sep 24, 2013 1:57 pm
Forum: Python
Topic: [SOLVED] [Errno 97] Address family not supported by protocol
Replies: 8
Views: 27700

Re: [Errno 97] Address family not supported by protocol

Yes you probably do need SSL for imap.gmail.com but worth trying alternatives and seeing what difference it makes to the error message! It seems like you're definitely getting a mail server type response so I would say imaplib is fine but the server doesn't like the email address or port or router p...
by paddyg
Tue Sep 24, 2013 8:25 am
Forum: Python
Topic: Stuck with C/C++ library and my project is Python
Replies: 11
Views: 7257

Re: Stuck with C/C++ library and my project is Python

@Anti, RF24 is the cpp class. From @DrMag's comment, "If you pursue the ctypes route, it looks like the next step will be to build the C wrappers" how did that go?
by paddyg
Tue Sep 24, 2013 8:16 am
Forum: Python
Topic: RaspberryPi python code not working with xively
Replies: 12
Views: 2142

Re: RaspberryPi python code not working with xively

can't test it without the hardware and xively account but on quick look I see that read_temp1() doesn't actually return temp_r so it will return the default value None You will notice that this is very hard to tell from your original posting as it's not possible to tell where the def read_temp1 bloc...
by paddyg
Tue Sep 24, 2013 8:02 am
Forum: Python
Topic: reading table contents error
Replies: 3
Views: 659

Re: reading table contents error

sounds like it's something wrong with your sql statements if it appears to connect to the database and obtain a cursor ok. Could be lots of things. Did 'INSERT' and 'UPTDATE' work? Have you tried creating and populating another table from python? Could you 'SELECT' from that table? Post your *actual...
by paddyg
Mon Sep 23, 2013 10:19 pm
Forum: Python
Topic: [SOLVED] [Errno 97] Address family not supported by protocol
Replies: 8
Views: 27700

Re: [Errno 97] Address family not supported by protocol

your code works verbatim for me if I use my mail server, email address and password. Have you tried it with just IMAP rather than the secure socket version?
by paddyg
Mon Sep 23, 2013 7:41 pm
Forum: Python
Topic: Getting python to register a key input.
Replies: 1
Views: 681

Re: Getting python to register a key input.

I think the curses getch works ok.

Make an absolutely minimal program, basically just import and start curses, maybe switch the delay off then loop until you get a certain key. Printing whatever key is pressed. If it doesn't work post the code here (in Code block) and someone will spot the error
by paddyg
Mon Sep 23, 2013 7:16 pm
Forum: Python
Topic: Error with Unicode
Replies: 7
Views: 2113

Re: Error with Unicode

have you tried string.encode("latin-1") or something similar. I would have thought that might fix your UnicodeEncodeError: 'ascii' codec can't encode character xyz: ordinal not in range(128) of course if you need the unicode characters in your database you will have shot yourself in the foot and you...
by paddyg
Mon Sep 23, 2013 4:30 pm
Forum: Python
Topic: RaspberryPi python code not working with xively
Replies: 12
Views: 2142

Re: RaspberryPi python code not working with xively

ARE YOU LISTENING MODERATORS? I think there should be a sticky at the top of the python (crucially, but any language is a misery to read without indented blocks) section of this forum.. @J2Bink After you have copy pasted your code into your post, highlight it all then click on the Code button above...
by paddyg
Mon Sep 23, 2013 4:16 pm
Forum: Python
Topic: Error with Unicode
Replies: 7
Views: 2113

Re: Error with Unicode

@Feersum that seems to work ok both on this ubuntu and on the pi (once I change false to False) python2 and python3 (once I change print to print()). So not really clear what's causing the problem on your setup if that really is the total of the script you're running. Getting pi3d to work with py3 t...
by paddyg
Sun Sep 22, 2013 5:41 pm
Forum: Python
Topic: Space Roaming Text Based RPG: Nebulaic Toaster
Replies: 6
Views: 1272

Re: Space Roaming Text Based RPG: Nebulaic Toaster

I have to chuckle when I see

Code: Select all

class Actions
by paddyg
Sat Sep 21, 2013 7:46 pm
Forum: Python
Topic: Multiple GPIO.add_event_detect, one callback function
Replies: 18
Views: 42143

Re: Multiple GPIO.add_event_detect, one callback function

I suspect it's not the intended behaviour of this system, as the event detection appears to pass the pin number... However I tried all ways to get this to work and in the end the only thing was to have a different function for each pin! Essentially they were all the same function but different names...
by paddyg
Thu Sep 19, 2013 9:19 pm
Forum: Troubleshooting
Topic: Having trouble displaying an problematic website
Replies: 5
Views: 1191

Re: Having trouble displaying an problematic website

Don't know how much control you have over the way the website works (It doesn't work on my desktop, XP+firefox) If the 3D models are available from a url as .obj files then pi3d would happily load and display them interactively.
by paddyg
Sun Sep 15, 2013 3:42 pm
Forum: Python
Topic: Share variables with few instances of python
Replies: 1
Views: 438

Re: Share variables with few instances of python

you could just read and write from files. you might need to use filelock if that matters. If speed is an issue could you run each program as a subprocess of a managing program and pipe stdin and stdout? Though why you would do that (rather than make them part of the same package) I don't know.
by paddyg
Wed Sep 11, 2013 11:24 pm
Forum: Graphics, sound and multimedia
Topic: 3D objects dance to FFT output from mpg321
Replies: 0
Views: 462

3D objects dance to FFT output from mpg321

vaguely apropos multiscreen video thread, some more effect shaders added to pi3d.
Untitled.jpg
Untitled.jpg (30.48 KiB) Viewed 462 times
by paddyg
Wed Sep 11, 2013 1:55 pm
Forum: Python
Topic: pi3d: paths and importing pi3d module for program
Replies: 14
Views: 3056

Re: pi3d: paths and importing pi3d module for program

Well thanks anyway for sticking with it. After your previous questions I decided we ought to sort out the structure so it could be laid out in the way you were attempting. The problem was that the resources that the demos used were all muddled in with the rest of pi3d so I have now split them out. T...
by paddyg
Tue Sep 10, 2013 9:03 pm
Forum: Graphics, sound and multimedia
Topic: Rpi Video Wall
Replies: 18
Views: 9899

Re: Rpi Video Wall

The issue of video splitting also seemed like it would be a problem to me so I thought that, as pi3d has a camera object with direction vectors but also field of view angle, It should be possible to render the same objects the the same virtual x,y,z location on each pi but 'point the camera' in a di...
by paddyg
Tue Sep 10, 2013 4:44 pm
Forum: Graphics, sound and multimedia
Topic: Rpi Video Wall
Replies: 18
Views: 9899

Re: Rpi Video Wall

@powertieke I was just wondering about using pi3d split over several screens. leconeur is doing some shader development and starting to play with pi3d, presumably he could benefit from a wall of screens system. Interesting to see how you get on. Your code looks fine but a complete absence of comment...

Go to advanced search