[Tutor] USB volume unique volume info

2012-01-09 Thread Jeff Peery
Hello, I am writing a python script to install a program onto a customer computer from a USB drive. To prevent piracy, I want to know if the user has copied my install program to another USB drive. Do USB drives have some unique volume info or another feature that I might query to detect if the

Re: [Tutor] Reading elements in a file

2011-05-04 Thread Jeff Peery
Greg, You might try… Import sting delimiter = ‘.’ f = open('words.txt', "r") lines = f.readlines() for line in lines: line_items = string.split(line,delimiter) From: tutor-bounces+jeffpeery=seametrics@python.org [mailto:tutor-bounces+jeffpeery=seametrics@python.org] On Behal

[Tutor] Problem Automating Internet Explorer Printing

2011-05-04 Thread Jeff Peery
Hello, I'm using the code pasted below to print a document. The code worked great on my XP machine. I moved it to my W7 machine and it gives the error below. The weird thing is that it works great if printing a html doc from the web (such as www.google.com), but it errors when printing a html do

[Tutor] browing windows registry

2010-03-17 Thread Jeff Peery
hello, I want to browse the windows registry for the program ids listed under the categories: 63D5F430-CFE4-11d1-B2C8-0060083BA1FB 63D5F432-CFE4-11d1-B2C8-0060083BA1FB where might be the best way to learn how to do that with python? thanks, Jeff _

[Tutor] os.popen4 help!

2010-03-16 Thread Jeff Peery
Hello, I'm trying to run an executable file from a python script. the executable is "opcenum.exe". OPCENUM.EXE is an executable that is usually found on computers with OPC software; such as OPC Servers or OPC Clients. The purpose of OPCENUM.EXE is to provide an

[Tutor] numpy and py2exe

2009-11-21 Thread Jeff Peery
Hello I have a python app that uses wxPython, numpy, and I'm trying to package it with py2exe. I get the below error. I tried putting a dummy __init__.py file in the distutils.tests directory but this did not solve the problem. how may I fix this?   *** searching for required modules *** Traceb

[Tutor] python queue

2009-09-16 Thread Jeff Peery
Hello, Does anyone know if there is there a way to look at a queue's contents? Or prevent duplicate messages from being put into a queue? The docs don't show anything useful. The reason is that I'm collecting and drawing data. one thread collects, and one thread draws. each time one sample is co

[Tutor] thread causes idle to crash

2009-08-28 Thread Jeff Peery
hello, I've been working on threads and queues and I think I have it working well. The problem seems to be that when I run a thread via the IDLE it crashes. if I simply double click the file it appears to run ok. I'm not sure if I'm doing something incorrectly or not. it seems pretty straight fo

Re: [Tutor] how do I post event to thread?

2009-08-27 Thread Jeff Peery
hnson Subject: Re: [Tutor] how do I post event to thread? To: "Jeff Peery" Cc: tutor@python.org Date: Thursday, August 27, 2009, 4:00 AM On Wed, Aug 26, 2009 at 9:38 PM, Jeff Peery wrote: > hello, > I've read a bit about multi thread communication, and found that most people

[Tutor] how do I post event to thread?

2009-08-26 Thread Jeff Peery
hello, I've read a bit about multi thread communication, and found that most people use a queue, which makes sense. however in my case I simply have two threads, a main thread and one other. the main thread is doing many different things and the second thread is receiving numerical data via a se

[Tutor] file locations

2008-11-24 Thread Jeff Peery
Hello, I have a wxapp from which I would like to execute another wxapp. the 'child' wxapp is located in a sub directory of the 'parent' wxapp. The problem I'm having is that I execute the child app from the parent app and it cannot find the modules/images/files etc that it needs because it i

[Tutor] executing a script from a script

2008-08-26 Thread Jeff Peery
Hello, I have a simple wx app that I need some help with. This application uses the serial ports to communicate with an industrial product. I first check that my python application is compatible with the industrial product by asking the industrial product for its revision number. If the revision n

