Go to advanced search

by yvonnezoe
Thu Mar 14, 2013 8:19 am
Forum: Python
Topic: webserver frontend with Python
Replies: 33
Views: 12595

Re: webserver frontend with Python

Hello mefarmer! Thank you for sharing this with us. :D
so i've downloaded cherrypy and run it on my window...

Code: Select all

python setup.py install
ok, done. What's next? :o
by yvonnezoe
Thu Mar 14, 2013 12:32 am
Forum: Python
Topic: webserver frontend with Python
Replies: 33
Views: 12595

Re: webserver frontend with Python

I have used several frameworks to build web based frontends and many are suitable for beginners. Cherrypy is a nice simple framework that can be used by itself or used behind apache if you need to scale it up. Flask and bottle are also nice. Web2Py is an amazing piece of software and i have written...
by yvonnezoe
Thu Mar 14, 2013 12:31 am
Forum: Python
Topic: webserver frontend with Python
Replies: 33
Views: 12595

Re: webserver frontend with Python

My favourite framework is Karrigell. I still prefer version 3.x with Python 2.7, but there is also a version 4 for Python 3. It contains a small standalone webserver, which is good enough for most purposes, but can also run behind Apach2 or lighttpd (my favourite). Creating applications with it is ...
by yvonnezoe
Thu Mar 14, 2013 12:28 am
Forum: Python
Topic: webserver frontend with Python
Replies: 33
Views: 12595

Re: webserver frontend with Python

If you are finding web2py a bit large, you could try one of the smaller frameworks. I built a tiny webapp using flask http://flask.pocoo.org/ the other week. I found it straightforward and extremely well documented. I haven't run it on the pi yet, though. Thanks for the suggestion! will try it out ...
by yvonnezoe
Wed Mar 13, 2013 6:27 am
Forum: Networking and servers
Topic: Sending commands using NETCAT or scapy or any other
Replies: 5
Views: 2281

Re: Sending commands using NETCAT or scapy or any other

If coding up a socket application in C is a beyond your abilities, I really think a web interface would be easiest and certainly most reliable. It would take much to write a script to encode your text, eg: <STX>LI1234<CR> becomes 0x03LI12340x13 Then call: wget http://yourserver/commands.php?CMD=0x0...
by yvonnezoe
Wed Mar 13, 2013 6:25 am
Forum: Python
Topic: webserver frontend with Python
Replies: 33
Views: 12595

Re: webserver frontend with Python

pocster wrote:Hey all,

Just found Web2Py - looks the business!!!! :P :P :P
hey how is your progress with web2py? i have got it run as a webserver but i have no idea what to do next! As in, the model and structures are in a 500 pages manual and how am i suppose to digest it! :O
by yvonnezoe
Mon Mar 11, 2013 9:05 am
Forum: Networking and servers
Topic: Sending commands using NETCAT or scapy or any other
Replies: 5
Views: 2281

Re: Sending commands using NETCAT or scapy or any other

Define "communicate"? If the commands you're trying to send are literally shell commands, SSH is what you want. If it's some sort of protocol you designed yourself, you'll need to either: Start developing socket code Move this project to a web format and start passing commands as POST variables tha...
by yvonnezoe
Mon Mar 11, 2013 12:50 am
Forum: Networking and servers
Topic: Sending commands using NETCAT or scapy or any other
Replies: 5
Views: 2281

Sending commands using NETCAT or scapy or any other

Hello everyone! I have connected my Raspberry Pi to another device using ethernet. I have installed Netcat and managed to send command from R-Pi terminal to communicate with the device. No instead of sending one command at a time, i hope to write a script or something so that certain actions can be ...
by yvonnezoe
Tue Mar 05, 2013 12:33 am
Forum: General programming discussion
Topic: Need help with Mercurial
Replies: 13
Views: 3176

Re: Need help with Mercurial

When you install a program using apt-get, you are installing it so that all users on the system can use it. In order to do that, you need root permissions, otherwise any ordinary user could, for example, substitute the netcat program with a keylogger. However, the file will be installed as executab...
by yvonnezoe
Mon Mar 04, 2013 8:58 am
Forum: Networking and servers
Topic: Serial communication over Ethernet
Replies: 2
Views: 3679

Serial communication over Ethernet

I just installed Netcat and PackETH. can anyone give me a clue on how to get started with it? i have looked through a few tutorials such as http://www.adamsinfo.com/netcat-tutorial-for-linux-windows-howto-nc/ i know my destination IP address and port number but i just couldn't connect to it. i tried...
by yvonnezoe
Mon Mar 04, 2013 7:54 am
Forum: General programming discussion
Topic: Need help with Mercurial
Replies: 13
Views: 3176

Re: Need help with Mercurial

Well... unfortunately that depends on which files... Generally (somewhat heavily simplified...) any files that you create for a specific 'project'/for specific user would be owned by that user - system configuration and general 'library' files to be shared between different projects/users should be...
by yvonnezoe
Mon Mar 04, 2013 4:02 am
Forum: Python
Topic: Running python files using geany
Replies: 7
Views: 8042

Re: Running python files using geany

a question here:
is

Code: Select all

chmod a+x helloworld.py 
the same as

Code: Select all

