Re: Using python with MySQL

2007-05-03 Thread hlubenow
hlubenow wrote: > There's even another approach: ... On the other hand you may be better off with the "mysql-python"-module. Anyway, here's a nice overview over the most commonly used MySQL-commands (The commands should speak for themselves, even if the explanation

Re: Using python with MySQL

2007-05-03 Thread hlubenow
HMS Surprise wrote: > Greetings, > > I need to peform some simple queries via MySQL. Searching the list I > see that folks are accessing it with python. I am very new to python > and pretty new to MySQL too. Would appreciate it if you could point me > to some documentation for accessing MySQL via

Re: key detect

2007-04-27 Thread hlubenow
Alex Taslab wrote: > Hi everybody, does anyone know how to detect a key press from a > keyboard. Well I do know how to do that, but i need to detect just one > press and ignore the others. I mean, my program checks an input from the > outside (a sensor) and i emulate that signal as a keypress, but

Re: Generate report containing pdf or ps figures?

2007-04-24 Thread hlubenow
Grant Edwards wrote: > On 2007-04-23, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote: > >>> Is there a PDF generation library that can place EPS or PDF >>> figures on a page? What about http://pybrary.net/pyPdf/ It does some very interesting things. But I'm not really sure, if it does what you'r

Re: Future Python Gui?

2007-04-18 Thread hlubenow
[EMAIL PROTECTED] wrote: > If this were just a tool for me, it wouldn't matter. My concern is > distribution. If anybody who wants to run my software then they also > have to go through all the trouble to install these extensions, none > of which seem to have decent instructions. I'm an old-tim

Re: Compiling python from soruce vs RPM ?

2007-04-18 Thread hlubenow
howa wrote: > I have compiled python 2.5 from source > > i.e. > > ./configure > make > make install > > > but when i try to install another package require python, seems it > can't regonize python... > > e.g.. > > > /usr/bin/python is needed by xyz Does "/usr/bin/python" exist ? Why haven

Re: Stdout

2007-04-14 Thread hlubenow
[EMAIL PROTECTED] wrote: > Dear Users, > > I am trying to recover through the python function > popen3 the stdout,in,err of a launched process. > > I would like also to recover the stdout which you can > get only through the command: command1 >& filename > > Do you know how I can access to th

Re: Check for keypress on Linux xterm ?

2007-04-10 Thread hlubenow
I wrote: > Hello, > > I'd like to check, if a single key is pressed on a Linux xterm. > My problem is, I don't want my program to wait for the keypress. > I just want to check, if a key is currently pressed and if not, I'd like > to continue with my program (like "INKEY$" in some BASIC-dialects).

Re: Check for keypress on Linux xterm ?

2007-04-10 Thread hlubenow
Grant Edwards wrote: > I do make mistakes, but before telling somebody he's wrong, it > might be a good idea to actually try what he's suggested. ;) I completely agree. The script waited at first for key-input, so I thought, I was right. But I was not. I apologize ! H. -- http://mail.python.org

Re: Check for keypress on Linux xterm ?

2007-04-10 Thread hlubenow
Grant Edwards wrote: > On 2007-04-09, hlubenow <[EMAIL PROTECTED]> wrote: > >> My problem is, I don't want my program to wait for the keypress. >> I just want to check, if a key is currently pressed and if not, I'd like >> to continue with my progr

Re: Check for keypress on Linux xterm ?

2007-04-10 Thread hlubenow
Grant Edwards wrote: > On 2007-04-09, hlubenow <[EMAIL PROTECTED]> wrote: > >> My problem is, I don't want my program to wait for the keypress. >> I just want to check, if a key is currently pressed and if not, I'd like >> to continue with my progr

Check for keypress on Linux xterm ?

2007-04-09 Thread hlubenow
Hello, I'd like to check, if a single key is pressed on a Linux xterm. This code waits for a key to be pressed and returns the character: #!/usr/bin/env python import sys import tty import termios fd = sys.stdin.fileno() old_settings = termios.tcget

Re: Can't Get Email Interface Working

2007-04-07 Thread hlubenow
Eric Price wrote: > Good grief! And they call a 722-line program "simple"?! LOL! > I did what I need to do with a __one_line_shell_script__ LOL! > Naw, if I have to go through all that, I'll skip on python this time > around, thank you very much! > Eric Ok, "simplemail.py" is quite long. That's b

Re: Can't Get Email Interface Working