[Tutor] closing a internet explorer com object

2008-06-24 Thread Jeff Peery
hello, I'm using internet explorer to print out html documents and I'm not sure how to close it once it is created. How do I do this? below is the simple bit of code I use to print documents. thanks! Jeff ie = win32com.client.Dispatch("InternetExplorer.Application")

[Tutor] setstate trouble when unpickling

2008-01-24 Thread Jeff Peery
Hello, I've got a fairly simple class instance that I'm pickling. I'm using setstate to update the instance when I unpickle. Although the setstate doesn't seem to be called upon unpickling... here's an example, if anyone see's what I'm doing wrong, please let me know. Thanks! so I sa

[Tutor] pickle question

2007-09-25 Thread Jeff Peery
hello, I have a question about the pickler. I'm using it to save objects in a program of mine that I can later reload to use. I was wondering how the pickle works and how it references the class module when I unpickle the pickled objects. for example I save some objects using the pickler,

[Tutor] performance

2007-09-16 Thread Jeff Peery
Hello, I've got a quick question regarding performance of lists. I am taking measurements and building up a list of objects for each measurement. the class I created for the objects has attributes of time, numerical value, person's name who collected the sample etc. I also have functions with

[Tutor] locking files

2007-06-13 Thread Jeff Peery
does anyone know if there is a way in python to lock a file so others cannot open it, or can only read it? I have a program that read/writes to a file and I would like to lock others out of it while I'm operating on it. thanks. Jeff - We won't tell.

Re: [Tutor] whats the best way to structure my data?

2007-05-10 Thread Jeff Peery
ok, thanks. so is there a difference in performance if I do it this way versus if I use say a numpy function on an array? thanks. Jeff John Fouhy <[EMAIL PROTECTED]> wrote: On 11/05/07, Jeff Peery wrote: > hello, I was wondering what might be the best way to structure my data > w

[Tutor] whats the best way to structure my data?

2007-05-10 Thread Jeff Peery
hello, I was wondering what might be the best way to structure my data within python. I am sampling data points, and in each there is a time, value, and text string associated with that sample. so I was thinking I'd make a list of 'measurement objects' and each object would have the attributes:

[Tutor] where to look for help with modbus TCP/IP

