pyArkansas Conference, Oct 4

2008-08-14 Thread Greg Lindstrom
The Arkansas Python Users Group announces a 1-day Python conference to be held on the campus of the University of Central Arkansas (www.uca.edu) on October 4. We plan a 3-hour Introduction to Python class as well as talks on text/file processing, Python standard library, Django, pyGame, OLPC and

Re: Replace Several Items

2008-08-14 Thread Fredrik Lundh
Steven D'Aprano wrote: While I'm gratified that my prediction was so close to the results I found, I welcome any suggestions to better/faster/more efficient code. more things to try: code tweaks: - Factor out the creation of the regular expression from the tests: escape and compile are

Re: Replace Several Items

2008-08-14 Thread Fredrik Lundh
John Machin wrote: Clue: The effbot was the original author of the modern (Python 1.6?) version of the re module. And the author of the in and replace implementations in Python 2.5. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: os.system question

2008-08-14 Thread Fredrik Lundh
Kevin Walzer wrote: I'm also skeptical of the value of subprocess, at least as a complete replacement for os.popen (the original version): it currently provides no way to set a 'non-blocking' mode. I make heavy use of this kind of call in my code: self.file = os.popen('do stuff here'), 'r',

Re: win32service and Python

2008-08-14 Thread Aspersieman
David wrote: I am collecting informations about win32 services for Python but, except for few basic examples about Mark Hammond's win32serviceutil, I found nothing useful. Any link is welcome. Thank you. David This might also be useful: http://support.microsoft.com/kb/137890 It's

Re: Why nested scope rules do not apply to inner Class?

2008-08-14 Thread Bruno Desthuilliers
Calvin Spealman a écrit : On Wed, Aug 13, 2008 at 11:32 AM, Cousson, Benoit [EMAIL PROTECTED] wrote: (snip) There is no point of nested classes because nested classes _are not_ supported by python. Depending on the definition of supported. (snip) In my case, I'm trying to use a similar

Re: Why nested scope rules do not apply to inner Class?

2008-08-14 Thread Bruno Desthuilliers
Calvin Spealman a écrit : (snip) I know every rule has its exceptions. I put don't nest classes in with other similar rules I will claim, where I think its safest to say Never do this!, I know (from experience) and understand why goto's and globals are (usually) evil, I know why public

Re: You advice please

2008-08-14 Thread Hussein B
On Aug 13, 8:08 am, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Hussein B a écrit : (snip) Personally, I don't like the RoR framework at all. It doesn't come with any thing new or revolutionary, You could say the same about Python and about Django. None of them come with

Re: Why nested scope rules do not apply to inner Class?

2008-08-14 Thread Bruno Desthuilliers
Cousson, Benoit a écrit : (snip) Now if you say; it is not supported, don't do that, we will deprecate that feature, fine, I will use an alternative solution. I was just not aware of that nested class is evil group in the Python community. Probably because this group is mostly composed of Mr

Re: callbacks in python

2008-08-14 Thread Bruno Desthuilliers
Alexandru Mosoi a écrit : does anyone know a nice implementation of callbacks in python? i have issues mixing named unamed parameters. i want build a callback over a function such that some parameters are passed when callback is created and the rest are passed when the function is called.

Re: callbacks in python

2008-08-14 Thread Fredrik Lundh
Bruno Desthuilliers wrote: from functools import partial callback = partial(some_func, x=1, y) callback(z, t=4, u) from functools import partial callback = partial(some_func, x=1, y) File stdin, line 1 SyntaxError: non-keyword arg after keyword arg --

Re: The Importance of Terminology's Quality