2007-04-07 Thread hlubenow
Eric Price wrote: > Hi; > I'm writing a script that includes an email function. So I went to the > cookbook and dug up this, and tweaked it just a bit to make it easier to > get it to work, but it throws an error: > def createMail(sender, recipient, subject, html, text): > ... import Mime

Re: Hide the python-script from user

2007-04-07 Thread hlubenow
hlubenow wrote: > hlubenow wrote: > >> ts-dev wrote: >> >>> On Apr 6, 3:19 pm, hlubenow <[EMAIL PROTECTED]> wrote: >>>> recently there was a thread about hiding the python-script from the >>>> user. The OP could use >>> >>

Re: Hide the python-script from user

2007-04-06 Thread hlubenow
hlubenow wrote: > ts-dev wrote: > >> On Apr 6, 3:19 pm, hlubenow <[EMAIL PROTECTED]> wrote: >>> recently there was a thread about hiding the python-script from the >>> user. The OP could use >> >> Interesting - thanks > > Well, testing i

Re: Hide the python-script from user

2007-04-06 Thread hlubenow
ts-dev wrote: > On Apr 6, 3:19 pm, hlubenow <[EMAIL PROTECTED]> wrote: >> recently there was a thread about hiding the python-script from the user. >> The OP could use > > Interesting - thanks Well, testing it, it doesn't seem to work very well ... It seems, Py

Hide the python-script from user

2007-04-06 Thread hlubenow
Hi, recently there was a thread about hiding the python-script from the user. The OP could use http://freshmeat.net/projects/pyobfuscate/ H. -- http://mail.python.org/mailman/listinfo/python-list

Re: Extract zip file from email attachment

2007-04-05 Thread hlubenow
erikcw wrote: > Hi all, > > I'm trying to extract zip file (containing an xml file) from an email > so I can process it. But I'm running up against some brick walls. > I've been googling and reading all afternoon, and can't seem to figure > it out. > > Here is what I have so far. > > p = POP3(

Re: Looping issues

2007-04-05 Thread hlubenow
[EMAIL PROTECTED] wrote: > On Apr 5, 2:18 pm, "anglozaxxon" <[EMAIL PROTECTED]> wrote: >> On Apr 5, 2:01 pm, [EMAIL PROTECTED] wrote: >> >> >> >> > What I am trying to do is compare two files to each other. >> >> > If the 2nd file contains the same line the first file contains, I want >> > to prin

Re: way to extract only the message from pop3

2007-04-05 Thread hlubenow
flit wrote: > Hello All, > > Using poplib in python I can extract only the headers using the .top, > there is a way to extract only the message text without the headers? As mentioned before, you should use module "email": #!/usr/bin/env python import popli

Re: way to extract only the message from pop3

2007-04-03 Thread hlubenow
[EMAIL PROTECTED] wrote: > I found a tutorial on parsing email that should help you: > > http://www.devshed.com/c/a/Python/Python-Email-Libraries-SMTP-and-Email-Parsing/ > > Also see the email module: > > http://www.python.org/doc/2.3.5/lib/module-email.html > > Mike Well, I couldn't work wit

Re: Pygame Q (linux) beginner

2007-04-02 Thread hlubenow
enquiring mind wrote: > Thank you very much. A buddy installed SUSE 10 in Dec. for me so I > shall ask him to look for rpm which I understand from your post includes > pygame. You have no idea how much I appreciate your information. My pleasure. By the way: It would be quite easy to install i

Re: How can i compare a string which is non null and empty

2007-04-01 Thread hlubenow
[EMAIL PROTECTED] wrote: > > Hi, > > how can i compare a string which is non null and empty? > > > i look thru the string methods here, but cant find one which does it? > > http://docs.python.org/lib/string-methods.html#string-methods > > In java,I do this: > if (str != null) && (!str.equals

Re: Pygame Q (linux) beginner

2007-04-01 Thread hlubenow
enquiring mind wrote: > Running 2.4.1 Python (learning) > Running SUSE Linux 10 > > At Chapter 5 is where the Pygame module is > introduced so I have a little time before I have to figure out what I > have to download and install. Are you asking for advice how to install pygame on SuSE 10 ? Wel

Re: Mouse click in python

2007-03-31 Thread hlubenow
Synt4x wrote: > I'm creating a webcam user interface (to control google earth through > my webcam) and I still can't find a good example to how to control the > mouse to "click and drag" (not just click and release). Pygame: http://www.pygame.org/ http://www.pygame.org/docs/ref/mouse.html provi