Webhosting python info
Hi, Is there a way in python to have all the modules/ packages availiable to me printed out, like phpinfo (http://uk2.php.net/phpinfo) on my webhosting. Cheers David -- http://mail.python.org/mailman/listinfo/python-list
Re: Pylab and pyserial plot in real time
Juho Schultz: Thanks for that, havent got time to modify it for my needs at the moment, but im sure it'll work as i've just tried it Jeremy Sanders: Cheers for that, i'll check it out. thanks to everyone else to! Thanks David -- http://mail.python.org/mailman/listinfo/python-list
Re: Pylab and pyserial plot in real time
Yea I know the data is correct, all I do is sample my data with an ADC and then send it to the serial port. using hyper terminal or indeed pyserial presents the data as a ASCII charecters, the value of these Charecters is the converted to there equivalent decimal value using the ord() command. Basically the code was supposed to get the values from the serial port, place them in some sort of FIFO buffer with no limits on size and then plot the values each time a new value is recieved, constantly updating and presented near enough the graph of the current events. I can't actually get to the computer with the hardware setup on so i can't test the ideas you had, however I will do so tommmorw and report back... Im pretty certain however that its the plotting aspect of my routine that doesnt work as I have mucked around with the data fed from the serial port and its OK, for instance the sensor placed in an oven that has been heated and dried for hours presnets a value a lot less than that of the sensor placed in the spout of a boiling kettle - so the values here are ok for my purposes. thanks for the clues. wish there was a pylab expert around here as my example is copied from there tutorial, maybe I need to destory the window on each iteration or something? Does anyone know of a module designed for ploting real time data thats more appropriate for the above mentioned task than pylab?? thanks David Peter Hansen wrote: > [EMAIL PROTECTED] wrote: > > I've got a PIC microcontroller reading me humidity data via rs232, this > > is in ASCII format. > > What do you mean when you say it's in ASCII format? ASCII defines a > convention for representing control and printable characters. Do you > mean that the readings you get are shown in hyperterminal as numbers > such as "101"? Or something else? > > > I can view this data easily using hyperterminal or > > pyserial and convert it to its value (relative humidty with ord(input)) > > Okay, since you don't show examples, we'll have to assume you know what > you're doing there... > > > My code is below, it doesnt show a graph, I was wondering whether > > someone could suggest whats wrong? > > What does it do? What does it do if you put a print statement after the > ord() line? Maybe try "print repr(s), b"... > > > while 1: > > s = ser.read() > > b = ord(s) > > h = [] > > h.append(b) > > x = x + 1 > > plot(t,h) > > > > ser.close > > Note that the last line is incorrect: it should be ser.close(). Without > the parentheses it just creates a temporary reference to the method, > then discards it. (Of course, this isn't what's stopping your code from > working.) > > You haven't provided us much detail, but what happens if you change the > line that reads from the serial port to the following? > > s = '5' > > This, of course, will partition the problem, showing you whether the > problem is with the serial reading or with the plotting. If it's still > not plotting, you can assume you have missed a critical step in using > pylab and you should probably go back a step and make sure you can run > whatever tutorial or example code is included with pylab. (This is the > first I've heard of pylab, so I can't help you there.) > > -Peter -- http://mail.python.org/mailman/listinfo/python-list
Pylab and pyserial plot in real time
Hiya, I've got a PIC microcontroller reading me humidity data via rs232, this is in ASCII format. I can view this data easily using hyperterminal or pyserial and convert it to its value (relative humidty with ord(input)) But what im trying to do is plot the data in real time, ideally with pylab - as it looks simple to use and simple is the way i want to go! My code is below, it doesnt show a graph, I was wondering whether someone could suggest whats wrong? thank you in advance David import serial from pylab import * ser = serial.Serial(0) t = arange(0.0, 1.0+0.01, 0.01) xlabel('time') ylabel('RH %') title(' RH sensor data sampled at 1 sec intervals ') #grid(true) x = 0 while 1: s = ser.read() b = ord(s) h = [] h.append(b) x = x + 1 plot(t,h) ser.close -- http://mail.python.org/mailman/listinfo/python-list
Re: searching string url
Cheers for all your replies, Peter Hansen: Couldnt agree more with you about not effectivly spamming companies with my resume, thats why im crawling the local newspapers website to - to find scrapes of information about companies :-) I Wasnt planning to automate everything, more the boring address and names really - I hate typing that stuff up. I was planning orginally just to compile a list of companies that appear suitable and then go through them by hand. Cheers Dave -- http://mail.python.org/mailman/listinfo/python-list
Re: searching string url
Thanks for the rapid replys, I cracked the problem 15 seconds after posting here, doh! Anyway to the orginally replier - I wish it was homework ;-), that would mean I wouldnt be trying to find myself a job as a recent graduate... I decided to crawl something similar to the yellow pages (do you have them in the US?) for my select area and then find all pages corresponding to my ideal field of work, and grab their details into a txt file. Trouble is I keep thinking of cool new bits to add, python truely is a beautifal language. Ideally would like to somehow write all the information into a word mail merge - but I think that requires more research! Cheers! David -- http://mail.python.org/mailman/listinfo/python-list
searching string url
Hiya, Im trying to find a method of searching a html file (ive grabbed it with FancyURLopener), basically in the html file there is a series of links in the following format - A HREF="../../company/11/13/820.htm">some namehttp://mail.python.org/mailman/listinfo/python-list
Re: Text files read multiple files into single file, and then recreate the multiple files
Would like to use text files, its really for my own learning, but I suppose a Zip would work cheers -- http://mail.python.org/mailman/listinfo/python-list
Text files read multiple files into single file, and then recreate the multiple files
Hiya, The title says it all really, but im a newbie to python sort of. I can read in files and write files no probs. But what I want to do is read in a couple of files and output them to one single file, but then be able to take this one single file and recreate the files I put into it. Im really at a loss as to how I go about recovering the files? obviously if i scan for a string that specifys the start and end of each file, theres the chance that the file might contain this term to which would split the files into unwanted chucks of file, which wouldnt be wanted. Any ideas? code snippets? Im very grateful! -- http://mail.python.org/mailman/listinfo/python-list