2008-08-14 Thread Roedy Green
On Tue, 12 Aug 2008 12:28:33 -0700, [EMAIL PROTECTED] (Robert Maas, http://tinyurl.com/uh3t) wrote, quoted or indirectly quoted someone who said : Note: On IBM 1620, instructions and forward-sweeping data records were addressed by their *first* digit, whereas arithmetic fields were addressed by

JOB: Python Programmer

2008-08-14 Thread Shemia Miller
Greetings, I would like to hire a python expert who can quickly install the database with accuracy. It is only one script, and it shouldn't take no more than an hour. The script is at http://www.askspree.de My hosting provider doesn't have turbo, so I have vps. Quick way to earn $50.00. It is

Installing gasp

2008-08-14 Thread Cyprian Kumwaka
Find attached a screen capture of the message I get. Thanks.. attachment: gasp_error.GIF-- http://mail.python.org/mailman/listinfo/python-list

Re: callbacks in python

2008-08-14 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : Alexandru Mosoi a écrit : does anyone know a nice implementation of callbacks in python? i have issues mixing named unamed parameters. i want build a callback over a function such that some parameters are passed when callback is created and the rest are passed

Re: You advice please

2008-08-14 Thread Bruno Desthuilliers
Fredrik Lundh a écrit : (snip) Oh, please. It's a fact that Python advocacy is a lot more low-key than the advocacy of certain potentially competing technologies. It's always been that way. Too many Europeans involved, most likely. I'm afraid I don't get the joke about Europeans ??? (ok,

i want to control python using keyboard

2008-08-14 Thread [EMAIL PROTECTED]
hi i want to play alarm sound when i press a particular key in keyboard.so someone help me in doing it. Thanks and Regards Sasil.G -- http://mail.python.org/mailman/listinfo/python-list

Re: callbacks in python

2008-08-14 Thread Bruno Desthuilliers
Fredrik Lundh a écrit : Bruno Desthuilliers wrote: from functools import partial callback = partial(some_func, x=1, y) callback(z, t=4, u) from functools import partial callback = partial(some_func, x=1, y) File stdin, line 1 SyntaxError: non-keyword arg after keyword arg Yeps, I

Distinguish file and folder on ftp site

2008-08-14 Thread Mailing List SVR
Hi, is there a simple way to do this? ftplib seems unable to distinguish between files and dir, a mimetype check would be good, regards Nicola -- http://mail.python.org/mailman/listinfo/python-list

Re: Distinguish file and folder on ftp site

2008-08-14 Thread Fredrik Lundh
Mailing List SVR wrote: is there a simple way to do this? ftplib seems unable to distinguish between files and dir, a mimetype check would be good, the FTP protocol doesn't specify the format for the output from the LIST command, so you have to use some heuristics; see e.g. the code in

How do I organize my Python application code?

2008-08-14 Thread Dudeja, Rajat
Hi, I'm learning Python to write a GUI application using Tkinter Tk. I've evaluated Eclipse and Pydev. With the help of Fabio Zadrozny I successfully installed Eclipse and PyDev. Thanks. Now, I'm learning Eclipse and PyDev. And my problem is that I don't have an understanding of how the code

Re: How do I organize my Python application code?

2008-08-14 Thread Fredrik Lundh
Dudeja, Rajat wrote: And my problem is that I don't have an understanding of how the code in Python is generally organized, in case my code spans multiple files, modules, etc. I've been using C/C++ althrough my life on Linux and Visaul Studio, so the way their code is organized in a group of

Re: Read from serial port

2008-08-14 Thread binaryjesus
On Aug 14, 6:11 am, [EMAIL PROTECTED] wrote: Hi, I am newbie in python. I am working on Telit GM862 GPS/GPRS module which has python interpreter built in. But it seems this problem is pretty much related to general python structure. I need a promt/terminal when the device is connected to PC.

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Eric Brunel
On Wed, 13 Aug 2008 19:10:47 +0200, Mudcat [EMAIL PROTECTED] wrote: [snip] I was reading about Tile, and it sounds like I should be able to wrap a style around my current code to give it a different look. However it doesn't sound like it's quite ready for prime time yet. I downloaded the latest

Re: How do I organize my Python application code?

2008-08-14 Thread Ken Starks
Fredrik Lundh wrote: Dudeja, Rajat wrote: And my problem is that I don't have an understanding of how the code in Python is generally organized, in case my code spans multiple files, modules, etc. I've been using C/C++ althrough my life on Linux and Visaul Studio, so the way their code is

Re: Tkinter tab focus traversal causes listbox selection to clear, ie, lose the selected item

2008-08-14 Thread Eric Brunel
On Thu, 14 Aug 2008 04:49:51 +0200, Gerardo ARnaez [EMAIL PROTECTED] wrote: Hi. I am writing a program to help determine coumadin regimens to look at the code: http://sourceforge.net/projects/coumadinregimen/ The issue is that I have a variable that I want the use to select if they don't

Re: Read from serial port

2008-08-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I need a promt/terminal when the device is connected to PC. If user enters a command by serial port and press Enter then the data is read by the device and work on the command. This is similar to readline() function. Unfortunately there is no readline() function for

Re: Installing gasp

2008-08-14 Thread Steven D'Aprano
On Thu, 14 Aug 2008 08:27:43 +0300, Cyprian Kumwaka wrote: Find attached a screen capture of the message I get. Number one: it looks like you've shrunk the screenshot, which makes it very hard to read. Don't do that. Either that or you're using a bad font and/or type size in cmd.exe. Number

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Fredrik Lundh
Eric Brunel wrote: As I said above, if I had to choose today, I'd go Python 2.6 + tcl/tk 8.5 + Guilherme Polo's ttk wrappers. And putting on my GSoC hat, I'd agree. I'll probably prepare a ttk patch kit for Python 2.5 when things settle down a bit (unless someone beats me to it), but if you

Re: From Ruby to Python?

2008-08-14 Thread Simon Mullis
In case anyone else has the same question: This has been very useful: http://www.poromenos.org/tutorials/python Short, concise. Enough to get me going. SM 2008/8/13 Simon Mullis [EMAIL PROTECTED] Hi All, I just finally found 30 minutes to try and write some code in Python and realized

Re: threading

2008-08-14 Thread Mathieu Prevot
2008/8/13 Parimala [EMAIL PROTECTED]: Hello, I am using python2.5.1 version to run my test scripts. I want to use 'threading' module in my tests. As a startup program, I had run the following one. import threading import sys import time def hello(): i=0 try: while i10:

Re: Installing gasp

2008-08-14 Thread Fredrik Lundh
Steven D'Aprano wrote: On Thu, 14 Aug 2008 08:27:43 +0300, Cyprian Kumwaka wrote: Find attached a screen capture of the message I get. Number one: it looks like you've shrunk the screenshot, which makes it very hard to read. Don't do that. Either that or you're using a bad font and/or

Re: You advice please

2008-08-14 Thread Hussein B
On Aug 13, 11:14 am, Alia Khouri [EMAIL PROTECTED] wrote: Hussein B wrote: I'm a Java/Java EE developer and I'm playing with Python these days. I like the Python language so much and I like its communities and the Django framework. Sounds familiar... (-: My friends are about to open a

Re: You advice please

2008-08-14 Thread Python.Arno
On 14 aug 2008, at 09:41, Bruno Desthuilliers wrote: Fredrik Lundh a écrit : (snip) Oh, please. It's a fact that Python advocacy is a lot more low-key than the advocacy of certain potentially competing technologies. It's always been that way. Too many Europeans involved, most likely.

Re: You advice please

2008-08-14 Thread Jeroen Ruigrok van der Werven
-On [20080814 09:51], Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: I'm afraid I don't get the joke about Europeans ??? (ok, I'm gonna get me some coffee and will try again...) I think what was meant is: Python has a strong following in Europe and a lot of Europeans are participating in either

Re: Suggestion for improved ImportError message

2008-08-14 Thread Wojtek Walczak
On Thu, 14 Aug 2008 01:35:44 + (UTC), Kent Tenney wrote: Then go for it You can prepare a patch and ask on python-dev if the developers are interested. hehe, I'll get a C level patch accepted right after I out-swim Mike Phelps. It's really not that hard. The only hard thing (harder

python 64bits on macosx.5 /leopard

2008-08-14 Thread Mathieu Prevot
Hi, in order to run django on apache, I need mod_python in apache, and it runs in 64 on leopard, so I need to run python in 64 bits. I tryed ./configure --enable-framework OPT=-arch x86_64 but make fails: === gcc -u _PyMac_Error Python.framework/Versions/2.6/Python -o python.exe

Re: Replace Several Items

2008-08-14 Thread M.-A. Lemburg
On 2008-08-13 23:54, John Krukoff wrote: On Wed, 2008-08-13 at 09:39 -0700, gjhames wrote: I wish to replace several characters in my string to only one. Example, -, . and / to nothing I did like that: my_string = my_string.replace(-, ).replace(., ).replace(/, ).replace(), ).replace((, ) But

Formatting input text file

2008-08-14 Thread [EMAIL PROTECTED]
Hi, it's me again with tons of questions. I hava an input file structured like this: X XYData-1 1. 3.08333 2. 9.05526 3. 3.13581 ...

Re: Fixed-length text file to database script

2008-08-14 Thread Diez B. Roggisch
Stacey wrote: Hi Guys, I'm new to Python (mostly) and I'm wanting to use it for a new project I'm faced with. I have a machine (PLC) that is dumping its test results into a fixed-length text file. I need to pull this data into a database (MySQL most likely) so that I can access it with

Re: Replace Several Items

2008-08-14 Thread Wojtek Walczak
On 14 Aug 2008 01:54:55 GMT, Steven D'Aprano wrote: I don't have to, I can anticipate the results. Chances are that you're wrong. At the moment my average is about 0.75 of mistake per post on comp.lang.python (please, bare with me ;-)). I strongly believe that the statement I made above

Re: python 64bits on macosx.5 /leopard

2008-08-14 Thread Mark Dickinson
On Aug 14, 11:25 am, Mathieu Prevot [EMAIL PROTECTED] wrote: in order to run django on apache, I need mod_python in apache, and it runs in 64 on leopard, so I need to run python in 64 bits. I tryed ./configure --enable-framework OPT=-arch x86_64 but make fails: There was a thread on the

Re: JOB: Python Programmer

2008-08-14 Thread D'Arcy J.M. Cain
On Wed, 13 Aug 2008 21:25:53 -0400 Shemia Miller [EMAIL PROTECTED] wrote: Quick way to earn $50.00. It is an hour job. So which is it? A $50.00 job or a one hour job? -- D'Arcy J.M. Cain [EMAIL PROTECTED] | Democracy is three wolves http://www.druid.net/darcy/| and

Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Phillip B Oldham
Hi all. I'm playing with standalone ZODB at the moment trying to get a better understanding of its use in applications. I come from a PHP/MySQL background, and I'm taking my first steps with Python at the same time. One of the things I'm not understanding about ZODB is assigning incremental IDs

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Jean-Paul Calderone
On Thu, 14 Aug 2008 05:22:35 -0700 (PDT), Phillip B Oldham [EMAIL PROTECTED] wrote: Hi all. I'm playing with standalone ZODB at the moment trying to get a better understanding of its use in applications. I come from a PHP/MySQL background, and I'm taking my first steps with Python at the same

Re: From Ruby to Python?

2008-08-14 Thread Michael Mabin
I kind of went the other way. I knew some Python and then learned Ruby. I found that the two languages were similar enough that I didn't really need a Ruby for Python programmers help doc. There's not much of a paradigm shift (except for the whitespace and indentedness of Python) going from one

Re: Formatting input text file

2008-08-14 Thread brad
[EMAIL PROTECTED] wrote: Hi, it's me again with tons of questions. I hava an input file structured like this: X XYData-1 1. 3.08333 number1 number2 number3 number4 number5 number6 split is your friend. --

reading plist files

2008-08-14 Thread William Purcell
Hi, I'm trying to write a bookmark synchronizer from Firefox/Foxmarks to Safari. The Firefox side of things will be fairly easy and I thought the Safari side would be too. Right now I am simply attempting to read my Bookmarks.plist file using plistlib.py. Here is my attempt to read the file along

Re: reading plist files

2008-08-14 Thread Fredrik Lundh
William Purcell wrote: class 'xml.parsers.expat.ExpatError': not well-formed (invalid token): line 1, column 8 so, what does line 1 of the file look like? /F -- http://mail.python.org/mailman/listinfo/python-list

Re: From Ruby to Python?

2008-08-14 Thread Fredrik Lundh
Michael Mabin wrote: Ruby does have a little of the Perl spirit of 'There's More Than One Way to Do It'. And you do need shift to Python's 'There's Only One Way To Do It'. Careful. import this says: There should be one-- and preferably only one --obvious way to do it. Note the use of

Re: reading plist files

2008-08-14 Thread William Purcell
This is how it cut and pasted.. bplist00Ô This is what it looks like in a text editor (emacs)... [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ On Thu, Aug 14, 2008 at 8:18 AM, Fredrik Lundh [EMAIL PROTECTED]wrote: William Purcell wrote: class 'xml.parsers.expat.ExpatError': not

Re: reading plist files

2008-08-14 Thread Fredrik Lundh
William Purcell wrote: This is how it cut and pasted.. bplist00Ô This is what it looks like in a text editor (emacs)... [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ looks like a binary file, and is definitely not XML. probably a binary property list:

Re: An FTP Client...My first real program!

2008-08-14 Thread tmallen
On Aug 13, 11:53 pm, Python Nutter [EMAIL PROTECTED] wrote: sorry cut off due to original email being sent not to the list due to gmail: A second for that suggestion--the ftp module in the python standard library is very low level and not very useful for beginners as a lot of the heavy

Re: reading plist files

2008-08-14 Thread William Purcell
Sorry, I ment to reply to the mail list Thanks for the info. Do you know if these files can be handled in Python? On Thu, Aug 14, 2008 at 8:50 AM, William Purcell [EMAIL PROTECTED]wrote: On Thu, Aug 14, 2008 at 8:36 AM, Fredrik Lundh [EMAIL PROTECTED]wrote: William Purcell wrote:

Re: An FTP Client...My first real program!

2008-08-14 Thread tmallen
On Aug 14, 9:54 am, tmallen [EMAIL PROTECTED] wrote: On Aug 13, 11:53 pm, Python Nutter [EMAIL PROTECTED] wrote: sorry cut off due to original email being sent not to the list due to gmail: A second for that suggestion--the ftp module in the python standard library is very low level

RE: Formatting input text file

2008-08-14 Thread Edwin . Madari
save following code in script.py, and run it as 'python script.py your-data-file' with your sample data this prints out following which is what you are looking for (i think) 3.08333 9.05526 3.13581 4.08322 4.02526 3.95891 import sys data

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Diez B. Roggisch
Jean-Paul Calderone wrote: On Thu, 14 Aug 2008 05:22:35 -0700 (PDT), Phillip B Oldham [EMAIL PROTECTED] wrote: Hi all. I'm playing with standalone ZODB at the moment trying to get a better understanding of its use in applications. I come from a PHP/MySQL background, and I'm taking my first

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Jean-Paul Calderone
On Thu, 14 Aug 2008 16:15:11 +0200, Diez B. Roggisch [EMAIL PROTECTED] wrote: Jean-Paul Calderone wrote: On Thu, 14 Aug 2008 05:22:35 -0700 (PDT), Phillip B Oldham [EMAIL PROTECTED] wrote: [snip] How would one assign a unique ID to the root at that point? Here's one way class

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Thomas Guettler
auto increment: Here's one way class Sequence(Persistence): def __init__(self): self.current = 0 def next(self): self.current += 1 return self.current ticketSequence = Sequence() class Ticket(Persistence): def __init__(self):

for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread korean_dave
for y in range(0,iNumItems): print(str(y)) How do i make the output go IN ORDER 0 1 2 3 4 5 6 etc. instead of 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9 -- http://mail.python.org/mailman/listinfo/python-list

Re: xlrd cell background color

2008-08-14 Thread patrick . waldo
Thank you very much. I did not know there was a python-excel group, which I will certainly take note of in the future. The previous post answered my question, but I wanted to clarify the difference between xf.background.background_colour_index, xf.background.pattern_colour_index, and

Re: Tkinter updates - Easiest way to install/use Tile?

2008-08-14 Thread Guilherme Polo
On Wed, Aug 13, 2008 at 2:10 PM, Mudcat [EMAIL PROTECTED] wrote: So I haven't programmed much in Python the past couple of years and have been catching up the last few days by reading the boards. I'll be making commercial Python applications again and wanted to see what's new in the Gui

RE: Fixed-length text file to database script

2008-08-14 Thread Edwin . Madari
here is a working code snippet to read from MySQL db. python tutorial has examples of reading from files. put them together to do your task. === import MySQLdb con = MySQLdb.connect(host='127.0.0.1', port=4321, user='joe', passwd='shmoe',

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread Larry Bates
korean_dave wrote: for y in range(0,iNumItems): print(str(y)) How do i make the output go IN ORDER 0 1 2 3 4 5 6 etc. instead of 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9 That's not what it does on my system (Python 2.5.2 on Windows). Please post the code that you are actually running. for y

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread Bruno Desthuilliers
korean_dave a écrit : for y in range(0,iNumItems): print(str(y)) How do i make the output go IN ORDER 0 1 2 3 4 5 6 etc. instead of 0 1 10 11 12 13 14 2 3 4 5 6 7 8 9 Your code doesn't expose this problem: [EMAIL PROTECTED]:~$ python Python 2.5.1 (r251:54863, Mar 7 2008, 03:41:45) [GCC

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Jean-Paul Calderone
On Thu, 14 Aug 2008 16:41:57 +0200, Thomas Guettler [EMAIL PROTECTED] wrote: auto increment: Here's one way class Sequence(Persistence): def __init__(self): self.current = 0 def next(self): self.current += 1 return self.current

Re: i want to control python using keyboard

2008-08-14 Thread Larry Bates
[EMAIL PROTECTED] wrote: hi i want to play alarm sound when i press a particular key in keyboard.so someone help me in doing it. Thanks and Regards Sasil.G When you post to this list you need to give us more to go on than you have. 1) What have you tried that doesn't work? 2) What type of

Re: Factory for Struct-like classes

2008-08-14 Thread Larry Bates
eliben wrote: Hello, I want to be able to do something like this: Employee = Struct(name, salary) And then: john = Employee('john doe', 34000) print john.salary Basically, Employee = Struct(name, salary) should be equivalent to: class Employee(object): def __init__(self, name, salary):

Re: Replace Several Items

2008-08-14 Thread Gewton Jhames
thanks, guys. On Thu, Aug 14, 2008 at 7:35 AM, M.-A. Lemburg [EMAIL PROTECTED] wrote: On 2008-08-13 23:54, John Krukoff wrote: On Wed, 2008-08-13 at 09:39 -0700, gjhames wrote: I wish to replace several characters in my string to only one. Example, -, . and / to nothing I did like that:

a question about mysqldb

2008-08-14 Thread Evan
a simple problem but I do not know why...:(, could anyone help me? MySQLdb nominally uses just the %s placeholder style, in my script, i got error if you want to use placeholder(%s) for table name: + str=select tID,tNote from %s where

RE: How do I organize my Python application code?

2008-08-14 Thread Dudeja, Rajat
Fredrik Lundh wrote: That's all there is; there's no header files or declaration files or explicitly maintained object files etc; the program itself is just a bunch of Python files. I would simply add that if your python script produces one or more output files (for example a text or

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread korean_dave
Still the same output... Here's the actual code... for x in range(0,2): for y in range(0,27): for z in range(0,15): print(str(x) + + str(y) + + str(z)) -- http://mail.python.org/mailman/listinfo/python-list

ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Dudeja, Rajat
Hi, So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now I would like to take up Tkinter. I'm using Active State Python version 2.5 and found that there is not Tkinter and Tk module in it. To use Tkinter do

Re: a question about mysqldb

2008-08-14 Thread Fredrik Lundh
Evan wrote: a simple problem but I do not know why...:(, could anyone help me? MySQLdb nominally uses just the %s placeholder style, in my script, i got error if you want to use placeholder(%s) for table name: Placeholders are supposed to be used for *values*, not other parts of the SQL

RE: a question about mysqldb

2008-08-14 Thread Edwin . Madari
replace the name of table before calling *.execute. s.dbptr.execute(str % (e[0])) good luck. Edwin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Evan Sent: Thursday, August 14, 2008 11:27 AM To: python-list@python.org Subject: a question about mysqldb

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread Fredrik Lundh
korean_dave wrote: Still the same output... Here's the actual code... for x in range(0,2): for y in range(0,27): for z in range(0,15): print(str(x) + + str(y) + + str(z)) umm. that's even less related to your original output than your earlier

help with parsing email

2008-08-14 Thread Ahmed, Shakir
Hi all, I do appreciate if any one can help me for my following problem: I need to grab/parse numeric numbers such as app number from incoming emails stored in Microsoft Outlook (Microsoft Exchange server) with specified subject line. Any help with the python script is highly

Re: a question about mysqldb

2008-08-14 Thread Bruno Desthuilliers
Evan a écrit : a simple problem but I do not know why...:(, could anyone help me? MySQLdb nominally uses just the %s placeholder style, in my script, i got error if you want to use placeholder(%s) for table name: db-api placeholders won't work for table names - or for anything that isn't

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread korean_dave
hahah true. Sorry folks. I am running a third party scripting machine that uses python. It's the third-party program that is at fault. More detail involved that you don't need to know, but it's not python's fault. Sorry for the inconvenience. On Aug 14, 11:47 am, Fredrik Lundh [EMAIL PROTECTED]

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread Wojtek Walczak
On Thu, 14 Aug 2008 08:35:15 -0700 (PDT), korean_dave wrote: Still the same output... Here's the actual code... for x in range(0,2): for y in range(0,27): for z in range(0,15): print(str(x) + + str(y) + + str(z)) This code won't produce the

Re: strptime and timezones

2008-08-14 Thread Tom Anderson
On Wed, 13 Aug 2008, Christian Heimes wrote: Tom Anderson wrote: Secondly, do you really have to do this just to parse a date with a timezone? If so, that's ridiculous. No, you don't. :) Download the pytz package from the Python package index. It's *the* tool for timezone handling in

SOAPpy and ArrayOfString

2008-08-14 Thread annu miya
Hi,   In the article below you mention that you were succesful at doing this through perl. Would it be possible to send me the perl code?   http://mail.python.org/pipermail/python-list/2007-January/423311.html   Thank You   Regards   Sid --

Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Larry Bates
Dudeja, Rajat wrote: Hi, So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now I would like to take up Tkinter. I'm using Active State Python version 2.5 and found that there is not Tkinter and Tk module in

Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Russell E. Owen
In article [EMAIL PROTECTED], Dudeja, Rajat [EMAIL PROTECTED] wrote: Hi, So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now I would like to take up Tkinter. I'm using Active State Python version

Getting stdout using ctypes.

2008-08-14 Thread Mathias Lorente
Hello all. I have a simple application (C++) that relies on shared libraries. It works fine in console mode. Lot of job is done into the shared library, so there is some calls to 'std::cout' to inform the user in it. Now, I would like to wrap everything into a GUI, remove the application

urldecode function?

2008-08-14 Thread [EMAIL PROTECTED]
hi is there a function that does the opposite of urllib.urlencode? for example urldecode('Cat=1by=downstart=1827') returns a dictionary with {'Cat':1, 'by':'down','start':1827) thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread Bruno Desthuilliers
korean_dave a écrit : Still the same output... same as what, with what ??? Do yourself (and the world) a favour : learn to quote the posts you're answering to. Here's the actual code... for x in range(0,2): for y in range(0,27): for z in range(0,15):

Re: win32service and Python

2008-08-14 Thread David
Il Wed, 13 Aug 2008 16:03:33 -0500, Larry Bates ha scritto: Actually those examples in Python for Win32 book are quite good and basically all services are built using the same framework shown there. If you run into a problem post something here or better yet on comp.python.windows group

Re: urldecode function?

2008-08-14 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: is there a function that does the opposite of urllib.urlencode? for example urldecode('Cat=1by=downstart=1827') returns a dictionary with {'Cat':1, 'by':'down','start':1827) the cgi modules contains assorted stuff for parsing serialized HTTP forms and query

Re: Getting stdout using ctypes.

2008-08-14 Thread Larry Bates
Mathias Lorente wrote: Hello all. I have a simple application (C++) that relies on shared libraries. It works fine in console mode. Lot of job is done into the shared library, so there is some calls to 'std::cout' to inform the user in it. Now, I would like to wrap everything into a GUI,

Re: Fixed-length text file to database script

2008-08-14 Thread Larry Bates
Michael Ströder wrote: Larry Bates wrote: [EMAIL PROTECTED] wrote: I have a machine (PLC) that is dumping its test results into a fixed- length text file. I need to pull this data into a database (MySQL most likely) so that I can access it with Crystal Reports to create daily reports for my

Re: Getting stdout using ctypes.

2008-08-14 Thread Grant Edwards
On 2008-08-14, Larry Bates [EMAIL PROTECTED] wrote: Mathias Lorente wrote: Hello all. I have a simple application (C++) that relies on shared libraries. It works fine in console mode. Lot of job is done into the shared library, so there is some calls to 'std::cout' to inform the user in

Re: RPM of a Python program

2008-08-14 Thread Jason Scheirer
On Aug 13, 5:52 pm, Clay Hobbs [EMAIL PROTECTED] wrote: I want to make an RPM (Redhat Package Manager) file to install a Python program (not a module).  How is this done?  Does it use Distutils, or something completely different?  Thanks in advance. -- Ratfink You first want to make sure

Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Guilherme Polo
On Thu, Aug 14, 2008 at 1:20 PM, Russell E. Owen [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Dudeja, Rajat [EMAIL PROTECTED] wrote: Hi, So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now

Re: Getting stdout using ctypes.

2008-08-14 Thread Christian Heimes
Grant Edwards wrote: If he's running Unix, he needs to replace the stdout file descriptor (fd 1), with something that's connected to the write end of a pipe. Then he needs to read the other (read) end of the pipe in his application. You do that using the dup2() system call: It's dangerous to

Re: Trying ZODB, background in Relational: mimic auto_increment?

2008-08-14 Thread Diez B. Roggisch
Jean-Paul Calderone schrieb: On Thu, 14 Aug 2008 16:15:11 +0200, Diez B. Roggisch [EMAIL PROTECTED] wrote: Jean-Paul Calderone wrote: On Thu, 14 Aug 2008 05:22:35 -0700 (PDT), Phillip B Oldham [EMAIL PROTECTED] wrote: [snip] How would one assign a unique ID to the root at that point?

Re: Formatting input text file

2008-08-14 Thread Gerard flanagan
[EMAIL PROTECTED] wrote: Hi, it's me again with tons of questions. I hava an input file structured like this: X XYData-1 1. 3.08333 2. 9.05526 3. 3.13581

Re: ActiveState Python v2.5 doesn't come with Tkinter or Tk installed.

2008-08-14 Thread Trent Mick
Dudeja, Rajat wrote: So, now I've finally started using Eclipse and PyDev as an IDE for my GUI Application. I just wrote some sample programs as an hands on. Now I would like to take up Tkinter. I'm using Active State Python version 2.5 and found that there is not Tkinter and Tk module in it.

Re: for y in range (0,iNumItems)-- not in order?

2008-08-14 Thread korean_dave
Well, here is the whole problem. It works perfectly. We are using a 3rd party automation program. Basically instead of print() i used a test.log() command that feeds into the 3rd party program and gives me output. I can sort output by date, time, category, etc. As you've seen, the program runs

Re: a podcast for music algo-comped with python

2008-08-14 Thread Paul Boddie
On 12 Aug, 05:05, '2+ [EMAIL PROTECTED] wrote: oh .. am just curious who are the guys over here composing weird music with python as my self-introduction... this is the podcast am focusing on cs.py: http://www002.upp.so-net.ne.jp/buyobuyo/micro/rss.xml files of scripts i used to create

  1   2   3   >