2007-04-05 Thread Jeff Peery
hello, I want to use python to communicate (pluck data out of registers) with a controller (walchem, http://www.walchem.com/nav/CMImage.aspx?CMID=0&Name=180277_Modbus_C.pdf). I found great documentation using python sockets and TCP/IP; however I am very unfamiliar with modbus and how modbus TCP

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
... what is '*' in '*temp'? thanks! J Kent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote: > hello, I typically run into this problem and I'm not always sure of the > most efficient way to handle it. I often work with multiple arrays of > data, sa

Re: [Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
Thanks for all the responses, that is a huge help! Jeff Kent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote: > hello, I typically run into this problem and I'm not always sure of the > most efficient way to handle it. I often work with multiple arrays of > data, sa

[Tutor] sorting data from multiple arrays

2007-03-22 Thread Jeff Peery
hello, I typically run into this problem and I'm not always sure of the most efficient way to handle it. I often work with multiple arrays of data, say arrays a, b, and c, and I want to sort the elements of b and c based on a. for example: a = [3,2,1,4] b = ['hi', 'my','name', 'is'] c = [5,2,4,

[Tutor] recommendation for good OO book?

2007-03-07 Thread Jeff Peery
Hello, I've been using python for a few years now and I really like it. Although i am beginning to realize I really don't utilize this object oriented stuff in a good way. Does anyone have a favorite book regarding the basics/intro to object oriented programming, how to write good OO code?? tha

Re: [Tutor] python shell not working like it used to

2007-02-26 Thread Jeff Peery
7;this' is... it seems to be something different from my previous version of wxpython. thanks. J Alan Gauld <[EMAIL PROTECTED]> wrote: "Jeff Peery" wrote > def __init__(self, other): >d['this'] = other.this > > "other" here is

[Tutor] python shell not working like it used to

2007-02-25 Thread Jeff Peery
hello, I just upgraded to python 2.5 and wxpython 2.6. I'm not sure the correct list for this but I'm trying to shove some variables into a py shell using the below code. this worked pretty well before, but now it gives me an error on the last line of my brief example. The error is: 'dict'

Re: [Tutor] how do I find where my program is installed?

2006-09-07 Thread Jeff Peery
Thanks Bill, I read the link you sent, and I am not sure what they mean by "You cannot rely on __file__, because __file__ is not there in the py2exed main-script." can't I use _file_ in my application though? This is what I just added to my application and it seems to do the trick... is there an ex

[Tutor] how do I find where my program is installed?

2006-09-06 Thread Jeff Peery
hello, I created an executable using py2exe and innosetup for windows. I need to figure out where the user has installed my program so that I can direct the program to the installation files that it needs to run. I ran into this problem because I have a file type that my program reads and I have re

Re: [Tutor] threading

2006-08-15 Thread Jeff Peery
h, ok, well that is what I am currently doing but something is causing it to continue... guess I have some digging around to do. thanks for the help!JeffJohn Fouhy <[EMAIL PROTECTED]> wrote: On 16/08/06, Jeff Peery <[EMAIL PROTECTED]> wrote:> hello, how do I stop a thread? do I

[Tutor] threading

2006-08-15 Thread Jeff Peery
hello, how do I stop a thread? do I need to kill it or can I simply call a stop function... kinda like the start function? I read a bit on google and it sounded like using a kill isn't recommended for some reason... so how is this thing stopped? thanks!Jeff Yahoo! Messenger with Voice. Make PC-t

[Tutor] python processing of web html forms

2006-08-03 Thread Jeff Peery
Hello, I want to use python to process information input into a HTML form on my website. how is this typically performed? I saw cherrypy and also quixote for web python stuff... I have no experience with python on the web. Thanks.jeff Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls

Re: [Tutor] modbus communication with python?

2006-07-11 Thread Jeff Peery
n about this? thanks!JeffJason Massey <[EMAIL PROTECTED]> wrote: Googling for modbus python turned up:https://lintouch.org/repos/lintouch/lsp-modbus/trunk/tests/ On 7/5/06, Jeff Peery <[EMAIL PROTECTED]> wrote: Hello, I need to talk read write to a modbus so that I can work with a PLC. I ha

Re: [Tutor] how to post an event?

2006-07-10 Thread Jeff Peery
Ah, yes it works, thanks. I had previously tried to simply call the function (OnButton1Button() from OnButton2Button()) instead of posting an event but I guess I did this wrong and abandoned the effort assuming that it wouldn't work. Anyhow, I got it working now, thanks again!JeffAlan Gauld <[EMAIL

[Tutor] how to post an event?

2006-07-07 Thread Jeff Peery
Hello, I am having a bit of trouble figuring out how to post an event. I attached my sample program. I assigned a button event to each button in the program. I want to post an event when the second button is pressed that executes the first button. thanks.Jeff Talk is cheap. Use Yahoo! Messenger

[Tutor] modbus communication with python?

2006-07-05 Thread Jeff Peery
Hello, I need to talk read write to a modbus so that I can work with a PLC. I have not a clue how this all works. does python have a modbus module or where might I look to find how to do this? thanks.Jeff How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.__

[Tutor] modbus communication with python?

2006-07-05 Thread Jeff Peery
Hello, I need to talk read write to a modbus so that I can work with a PLC. I have not a clue how this all works. does python have a modbus module or where might I look to find how to do this? thanks.Jeff Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta._

[Tutor] treelistctrl help!

2006-06-28 Thread Jeff Peery
hello, I'm having some trouble with treelistctrl in wx python and I was wondering if there is someone who would share their code as an example. thanks!Jeff Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail Beta.___ Tutor maillist

[Tutor] numpy speed problems

2006-06-09 Thread Jeff Peery
hello, I am having some trouble with the speed of numpy. I'm crunching some numbers (see the attached script) and in total I have 1,000,000 grid points over which I am integrating. I'm doing a bunch of adding, mulitply, divide, powers, etc, but in total there are 1,000,000 points to do these operat

[Tutor] PLC communication with python?

2006-03-07 Thread Jeff Peery
Hello, I would like to write a python script that communicates with a PLC (programmable logic controller) as well as instruments like calipers and things. I'm completely in the dark here and not sure where to start reading and learning. could someone point me in the right direction for learning

[Tutor] numeric typeError

2005-11-10 Thread Jeff Peery
hello, I'm getting this strange error:   myArray1[1:2]   = myArray2[3:4]   TypeError: Array can not be safely cast to required type   everytime I try to copy a slice from one array to the next this error occurs. the slices are the same size and I initialized the arrays using Numeric.zeros(10, 'Flo

[Tutor] (no subject)

2005-11-10 Thread Jeff Peery
Yahoo! FareChase - Search multiple travel sites in one click. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2005-11-10 Thread Jeff Peery
Yahoo! FareChase - Search multiple travel sites in one click. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] comiling python to microchip?

2005-10-12 Thread Jeff Peery
is it possible to take python code and compile it for use in a microprocessor?___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] (no subject)

