New to python

2009-11-30 Thread Ronn Ross
I have recently come across something called a struct. I have googled this, but have note found a good explanation. Can someone give me a good definition or point me to a page that has one. Thanks -- http://mail.python.org/mailman/listinfo/python-list

converting latitude and longitude

2009-11-13 Thread Ronn Ross
I'm attempting to convert latitude and longitude coordinates from degrees minutes and second to decimal form. I would like to go from: N39 42 36.3 W77 42 51.5 to: -77.739855,39.70 Does anyone know of a library or some existing out their to help with this conversion? --

[no subject]

2009-11-13 Thread Ronn Ross
I'm attempting to convert latitude and longitude coordinates from degrees minutes and second to decimal form. I would like to go from: N39 42 36.3 W77 42 51.5 to: -77.739855,39.70 Does anyone know of a library or some existing out their to help with this conversion? --

Re: Python 2.6 Global Variables

2009-10-28 Thread Ronn Ross
Inside the method that you want to use the var prefix the first instance with global. For example: global my_var. Then you can use the var like normal in the method. Good luck On Oct 28, 2009, at 20:50, mattofak matto...@gmail.com wrote: Hi All; I'm new to Python and moving from C, which

Adding a menu to Tkinter

2009-10-26 Thread Ronn Ross
I'm attempting to add a menu bar to my Tkinter app. I can't figure out the correct syntax. Can someone help? I get this error when I run the app: Traceback (most recent call last): File tkgrid.py, line 26, in module app = App(root) File tkgrid.py, line 10, in __init__ menubar =

Re: PySerial

2009-10-25 Thread Ronn Ross
On Sat, Oct 24, 2009 at 4:53 PM, John Nagle na...@animats.com wrote: Gabriel Genellina wrote: En Fri, 23 Oct 2009 20:56:21 -0300, Ronn Ross ronn.r...@gmail.com escribió: I have tried setting the baud rate with no success. Also I'm using port #2 because Im using a usb to serial cable

Python GUI

2009-10-25 Thread Ronn Ross
I need to create a gui for python. I'm looking for something that is easy to learn and cross platform. Any suggestions? If you have any good tutorials please send along. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python GUI

2009-10-25 Thread Ronn Ross
Philip, PySide looks nice and you are right it is still very young. I'm still going to give it a try. Thanks for your help. On Sun, Oct 25, 2009 at 9:41 PM, Philip Semanchuk phi...@semanchuk.comwrote: On Oct 25, 2009, at 8:39 PM, Ronn Ross wrote: I need to create a gui for python. I'm

Re: PySerial

2009-10-24 Thread Ronn Ross
, 23 Oct 2009 20:56:21 -0300, Ronn Ross ronn.r...@gmail.com escribió: I have tried setting the baud rate with no success. Also I'm using port #2 because Im using a usb to serial cable. Note that Serial(2) is known as COM3 in Windows, is it ok? -- Gabriel Genellina -- http

Re: PySerial

2009-10-23 Thread Ronn Ross
I'm using pySerial to connect to a serial port (rs232) on a windows xp machine. I'm using python interactive interpretor to interact with the device. I type the following: import serial ser = serial.Serial(2) ser.write(command) But this does nothing to the control. I have been able to connect via

Re: PySerial

2009-10-23 Thread Ronn Ross
I have tried setting the baud rate with no success. Also I'm using port #2 because Im using a usb to serial cable. On Fri, Oct 23, 2009 at 7:51 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Oct 22, 2009 at 4:43 PM, Ronn Ross ronn.r...@gmail.com wrote: I'm using pySerial to connect

PySerial

2009-10-22 Thread Ronn Ross
I'm using pySerial to connect to a serial port (rs232) on a windows xp machine. I'm using python interactive interpretor to interact with the device. I type the following: import serial ser = serial.Serial(2) ser.write(command) But this does nothing to the control. I have been able to connect via

reading joystick data

2009-10-15 Thread Ronn Ross
Hello, I'm using PyUSB 0.4.2 to interact with a Microsoft Sindwinder joystick. I'm using python 2.6 on windows XP. With the code snippet below I'm able to find usb device currently plugged into my computer. Now I would like to actually tap into the data that to joystick is providing to the

Python and USB

2009-10-14 Thread Ronn Ross
I'm new to Python and would like to capture mouse movements. I envision writing a script that will just write out the mouse movements in the term. Is this possible? Can someone point me in the right direction? -- http://mail.python.org/mailman/listinfo/python-list

Pyusb

2009-10-14 Thread Ronn Ross
I'm running Python 2.6 on windows. I'm install Pyusb and I'm having trouble including the library in my script. Can someone point me in the right direction to get this working or know of a good tutorial to help me out. Best regards -- http://mail.python.org/mailman/listinfo/python-list

Pyusb

2009-10-14 Thread Ronn Ross
Does anyone know where I can download a copy of PyUSB 1.0? I can only find 0.x versions on sourceforge. I'm following a tutorial that requires 1.0. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Reading binary files

2009-08-24 Thread Ronn Ross
I need to read a binary file. When I open it up in a text editor it is just junk. Does Python have a class to help with this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading binary files

2009-08-24 Thread Ronn Ross
On Mon, Aug 24, 2009 at 11:18 AM, Ronn Ross ronn.r...@gmail.com wrote: On Mon, Aug 24, 2009 at 10:43 AM, Albert Hopkins mar...@letterboxes.orgwrote: On Mon, 2009-08-24 at 10:35 -0400, Ronn Ross wrote: I need to read a binary file. When I open it up in a text editor it is just junk

