Hey there,
i have used the cgi module and dig it.
heres the deal,
my employer wants me to build a dynamic website that will access a
database and display customer
information on web. ok, easy enough.
heres the trick.
the database is MS Access. - ick.
what could i do to
Exactly what i was looking for.
thanks gents, i didn't even know this module existed.
i guess this access project will not be as intimidating as i thought.
cheers
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hey there,
i have some log files that i want to be able to work with.
the lines of the log files are comma - delineated.
i want to put those into a database where each piece of info (comma
delineated)
would be the fields of the database.
ok, so the first obstacle is learning how to make a list or
Hey all,
how do i pause a script. like
print 'something'
pause a half second
print 'something else'
any takers?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Alan G wrote:
>>>going on at a time I'd consider moving the database
>>>or using snapshot technology or similar, Access locks
>>>by pages (default 2K?) which can mean a lot of data
>>>rows being locked by a single update.
>>>
>>>
>>>
>>ok, another question about this, if i use a snapshot, co
Does anyone know how to strip everything off of an email?
i have a little app that i am working on to read an email message and
write the
body of a message to a log file.
each email this address gets is only about three to five lines long.
but i cannot seem to get just the body filtered through.
i
, see if the file i am looking
for is in it
and if so, i need to know how many lines are in the file.
here is what i have so far.
import os
#get a list of Logs in logs folder
LogFiles = os.listdir('/home/nephish/Projects/Piv_GCI/logs')
#open the loglist file and read the lines
LogL
Hey there thanks,
quote:
/try
num_of_lines = line_find(LogsRead, "PV050614.LOG")
I am binding num_of_lines to the return value. In an interactive
session, without the binding, a non-None return value will display on
screen. But both interactively and in a program binding it makes it
easier t
newest lines of a
log file to process later.
here is what i have ( kinda long )
#!/usr/bin/python
# Update Database
import os
print ' '
print ' '
#get a list of log files in the directory
LogsInDir=os.listdir(
return line.strip()
>>else:
>>if line.strip() == flag:
>>return_next = True
>>
>>
>
>
>Hi Nephish,
>
>Question: what should the program return if return_next is never True?
>That is, what happens if the program does not fi
Hey there,
i have a script that i am trying to use to add a record to a MySQL
database.
i keep getting a syntax error.
this works
cursor.execute("INSERT INTO Table ( numberone ) VALUES ( 'one');")
but this does not
cursor.execute("INSERT INTO Table ( numberone, numbertwo ) VALUES
( 'one','two')
e awry?
dont know what to do next.
please help !
thanks
On 07/18/2005 03:06:34 PM, Alberto Troiano wrote:
> I think it would be better for us if you send us the entire line
> that's giving you problems along with the error its givin you so we
> can start somewhere
>
>
ok here is the error i am getting.
You have an error in your SQL syntax. Check the manual that corrosponds
to your MySQL version for the right syntax near Name ) values ('one',
'two')
thanks
___
Tutor maillist - Tutor@python.org
http://mail.python
0 rows affected (0.14 sec)
>
> This should fix your problem.
>
> Best Regards to you
>
> Alberto
>
>> From: nephish <[EMAIL PROTECTED]>
>> To: Alberto Troiano <[EMAIL PROTECTED]>
>> CC: tutor@python.org
>> Subject: Re: [Tutor] This should be
Hey there, i am trying to get an email through an SMTP server on a
windows computer from a linux machine on the same network.
>>> import smtplib
>>> import MySQLdb
>>> Server = smtplib.SMTP('10.10.10.32')
>>> ToAddress = '[EMAIL PROTECTED]'
>>> FromAddress = '[EMAIL PROTECTED]'
>>> Message = 'So
P for this at all, we are sending only.
incidentally, i appreciate you guys time and attention to this.
all the best,
shawn
On Wed, 2005-07-20 at 19:38 -0400, Reed L. O'Brien wrote:
> nephish wrote:
> > ok, my fault. the router assigned the smtp server a different address
> &
he first way because that is what let me connect and
do the helo thing via telnet.
On 07/21/2005 09:21:14 AM, Reed L. O'Brien wrote:
> nephish wrote:
> > Sorry about the delay getting back on this one guys,
> > yeah, i am running a linux machine.
> > no firewall between
sorry i am late on this one didnt get a chance to look at
it today, perhaps in the morning i will crack this open
thanks guys!
On Thu, 2005-07-21 at 15:17 +, nephish wrote:
> ok this is what i get when i use host = '10.10.10.04 25'
> resourse unavailable
> line =
Hey there,
kinda newbie question here.
i know how to read the lines of a txt file.
i know how to write a txt file.
but how do i overwrite a line value with another value ?
i mean, how do go to, say, line 3 of a text file and replace
what is written on line 3 with something else?
thanks
<><
:18:08 PM, Danny Yoo wrote:
>
>
> On Mon, 25 Jul 2005, nephish wrote:
>
> > i know how to read the lines of a txt file.
> > i know how to write a txt file.
> >
> > but how do i overwrite a line value with another value ?
> >
> > i mean, how do go to
Hey there,
i have a simple question.
if something returns a true or false, how do i test for it with an if
statement?
i am using pygtk with a toggle button that returns TRUE if checked and
FALSE if not.
do i need quotes around the TRUE / FALSE or should i use 1 and 0?
Auto_Tog = self.AutoCheckRa
Jeremy Jones wrote:
> nephish wrote:
>
>> Hey there,
>> i have a simple question.
>> if something returns a true or false, how do i test for it with an if
>> statement?
>> i am using pygtk with a toggle button that returns TRUE if checked
>> and FALSE i
Kent Johnson wrote:
>nephish wrote:
>
>
>>Hey there,
>>i have a simple question.
>>if something returns a true or false, how do i test for it with an if
>>statement?
>>i am using pygtk with a toggle button that returns TRUE if checked and
>>FAL
Hey there,
i am using the serial module and trying to get some info over an RS232
port. Seems to be comming in ok, but when i print it out, its in ASCII
instead of hex. is there a way to have python read serial in hex bytes
instead of ASCII ?
thanks.
shawn
___
Hey there,
i am using the serial module and trying to get some info over an RS232
port. Seems to be comming in ok, but when i print it out, its in ASCII
instead of hex. is there a way to have python read serial in hex bytes
instead of ASCII ?
thanks.
shawn
___
Alan G wrote:
> Hi Francois,
>
>> I'm not a Tutor but I found this wich could help you:
>
>
> If you are on the tutor list you are a tutor. We don't have any division
> of role, everyone helps and everuone can ask for help. We are all equals.
>
>> To convert character data to integers, you can use
Hey there,
i have a simple question about getting a script to do
two things at once.
like this.
for i in range(100):
print i
time.sleep(.2)
if i == 15:
os.system('python /home/me/ipupdate.py')
print 'done'
when i run this, it stops at 15 and runs the script called out
Kent Johnson wrote:
>nephish wrote:
>
>
>>Hey there,
>>i have a simple question about getting a script to do
>>two things at once.
>>like this.
>>
>>
>>for i in range(100):
>>print i
>>time.sleep(.2)
>>if i == 15:
Michael Lange wrote:
>On Sun, 21 Aug 2005 16:23:20 -0500
>nephish <[EMAIL PROTECTED]> wrote:
>
>
>
>>Hey there,
>>i have a simple question about getting a script to do
>>two things at once.
>>like this.
>>
>>
>>for i in
Hello there !
i am having a problem with threading.
OK, i have this GUI app that i am building with pygtk.
there is a process (four actually, just working on getting one right now)
that needs to run in the background.
there is a button that starts the background function. But, it locks up
the gui.
Pierre Barbier de Reuille wrote:
>nephish a écrit :
>
>
>>Hello there !
>>
>>
>
>Hello,
>
>
>
>>i am having a problem with threading.
>>OK, i have this GUI app that i am building with pygtk.
>>there is a process (four actually, j
Pierre Barbier de Reuille wrote:
>nephish a écrit :
>
>
>>Pierre Barbier de Reuille wrote:
>>
>>[...]
>>ok, i am still having a little problem understanding.
>>tried it but i don't know if i have things set in the right order.
>>
>>
&g
Serial1() just call the function ... it will be evaluated and then the
result will be sent to Thread.start ...
So try:
Thread.start(Serial)
ok,
so far the thread runs fine in the background, but just does not send the
output to the
textbuffer, and hangs up th
nephish wrote:
> Serial1() just call the function ... it will be evaluated and then the
> result will be sent to Thread.start ...
>
> So try:
>
> Thread.start(Serial)
>
>
>ok,
>so far the thread runs fine in the background, but just doe
Pierre Barbier de Reuille wrote:
>nephish a écrit :
>
>
>>one more thing.
>>if i uncomment the lines
>>gtk.threads_enter()
>>and
>>gtk.threads_leave()
>>the whole thing locks up when the function is called.
>>the gui, and the thread both lock
Pierre Barbier de Reuille wrote:
>nephish a écrit :
>
>
>>one more thing.
>>if i uncomment the lines
>>gtk.threads_enter()
>>and
>>gtk.threads_leave()
>>the whole thing locks up when the function is called.
>>the gui, and the thread both lock
to
>the same function. This is the "power" of this system :) Like now if you
>want to log your strings on a file, you just define the function writing
>in the file and connect the event to this function: you'll have both the
>GUI and the log-file outputs !
>
>Thi
Terry Kemmerer wrote:
> Hey Guys,
>
> I am trying to pick an IDE, and it seems to me that Boa-Constructor
> has great potential. However, in searching google looking to see what
> others have said, I am reading that the latest version of
> Boa-Constructor is unstable at best and crashes a lot..
Matt Williams wrote:
>I've used both PyDev and Wing IDE.
>
>PyDev seems good, and is getting better.
>Wing is pay-for (although only $40 or so), but can be trialled. I thought
>it was good, but had a huge problem trying to get it to play with a C library
>I was using...
>
>I've never managed to g
Hey there,
anyone have luck getting pychart installed on debian ?
there is no debian package for it (that i have found thus far)
and i need something that will allow me to place some
simple x, y plots on a chart in pygtk.
if any of you have a better solution, i am not completely sold out to
pychar
Danny Yoo wrote:
>On Sun, 18 Sep 2005, nephish wrote:
>
>
>
>>anyone have luck getting pychart installed on debian ? there is no
>>debian package for it (that i have found thus far) and i need something
>>that will allow me to place some simple x, y plots on a char
Danny Yoo wrote:
>>ok, got the package installed, but it seems to not be working, or the
>>examples are messed up.
>>here is the source
>>
>>from pychart import *
>>theme.get_options()
>>data = [["Jan", 10], ["Feb", 22], ["Mar", 30]]
>>
>>ar = area.T(x_coord = category_coord.T(data, 0),
>>
hey there,
anyone have any luck getting up and running with matplot-lib on debian?
from the website, i followed the instructions to get it with apt. but
something is messed up in the dependencies.
i get this
import pylab
Traceback (most recent call last):
File "", line 1, in -toplevel-
imp
Danny Yoo wrote:
>
>
>>anyone have any luck getting up and running with matplot-lib on debian?
>>from the website, i followed the instructions to get it with apt. but
>>something is messed up in the dependencies.
>>
>>
>
>Check with the Debian folks about this one; the problem you're running
Danny Yoo wrote:
>>>Check with the Debian folks about this one; the problem you're running
>>>into looks really specific to the way Debian has packaged libstdc++6.
>>>This topic isn't really one that folks on Tutor will necessarily have
>>>competence in. Instead, try the debian-python mailing lis
Hey there,
i use mx.DateTime.RelativeDateTimeDiff to get the difference between
date_x and date_y.
what i need to do divide this amount of time into 20 different times
that spaced out between the date_x and the date_y.
so if the difference between date_x and date_y is 20 hours, i need 20
DateT
of time - it is not the 20 hours since midnight, just 20 hours
>at any time in the universe.
>slice is just 1/20th of that same abstract time. But because of the munificence
>of Marc we can add that abstract hour to a real fixed time (ignoring
>Einstein of course)
>
>
>
>&g
Hey there,
i have a simple app that plots some numbers sent by a field sensor with
respect to time. i am trying to do this in pychart, but the problem is,
when the numbers come in, they do so at almost random times.
y shows the value sent by the sensor
x plots the time that the value came in.
what
hey there gents,
i am looking for a good place to start learning how to read a web page
with python and pull out bits of information for an app i am doing for
work. i have googled and looked at the docs. i looked at urllib and
httplib so i think this a place to kinda start. Does anyone know
Thanks a lot, this stuff is pretty easy.
i got a couple of things working here.
thanks for your help
sk
On Sun, 2005-10-23 at 13:46 +0100, Christopher Arndt wrote:
> nephish schrieb:
> > hey there gents,
> > i am looking for a good place to start learning how to read a we
Hey there Ed,
if you pull this off, let us know. i have wanted to do this very
thing, but just don't have the time.
sk
On Tue, 2005-10-25 at 14:24 -0700, Danny Yoo wrote:
>
> On Tue, 25 Oct 2005, Ed Hotchkiss wrote:
>
> > looking to write a myspace wrapper/module. what is the b
Hey there,
i am writing some (for me) pretty complicated stuff for work that
really needs to work.
i have looked at exception handling in the Learning Python book.
and i am using some try / except statements.
the problem is, that even though my script does not crash, i don
gt;
> Hope it helps. It took me originally a long time to know this trick, as
> it's kinda buried in the docs.
>
> Hugo
>
>
> nephish wrote:
> > Hey there,
> > i am writing some (for me) pretty complicated stuff for work that
> > really needs t
Yeah, cool. i am just starting this part.
i am glad i started with python.
thanks for the help
sk
On Wed, 2005-10-26 at 21:32 -0700, w chun wrote:
> > i am writing some (for me) pretty complicated stuff for work that
> > really needs to work.
> > i have looked at exception handlin
Hey there,
i am developing on a linux computer with the serial module. Now, i
already am able to recieve info from a serial RS232 device and process
everything ok. What i need to do now is write to the serial device, but
i also need to be able to not interrupt the script that is reading fro
script. not sure i really get what select() is all about
great link by the way, thanks.
shawn
On Mon, 2005-11-14 at 12:35 -0600, Hugo González Monteverde wrote:
> Hi Nephish,
>
> Are you using pyserial or rolling your own? Normally you can write and
> read to the /dev/ttySXX file at t
rt and another one to handle the writes.
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hugo González
> Monteverde
> Sent: Tuesday, 15 November 2005 7:36 a.m.
> To: nephish
> Cc: tutor
> Subject: Re: [Tutor] question abo
adline() from the ser port
> Release lock
>
> And in the sender thread,
>
> Acquire lock
> send msg over ser port
> Release lock
>
> Cheers
> Hans
>
> -Original Message-
> From: nephish [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 15 No
b/lock-objects.html
>
> Cheers
> Hans
>
>
> -Original Message-
> From: nephish [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 15 November 2005 11:23 a.m.
> To: Hans Dushanthakumar
> Cc: Hugo González Monteverde; tutor
> Subject: RE: [Tutor] question about seria
time.sleep(1)
> data_in = ser.read(100)
> print "Response: " + data_in
> time.sleep(.2)
>
>
> print "Closing Serial Port\n"
> ser.close()
>
>
>
> -Joe
>
>
> --- nephish <[EMAIL PROTECTED]> wrote:
>
&g
Hey there,
i am using a script to change a byte into an integer
like this:
a = the byte
value = ord(a)
but i cant find the operation that can change it back to a byte.
i am sure its easy, but i am missing how to do it.
thanks for any tips
sk
_
gt; theByteReloaded = struct.pack("i",value)
>
> You nmay want to check the docs for the struct module at python.org on that
> pattern.
>
>
> Liam Clarke-Hutchinson
>
>
> -Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Beha
Hey there,
what would be the best command to end a program with.
i have an app that i want to start every day at 6am from cron
but i want it to shutdown at 4pm
i was going to check by time on every loop
if int(time.strftime(%H)) > 4:
some en
right, greater > 16 was what i ment.
he he
it is not a gui.
is raise SystemExit built in ?
thanks gents
sk
On Tue, 2005-12-06 at 21:49 +, Alan Gauld wrote:
> > what would be the best command to end a program with.
>
> If its Tkinter (or another GuI) there will be a quit command
> somewhe
hey there,
i am using the MySQLdb module and i keep getting this error, it doesnt
offer much in the way of explanation
_mysql_exceptions.InterfaceError: (0, '')
does anyone know what this means ?
thanks
___
Tutor maillist - Tutor@python.org
http://m
Learning Python by O'Reilly,
got me started after realizing that Programming Python by O'Reilly was a
tad over me head.
i am new here too.
On Tue, 2005-12-20 at 14:46 -0600, Richard wrote:
> Afternoon all, My son asked me what books I would like for Christmas
> this year. So what would you recom
ooh ooh, i know this one, i have python do this for me every day !
target_dir = '/path/to/where/you/want/to/dump'
os.system("mysqldump --add-drop-table -c -u user -ppassword database
table > "+target_dir+"/table.bak.sql")
dont forget the p in front of your password !
hope this helps
On Tue, 2
Glad to help, glad you got it working too.!
shawn
On Wed, 2005-12-28 at 09:03 +, John Joseph wrote:
> --- nephish <[EMAIL PROTECTED]> wrote:
>
> > ooh ooh, i know this one, i have python do this for
> > me every day !
> >
> > target_di
Hey there, i have a program written in python that uses four threads
that run all at the same time. Now i want to add a new thread with the
same basic structure (threading.thread) that will run only when needed.
This one will not run in a loop, it will just run once and quit.
So, i may need this to
all i needed to know, thanks very much
shawn
On Tue, 2006-01-17 at 21:53 -0500, Kent Johnson wrote:
> nephish wrote:
> > Hey there, i have a program written in python that uses four threads
> > that run all at the same time. Now i want to add a new thread with the
> >
ok, so i have sparce documentation from a server that i need to make a
socket connection with.
the server wants to get info a certain way. Each message has to start
with an ascii "STX" (literally the three letters, not the standart ascii
'STX') then it has to have another four bytes that give the
ok, i am stuck again.
from the docs, the byte stream is supposed to look like this:
'S' 'T' 'X' [length indicator] [message type] [message] 'E' 'N' 'X'
the length indicator it says is a four byte integer number of a value N
( N would be how long the message body is )
the message ty
w do i make 200 occupy 4 bytes ?
>
>
> Hi Nephish,
>
> Have you had a chance to look at the 'struct' module yet?
>
> http://www.python.org/doc/lib/module-struct.html
>
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
lo there,
i know this comes up from time to time. i am considering buying 'python
in a nutshell'. All the reviews i have read for it are very good. But it
only covers up to python 2.2. i use 2.3 at work, and tinker with 2.4 at
home. As good a reference as it is, is it too dated to be that good
sti
thanks man, ill check out cookbook & see what its all about, too.
sk
On Thu, 2006-02-09 at 22:22 -0400, Andre Roberge wrote:
> On 2/9/06, nephish <[EMAIL PROTECTED]> wrote:
> > lo there,
> > i know this comes up from time to time. i am considering buying 'pyth
Sounds like its worth the wait. thanks all.
shawn
On Thu, 2006-02-09 at 19:02 -0800, Terry Carroll wrote:
> On Fri, 10 Feb 2006, nephish wrote:
>
> > i know this comes up from time to time. i am considering buying 'python
> > in a nutshell'. All the reviews i ha
yeah, one of the guys that posted earlier mentioned late feb as a
release of the new one. i think i am going to go ahead and get the
cookbook now, and then pick up the new nutshell later.
sk
On Fri, 2006-02-10 at 09:56 -0600, [EMAIL PROTECTED] wrote:
> Isn't there supposed to be a new edition of t
77 matches
Mail list logo