2005-10-12 Thread Jeff Peery
hello, I am trying to find the source code for FFT. I found the FFT.py module athough I cannot find the actual code that runs the FFT. Is it in a compiled form or can I view its source?   thanks.___ Tutor maillist - Tutor@python.org http://mail.python.o

[Tutor] hiding a notebook page

2005-09-28 Thread Jeff Peery
hello, I'm using wxpython to write a windows app. I want to be able to hide a page in a notebook and I'm not sure how to do it. functionally its the same as doing:   notebook.Show(False)   but I want that to work for just one notebook page and not the whole notebook. I tried the wxpython list but d

[Tutor] installation programs

2005-09-21 Thread Jeff Peery
Hello, I want to create an installation program. Can anyone tell me what the best program would be to use... maybe inno setup or install shield? do these work with python programs? do they require programming in another language? thanks.   Jeff___ Tutor

Re: [Tutor] reading excel and access files

2005-08-23 Thread Jeff Peery
Great, this is lots of good info. thanks everyone for your input!   JeffKent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote:> hello, can python read excel and access files? If so where do I go to > read about how this would work? thanks.There are some resources here that might be

[Tutor] reading excel and access files

2005-08-22 Thread Jeff Peery
hello, can python read excel and access files? If so where do I go to read about how this would work? thanks.   Jeff___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] changes made if IDLE not updating when application executed?

2005-08-11 Thread Jeff Peery
Hello, I am running  a script I wrote with IDLE. if I edit the script them hit 'F5' to run it again, it seems to run the old script prior to the last save. I have to close down the IDLE then start it again and hit 'F5' to get the changes to execute. is there a way to fix this?   Jeff___

[Tutor] distutils?

2005-08-10 Thread Jeff Peery
Hello, I was wondering what is the difference between the distutils core and py2exe... they look the same to me? thanks.___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] fyi - re: fft

2005-08-04 Thread Jeff Peery
hello, thought I'd post my progress with fiddling with the FFT.   import FFT   I've been using fft by taking the real part with: myFFT = abs(FFT.fft())   the returned values are the fourier coefficients starting with a0   the old thing is that the output is symmetrical about N/2 where n>N/2 is the

[Tutor] fftpack

2005-08-04 Thread Jeff Peery
Hello, does anyone know how to open the fft function? I want to view it in the IDLE although the only file i have is the fftpack.pyd which I beleive is a compiled file and it looks like mush.    ___ Tutor maillist - Tutor@python.org http://mail.python.o