Re: convert date time

2009-08-21 Thread Ronn Ross
On Fri, Aug 21, 2009 at 2:26 PM, D'Arcy J.M. Cain da...@druid.net wrote: On Fri, 21 Aug 2009 14:14:32 -0400 Ronn Ross ronn.r...@gmail.com wrote: I want to split it into two fields one with the date formatted like this: -MM-DD 2009-08-02 and the time to be 24 hour or military time

Re: Barcodes

2009-08-19 Thread Ronn Ross
On Wed, Aug 19, 2009 at 9:19 AM, Ronn Ross ronn.r...@gmail.com wrote: I was hoping that python would have a library to help me print my own bar codes? We will need labels in all sizes and most label printer just work with 1 or 2 sizes. I would like to just print a grid of different sizes

Can you easy_install from your localhost?

2009-07-30 Thread Ronn Ross
I have a package i would like to store locally. If it is stored locally can I do something like ' easy_install http://localhost/package ' ? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: trouble with minidom

2009-07-24 Thread Ronn Ross
On Tue, Jul 21, 2009 at 7:32 PM, Gabriel Genellina gagsl-...@yahoo.com.arwrote: En Tue, 21 Jul 2009 21:08:57 -0300, Ronn Ross ronn.r...@gmail.com escribió: Hello I'm trying to read an xml file using minidome. The xml looks like: rootNode project namemyProj/name path/here

trouble with minidom

2009-07-21 Thread Ronn Ross
Hello I'm trying to read an xml file using minidome. The xml looks like: rootNode project namemyProj/name path/here//path /project /rootNode My code looks like so: from xml.dom.minidom import parse dom = parse(myfile.xml) for node in dom.getElementsByTagName(project'):

Beginners question

2009-07-17 Thread Ronn Ross
How do you define a global variable in a class. I tried this with do success: class ClassName: global_var = 1 def some_methos(): print global_var This doesn't work. What am I doing wrong? -- http://mail.python.org/mailman/listinfo/python-list

TypeError: unbound method

2009-07-16 Thread Ronn Ross
Hello all, Created a python file that has a class and three methods. When I jump into interactive mode I import like so: from file import class Now when I try to use a method from the class: var1 = class.method() It give me this error: TypeError: unbound method methodname must be called with

VirtualEnv

2009-07-06 Thread Ronn Ross
I'm attempting to write a bootstrap script for virtualenv. I just want to do a couple of easy_install's after the environment is created. It was fairly easy to create the script, but I can't figure out how to implement it. The documentation was not of much help. Can someone please point me in the

VirtualEnv

2009-07-03 Thread Ronn Ross
I'm attempting to write a bootstrap script for virtualenv. I just want to do a couple of easy_install's after the environment is created. It was fairly easy to create the script, but I can't figure out how to implement it. The documentation was not of much help. Can someone please point me in the

packaging apps

2009-06-30 Thread Ronn Ross
I have a simple application that has a glade file and a .py file. How would I package that into an installer for Windows, Mac, and a deb file? Can anyone point me in the right direction? -- http://mail.python.org/mailman/listinfo/python-list

RFID and Python

2009-05-31 Thread Ronn Ross
I'm looking to play around with RFID and Python. Can anyone offer any suggestions on the cheap? I'm possibly looking for a starter kit. -- http://mail.python.org/mailman/listinfo/python-list

Tkinter file dialog

2009-05-28 Thread Ronn Ross
I'm using Tkinter file selector to get a direcotry path. I'm using: self.file = tkFileDialog.askdirectory(title=Please select your directory) print file but all it prints out is: type 'file' How would I print the directory path? Thanks --

Sorting a dictionary

2009-05-12 Thread Ronn Ross
I'm attempting to sort for the results of a dictionary. I would like to short by the 'key' in ascending order. I have already made several attempts using: sorted() and .sort(). Here is my loop: for key,value in word_count.items(): print sorted(key), =, value Thanks --

Scraping a web page

2009-04-07 Thread Ronn Ross
I'm using the following to scrape a web page: import urllib f = urllib.urlopen(http://www.google.com;) s = f.read() It is working, but it's returning the source of the page. Is there anyway I can get almost a screen capture of the page? Dankon --

print from a python script.

2009-04-06 Thread Ronn Ross
I'm trying to print a simple string to a network printer. This is what I have so far: import os printer_path = 192.168.200.139 p = os.popen(printer_path, 'w') p.write(this is a printer test) p.close() I'm trying to call the printer from its IP address. When I run the script I get: sh:

Re: Welcome to the Python-list mailing list

2008-04-07 Thread Ronn Ross
This is my first post and I'm new to Python. How would someone go about adding keywords to Python? It would be great to add support for Esperanto keywords in the language instead of English being the only option. thx -- http://mail.python.org/mailman/listinfo/python-list

playing around with python

2008-04-07 Thread Ronn Ross
Hello all, I downloaded the source for version 2.5.2 and I played around and made some changes, but now I don't know how to compile on my machine to test them. Can someone tell me how to compile it to run on my machine? I'm trying to get familiar with it before I volunteer. Also, I'm running

playing around with python

2008-04-07 Thread Ronn Ross
Hello, I download the source for -- http://mail.python.org/mailman/listinfo/python-list