chmod 755 helloworld.py 
?
by yvonnezoe
Mon Mar 04, 2013 3:26 am
Forum: Python
Topic: Re: Send/Recieve data on the RS232 port
Replies: 8
Views: 2613

Re: Send/Recieve data on the RS232 port

Yes, if you add the 'shebang' directive at the very beginning of your file: #!/usr/bin/python # your python code here... and change the script permissions to executable with chmod : chmod a+x myscript.py ...you can just type the Python script filename without the 'python '... (Y) thank you! i will ...
by yvonnezoe
Mon Mar 04, 2013 3:23 am
Forum: General programming discussion
Topic: Need help with Mercurial
Replies: 13
Views: 3176

Re: Need help with Mercurial

Well... unfortunately that depends on which files... Generally (somewhat heavily simplified...) any files that you create for a specific 'project'/for specific user would be owned by that user - system configuration and general 'library' files to be shared between different projects/users should be...
by yvonnezoe
Mon Mar 04, 2013 2:48 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

theimmc wrote:That's great, looks like you got past the major hurdles :)
yeah!! :) It's Monday and I'm back to R-Pi mode! going to test out the rest of the serial commands to make sure they work, then think of a way to put everything together. haha the latter sounds tough :O
by yvonnezoe
Fri Mar 01, 2013 8:46 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

[quote="theimmc"] For it to work with the Pi's level converter, as well as the Comfort, both of them need to have pin 2 as transmit, and pin 3 as receive. So when you connect the Pi to the Comfort, you are connecting transmit to transmit, and receive to receive, which won't work. /quote] Brilliant!!...
by yvonnezoe
Fri Mar 01, 2013 6:27 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

Can your laptop communicate to the Comfort through RS-232? If the laptop can talk to the comfort, and the laptop can talk to the Pi (which you already verified), then you need a null modem cable to connect the Pi to the Comfort. For the Pi, you just need to connect pin 2 on one end to pin 3 on the ...
by yvonnezoe
Fri Mar 01, 2013 3:17 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

Glad to hear that your level shifter is working too! What do you intend to do next? :) Don't really have any plans for the level shifter - it was very inexpensive, so I just tacked it on when I ordered a bunch of other stuff from DealExtreme. One never knows when a RS-232 interface is needed... My ...
by yvonnezoe
Fri Mar 01, 2013 12:54 am
Forum: Python
Topic: Re: Send/Recieve data on the RS232 port
Replies: 8
Views: 2613

Re: Send/Recieve data on the RS232 port

-rst- wrote: You can also save your Python code to a file and run it from command-line with:

Code: Select all

python myscript.py
And there is even a way to make the Python file executable by itself (leaving out the 'python ' from the above command)...
thank you :D
do you mean i can simply type myscript.py in command line?
by yvonnezoe
Fri Mar 01, 2013 12:48 am
Forum: General programming discussion
Topic: Need help with Mercurial
Replies: 13
Views: 3176

Re: Need help with Mercurial

ahh i see. i had a wrong idea thinking that all editing of the files has to be in sudo mode! :( should i do "chown" to the files? but i'm not sure which files should i move to /home/pi as i have been following guides and tutorials here and there. and will moving the files affect any other files or s...
by yvonnezoe
Thu Feb 28, 2013 9:12 am
Forum: General programming discussion
Topic: Need help with Mercurial
Replies: 13
Views: 3176

Re: Need help with Mercurial

I think you have managed to make the /home/www-data/web2py/applications directory (and sub directories) owned by root, rather than a normal user. To give you permissions to carry on working where you are, you want to change the owner of that directory, and all subdirectories and files, as follows: ...
by yvonnezoe
Thu Feb 28, 2013 9:09 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

Fantastic! I can't help you any further, this is the extent of my knowledge regarding your home control unit. Good luck! Post back here, I'd like to hear about your success. I was going to post about my success here with the level shifter I bought. I got it talking to my laptop as well. The model i...
by yvonnezoe
Thu Feb 28, 2013 8:12 am
Forum: Python
Topic: Re: Send/Recieve data on the RS232 port
Replies: 8
Views: 2613

Re: Send/Recieve data on the RS232 port

There's a library called pyserial. It isn't in the standard library for some reason so you have to Google it and install it manually. The format of the data is up to you, the programmer. I would suggest sticking to text to begin with since working in binary (never hex; hexadecimal is a programmer c...
by yvonnezoe
Thu Feb 28, 2013 8:09 am
Forum: Python
Topic: Re: Send/Recieve data on the RS232 port
Replies: 8
Views: 2613

Re: Send/Recieve data on the RS232 port

if i want to send the data from R-Pi to another board using python, how should i do it? btw, what is the data format used by RPi? is it HEX or text? The best data format to use is one that you are most comfortable with - so, since you're writing the program at both ends, then you have complete cont...
by yvonnezoe
Thu Feb 28, 2013 6:36 am
Forum: Automation, sensing and robotics
Topic: home automation server
Replies: 25
Views: 15175

Re: home automation server

If you already have the serial port on your Comfort, it may be worth it to add a RS-232 level converter to the Pi. Will be much cheaper than buying the Ethernet module for the comfort. Hey, just an update from my side here! :) Yes, i have decided to use the serial port since i found a level shifter...

Go to advanced search