[Tutor] commercial use of python?

2005-08-03 Thread Jeff Peery
hello, I was wondering about the license agreement for python. if I use python to create an application that is intended to sell commercially for profit is that violating the agreement listed in www.opensource.com? Or is that only for the interpreter? for example if I embed the python interpreter i

Re: [Tutor] imbedding python into another program?

2005-08-03 Thread Jeff Peery
xist in my program. But I have to load both the arrays and Numeric into the python shell that I created. how can I do this? thanks.André Roberge <[EMAIL PROTECTED]> wrote: Jeff Peery wrote:> hello, is it possible to add something like the python IDLE into> another program, say if I wanted

Re: [Tutor] fourier transform

2005-08-03 Thread Jeff Peery
Hi again, is there a good reason why the output is dependant upon the sampling rate. in the example if you increase from say 64 to 128 samples the output increases by a factor of 2.   Christian Meesters <[EMAIL PROTECTED]> wrote: Hi Jeff,On 3 Aug 2005, at 02:03, Jeff Peery wrote:> hop

Re: [Tutor] fourier transform

2005-08-02 Thread Jeff Peery
te: HiPawel Kraszewski wrote:> 4. The answer is symmetrical - usually you take only half of it. I > don't> remember the exact difference between the halves, but you may find it > in any> article on FFT.The real part is identical the imaginary part has the opposite sign ("same am

Re: [Tutor] fourier transform

2005-08-01 Thread Jeff Peery
ok, this makes more sense. what I want to know is the amplitude for the output frequencies. I'm using import FFT, and FFT.fft(). the first element of the output is the DC constant? not sure what this is. is the amplitude for all other elements plus the DC equal to the actual amplitude?   thanks.Paw

Re: [Tutor] fourier transform

2005-08-01 Thread Jeff Peery
ok, this makes more sense. what I want to know is the amplitude for the output frequencies. I'm using import FFT, and FFT.fft(). the first element of the output is the DC constant? not sure what this is. is the amplitude for all other elements plus the DC equal to the actual amplitude?   thanks.Paw

Re: [Tutor] fourier transform

2005-08-01 Thread Jeff Peery
the oscillation?   Christian Meesters <[EMAIL PROTECTED]> wrote: Jeff Peery wrote:>> Hello, I have a signal that I want to do a fourier transform on. I > tried using FFT.fft(data).real but I don't understand the output. > what is output from this function, and why doesn't i

[Tutor] fourier transform

2005-07-29 Thread Jeff Peery
Hello, I have a signal that I want to do a fourier transform on. I tried using FFT.fft(data).real but I don't understand the output.  what is output from this function, and why doesn't it require amplitude and time as inputs?   thanks.___ Tutor maillist

[Tutor] resizing an array of strings?

2005-06-06 Thread Jeff Peery
Hello, I'm having a bit of trouble resizing/reshaping an array of strings. here's what I'm trying to do:   myString = ['hi','my','name','is','Jeff'] reshape(myString, (2,2))   What I get from this is something like:   [['h','i'], ['m','y']]   What I want is: [['hi','my'], ['name','is']]   How might

Re: [Tutor] imbedding python into another program?

2005-06-01 Thread Jeff Peery
accomplished by simply reading a text input and sending off the command to the command module and then returning the result to the user?? Is this feasible?   thanks for the help!   JeffDanny Yoo <[EMAIL PROTECTED]> wrote: On Wed, 1 Jun 2005, Jeff Peery wrote:> hello, is it possible to add somet

[Tutor] imbedding python into another program?

2005-06-01 Thread Jeff Peery
hello, is it possible to add something like the python IDLE into another program, say if I wanted to simply run scripts from within a wxPython program? Could someone point me to the correct reference? thanks.   Jeff___ Tutor maillist - Tutor@python.or

[Tutor] IDLE not working?

2005-06-01 Thread Jeff Peery
Hello, I upgraded python to 2.4 and now my IDLE isn't working. There is an error indicating something is wrong with my configuration file for the IDLE settings. Any suggestions for how to solve this problem would be much appreciated. thanks.   Jeff___ Tut

[Tutor] wxpython button icons?

2005-05-31 Thread Jeff Peery
Hello, does anyone know if there is a list of widows icons available? I'm creating an application for windows and I'd like to use standard icons for things like a "print" button or "save" button etc. thanks.   Jeff  ___ Tutor maillist - Tutor@python.org

Re: [Tutor] passing variables between frames?

2005-05-24 Thread Jeff Peery
actually I got it to work! thanks for the help.   JeffKent Johnson <[EMAIL PROTECTED]> wrote: Jeff Peery wrote:> ok, thanks. that makes sense; however I do not know how to pass a > variable from my parent frame to the dialog. I have tried this before > unsuccessfully. could you

Re: [Tutor] passing variables between frames?

2005-05-24 Thread Jeff Peery
<[EMAIL PROTECTED]> wrote: Jeff Peery wrote:> Hello, I am having trouble with passing variables between frames (Frame1 > and Dialog1). I'm using wxpython to write an application. when I run my > application the parent frame appears and within the parent frame I can > assign valu

[Tutor] passing variables between frames?

2005-05-23 Thread Jeff Peery
Hello, I am having trouble with passing variables between frames (Frame1 and Dialog1).  I'm using wxpython to write an application. when I run my application the parent frame appears and within the parent frame I can assign values to variables.  I then have a button that launches a child dialog.  I

[Tutor] printing documents

2005-05-20 Thread Jeff Peery
hello,   I am writing a program to store name/contact/business transaction information. I would like the ability to print out a form for each client with all this stored information.  Can somone point me in the write direction for printing documents. How do I go about setting up a printable page w

[Tutor] wxpython error when upgrading?

2005-04-28 Thread Jeff Peery
hello, I recently upgraded my wxpython to 2.5, now I get an error message when I try to edit a dialog in the boa constructor that says : collection body not in init, body, fin form - anyone have an idea what this means? thanks.   Jeff___ Tutor maillist -

[Tutor] missing module?

2005-04-28 Thread Jeff Peery
Hello, I get an error message from py2exe that it can't find a module ntpath.py.  I pasted the error message below:   Traceback (most recent call last):  File "wxApp1.py", line 4, in ?  File "wx\__init__.pyc", line 42, in ?  File "wx\_core.pyc", line 4, in ?  File "wx\_core_.pyc", line 9, in ?  Fil

Re: [Tutor] py2exe

2005-04-24 Thread Jeff Peery
I am using python 2.3.4. thanks.   JeffGreg Hasseler <[EMAIL PROTECTED]> wrote: Hi Jeff. I can't tell if you sent the last email to just me or me andthe list, but make sure to send it to the list (don't just hit reply).Also, what version of wxPython are you using?On 4/21/05, Je

Re: [Tutor] py2exe

2005-04-19 Thread Jeff Peery
ld suggest maybe sending the program source codeitself to the list so that others can review it for potential error.On 4/18/05, Jeff Peery <[EMAIL PROTECTED]>wrote:> Hi Greg, thanks for the help. the program does not launch, it crashes> immediately, and I did not see a log file. I also ra

[Tutor] py2exe

2005-04-15 Thread Jeff Peery
hello, I am using py2exe. for most of my applications it has been great. although this last one I built and when I try to execute it I get an error:   RunTime Error: this application has requested the runtime to terminate in an unusual way. please contact the applications support team for more inf

[Tutor] boa constructor font?

2004-12-17 Thread Jeff Peery
my eyes are going bad... anyone know how to change the font size in the editor window of the boa constructor? this seems to be a simple but not easy thing to do. thanks!   Jeff___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinf