ANN: Assembly Line 0.8.2

2009-02-16 Thread Greg Ewing
I have released an updated version of Assembly Line, my entry in PyWeek 6 and later the Pyggy Awards. http://media.pyweek.org/dl/1007/greg_pgF09/AssemblyLine-0.8.2.zip About Assembly Line --- Become a FADE! That's Factory Automation Design Engineer for Pixall Manufacturing,

Re: hist without plotting

2009-02-16 Thread Peter Otten
Nick Matzke wrote: Is there a way to run the numpy hist function or something similar and get the outputs (bins, bar heights) without actually producing the plot on the screen? (R has a plot = false option, something like this is what I'm looking for...) First hit googling for numpy hist

Re: Display a list using PyQt

2009-02-16 Thread Gerhard Häring
member Basu wrote: I'm writing an application with PyQt as the GUI toolkit. I have a function that returns a simple list and I would like to update a List View widget with it. However I can't get it to work. I'm not sure if I need to subclass one of the Model classes, because it is just a

Windows vista

2009-02-16 Thread loveshadowdog
Hi. My name is toru. I start learning python couple weeks ago. I install the compiler from python.org. but I cannot use the IDLE program. (command line works fine so far) the error screen says that the my personal fire wall is blocking the program to run. I am not sure how to fix this. By the

Will multithreading make python less popular?

2009-02-16 Thread rushenaly
Hi everybody, I am an engineer. I am trying to improve my software development abilities. I have started programming with ruby. I like it very much but i want to add something more. According to my previous research i have designed a learning path for myself. It's like something below. 1.

How to enum all the users from a windows domain via python win32net module?

2009-02-16 Thread vimuser
I tried the command net user /DOMAIN in windows console(cmd.exe), and it showed me all the usernames in my domain without any problems. But when I tried it in python with these commands : info=win32net.NetUserEnum(DOMAIN_NAME,1), info=win32net.NetUserEnum(r\\DOMAIN_NAME,1),and

Re: How to enum all the users from a windows domain via python win32net module?

2009-02-16 Thread Tim Golden
vimuser wrote: I tried the command net user /DOMAIN in windows console(cmd.exe), and it showed me all the usernames in my domain without any problems. But when I tried it in python with these commands : info=win32net.NetUserEnum(DOMAIN_NAME,1), info=win32net.NetUserEnum(r\\DOMAIN_NAME,1),and

[Fwd: Re: Pythonic way to determine if a string is a number]

2009-02-16 Thread Tim Golden
[Resending after a bounce from mailing list] pyt...@bdurham.com wrote: try: float (input) except ValueError: return False else: return True I follow the semantics, but I don't know why I would prefer the try/else technique over the simpler: try: float( input ) return True

Re: Will multithreading make python less popular?

2009-02-16 Thread Andreas Kaiser
On 16 Feb., 10:34, rushen...@gmail.com wrote: Hi everybody, I am an engineer. I am trying to improve my software development abilities. I have started programming with ruby. I like it very much but i want to add something more. According to my previous research i have designed a learning path

Re: Will multithreading make python less popular?

2009-02-16 Thread Aleksa Todorovic
Hi, Rushen! I'm also new to using Python but from what I've found, GIL is very intentional decision. It is one of the features of Python which make it so powerful. I believe that if it didn't have GIL, Python wouldn't be half near where it is now (regarding it as a language, community, platform

explain

2009-02-16 Thread Saeed Iravani
I download python 2.5.4 and install but I dont know that how perform python? I dont know from which directory perform python? Please explain for me. Thank you -- http://mail.python.org/mailman/listinfo/python-list

explain

2009-02-16 Thread Saeed Iravani
I download python 2.5.4 and install but I dont know that how run python? I dont know from which directory run python? Please explain for me. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: explain

2009-02-16 Thread Jeroen Ruigrok van der Werven
-On [20090216 11:17], Saeed Iravani (si.4...@yahoo.com) wrote: I download python 2.5.4 and install but I dont know that how perform python? I dont know from which directory perform python? It would help if you would clarify which operating system you are using. On Unix/Linux systems you make

Re: Windows vista

2009-02-16 Thread Jeroen Ruigrok van der Werven
-On [20090216 09:50], loveshadow...@yahoo.com (loveshadow...@yahoo.com) wrote: the error screen says that the my personal fire wall is blocking the program to run. My default Windows Vista x64 installation is not blocking my IDLE at all, so it might be you're not using the standard Windows

Re: Will multithreading make python less popular?

2009-02-16 Thread Michele Simionato
On Feb 16, 10:34 am, rushen...@gmail.com wrote: Hi everybody, I am an engineer. I am trying to improve my software development abilities. I have started programming with ruby. I like it very much but i want to add something more. According to my previous research i have designed a learning

Re: Will multithreading make python less popular?

2009-02-16 Thread Tim Rowe
2009/2/16 rushen...@gmail.com: Hi everybody, I am an engineer. I am trying to improve my software development abilities. I have started programming with ruby. I like it very much but i want to add something more. According to my previous research i have designed a learning path for myself.

Creating custom formatter function

2009-02-16 Thread Garrett Cooper
Hello Python folks, I have a function where I'd like to prefix a format string via a `prefix' string. The definition of the base method is as follows: #START CODE def print_message(prefix, out_stream, fmt, *args, **kwargs): Print out [prefix]: [message] message = fmt if 0

Re: Will multithreading make python less popular?

2009-02-16 Thread rushenaly
Hi again, Dear Andreas I know about GIL in ruby interpreter, they are trying to solve problems because of GIL but it is not so important for me because i like ruby because of its esthetic and it helps me to grasp some programming concepts. As i know it is not so powerful language like java.

Re: Will multithreading make python less popular?

2009-02-16 Thread Tim Rowe
2009/2/16 rushen...@gmail.com: I want to learn python + c++ or java because of the desire of having python's felxibility and easiness and c++ or java's stability and speed and power together. Yes, that's what I mean by different tradeoffs. Python is much easier to program in than C++ or Java

Re: Module to read/write MIDI ?

2009-02-16 Thread Tim Wintle
I had my first look around pypi.python.org/pypi yesterday and didn't see anything. Is there a MIDI-module for Python ? If not, I'll email Sean to ask if he'd mind me translating his module into Python3... http://www.mxm.dk/products/public/pythonmidi This is the only project I have seen that

replace ftp by local copy

2009-02-16 Thread loial
I have been given an old python application that calls ftplib in many places to copy files to a remote server. I have been given the task of cloneing this code so that ftp is not used, but files are just copied locally in a scenerio where ftp is not available. The code is not well structured

logging and daemons

2009-02-16 Thread Fernando M. Maresca
Hello. I'm in the process of replacing a custom logger class in one of my apps that has several daemons. In the last step of daemonizing a program, after closing fds, stderr and stdout are redirected to the logfile of the program. Now, I'm trying to use TimedRotatingFileHandler as the only

Re: logging and daemons

2009-02-16 Thread Garrett Cooper
On Mon, Feb 16, 2009 at 5:02 AM, Fernando M. Maresca fmare...@gmail.com wrote: Hello. I'm in the process of replacing a custom logger class in one of my apps that has several daemons. In the last step of daemonizing a program, after closing fds, stderr and stdout are redirected to the

Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
Hello, thanks for the answer. On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python (it has to have read, write, and flush methods, IIRC to function). The only thing is (like all things dealing with

Re: Will multithreading make python less popular?

2009-02-16 Thread andrew cooke
rushen...@gmail.com wrote: Hi everybody, I am an engineer. I am trying to improve my software development abilities. I have started programming with ruby. I like it very much but i want to add something more. According to my previous research i have designed a learning path for myself. It's

Re: Will multithreading make python less popular?

2009-02-16 Thread andrew cooke
andrew cooke wrote: something like Haskell or OCaml. Or, if you want to get hands-on experience of concurrency now, Erlang. I think for once I said something useful there. I think you would probably enjoy Erlang, and it would be very useful for understanding concurrency. Also, Erlang is not

Re: logging and daemons

2009-02-16 Thread Garrett Cooper
On Mon, Feb 16, 2009 at 5:15 AM, Fernando M. Maresca fmare...@gmail.com wrote: Hello, thanks for the answer. On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python (it has to have read, write, and

Re: Will multithreading make python less popular?

2009-02-16 Thread rushenaly
Dear Andrew, I think reading beating the averages by paul graham before some experience is not a very good decision. :) Thank you Andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: logging and daemons

2009-02-16 Thread Neal Becker
Garrett Cooper wrote: On Mon, Feb 16, 2009 at 5:15 AM, Fernando M. Maresca fmare...@gmail.com wrote: Hello, thanks for the answer. On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python (it has to

to access the gretest

2009-02-16 Thread VEERENDRA
Vjrocks.comhttp://www.vjrocks.com/ BCA BCA Ist YEARhttp://www.vjrocks.com/BCA_Ist_year.html BCA IInd YEARhttp://www.vjrocks.com/BCA_IInd_year.html BCA IIIrd YEARhttp://www.vjrocks.com/BCA_IIIrd_year.html LANGUAGE Introduction to Computershttp://www.vjrocks.com/Introduction to Computers.html

What is a phyton?

2009-02-16 Thread www.livtotravel.blogspot.com
is phyton a programming language? what can a python do? how is it different from others? -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating custom formatter function

2009-02-16 Thread Alan G Isaac
On 2/16/2009 6:50 AM Garrett Cooper apparently wrote: I was wondering what the proper means was for formatting strings. http://docs.python.org/library/string.html#string-formatting http://docs.python.org/library/string.html#template-strings

Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread Mamahita Sela
Dear All, I have read several howtos for threading in PyGTK. I have tried some but with no luck. What i want is: i can keep typing in gtk.TextView while periodically doing ping some hosts. I think, the thread part is working since i can ping so fast (even for not reply host, around 3 s for

Re: Will multithreading make python less popular?

2009-02-16 Thread Aleksa Todorovic
Or the other way around :-) Little off-topic, but... After several months of fighting with Java threads, dead locks, live locks, race conditions, I've rewritten my game server synchronization so that threads are executed in concurrent way (with only exceptions being socket sending and recieving

Re: Will multithreading make python less popular?

2009-02-16 Thread rushenaly
Dear Aleksa, As you mentioned, using multi cores makes programs more fast and more popular. But what about stackless python? Does it interpret same set of python libraries with Cpython or Does it have a special sub set? Thank you Rusen -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a phyton?

2009-02-16 Thread Thorsten Kampe
* www.livtotravel.blogspot.com (Mon, 16 Feb 2009 05:45:09 -0800 (PST)) is phyton a programming language? http://en.wikipedia.org/wiki/Phyton -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread Jean-Paul Calderone
On Mon, 16 Feb 2009 05:47:22 -0800 (PST), Mamahita Sela mamahitas...@yahoo.com wrote: Dear All, I have read several howtos for threading in PyGTK. I have tried some but with no luck. What i want is: i can keep typing in gtk.TextView while periodically doing ping some hosts. You don't need

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 14, 3:27 pm, Michele Simionato michele.simion...@gmail.com wrote: I lack the context to see how this could be fixed in your case, but this a not a show stopper, you can just keep the original decorator and forget about making itsignature preserving. I'm sorry for the possibly dumb

Re: What is a phyton?

2009-02-16 Thread Diez B. Roggisch
Thorsten Kampe schrieb: * REMOVED(Mon, 16 Feb 2009 05:45:09 -0800 (PST)) is phyton a programming language? http://en.wikipedia.org/wiki/Phyton Thanks for quoting the OPs spam name so that the visibility of his post is increased. Diez --

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Michele Simionato
On Feb 16, 3:50 pm, Gustavo Narea m...@gustavonarea.net wrote: On Feb 14, 3:27 pm, Michele Simionato michele.simion...@gmail.com wrote: I lack the context to see how this could be fixed in your case, but this a not a show stopper, you can just keep the original decorator and forget about

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 16, 3:56 pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 16, 3:50 pm, Gustavo Narea m...@gustavonarea.net wrote: On Feb 14, 3:27 pm, Michele Simionato michele.simion...@gmail.com wrote: I lack the context to see how this could be fixed in your case, but this a

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Michele Simionato
On Feb 16, 4:07 pm, Gustavo Narea m...@gustavonarea.net wrote: But the problem is that it is broken. That decorator is for controller actions in Pylons-powered web applications (which are instance methods). Pylons inspects the action's signature to find what parameters it's going to pass to

Re: Will multithreading make python less popular?

2009-02-16 Thread Hendrik van Rooyen
andrew cooke and...@aorg wrote: The GIL is an implementation detail. I suspect that it could be largely removed if there was sufficient need. But that still wouldn't make Python a good language for programming on multiple cores. That's not as big a deal as you think, because we currently

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 16, 4:18 pm, Michele Simionato michele.simion...@gmail.com wrote: Yes, I am saying don't mess with the internal mechanism of Pylons and leave it as it was. Or was it broken from the beginning? The only reason I see for you to touch those things is if you are a Pylons core developer.

RedHat 4

2009-02-16 Thread Germán Gutiérrez
Hi, I need to confirm and certificate python 2.5 works in a RedHat Enterprise 4 and I don't know where I find that information. Please, if anybody knows some URL in RedHat or Python with this information email me. Thanks Germán Gutiérrez Gayoso Temuco --

Re: Python interface to ODF documents?

2009-02-16 Thread Lie Ryan
On Sun, 15 Feb 2009 22:03:25 +0200, Dotan Cohen wrote: Is there a Python interface to ODF documents? I'm thinking of something that will import, for example, an ADS spreadsheet into a multidimensional array (including formulas and formatting) and let me manipulate it, then save it back.

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Michele Simionato
On Feb 16, 4:29 pm, Gustavo Narea m...@gustavonarea.net wrote: On Feb 16, 4:18 pm, Michele Simionato michele.simion...@gmail.com wrote: Yes, I am saying don't mess with the internal mechanism of Pylons and leave it as it was. Or was it broken from the beginning? The only reason I see for

Re: RedHat 4

2009-02-16 Thread J. Cliff Dyer
It *works* in RHEL 4, but it doesn't come as a package. RHEL4 ships with Python 2.3, and RHEL 5 only ships with Python 2.4, even though 2.5 had been out for god knows how long when it came out. Though I haven't tested it, I wouldn't recommend replacing the system's python binary with 2.5 if you

Re: Will multithreading make python less popular?

2009-02-16 Thread Christof Donat
Hi, But there is something interesting, something like multi processing. But is it a real alternative for multi threading. As i searched it is not, it requires heavy hardware requirements (lots of memory, lots of cpu power). Not necessarily. For the memory, modern operating Systems can

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 16, 4:40 pm, Michele Simionato michele.simion...@gmail.com wrote: It was broken from the beginning on Pylons. I'm a TurboGears 2 core developer, and TurboGears is powered by Pylons as of version 2. The decorator has always worked in TurboGears because of the way TG finds the action

Re: What is a phyton?

2009-02-16 Thread Python
On 16 feb 2009, at 14:45, www.livtotravel.blogspot.com wrote: is phyton a programming language? what can a python do? how is it different from others? -- If i were to replace 'python' with 'french' would you be willing to write the answer in one email? it's gonna be a loong email... if

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 16, 4:59 pm, Gustavo Narea m...@gustavonarea.net wrote: On Feb 16, 4:40 pm, Michele Simionato michele.simion...@gmail.com wrote: It was broken from the beginning on Pylons. I'm a TurboGears 2 core developer, and TurboGears is powered by Pylons as of version 2. The decorator

Re: Python interface to ODF documents?

2009-02-16 Thread Dotan Cohen
Since python is one of OpenOffice.org's Macro language, depending on your need, you might be able to use that as well. That's not a bad idea. Thanks! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Michele Simionato
On Feb 16, 4:59 pm, Gustavo Narea m...@gustavonarea.net wrote: I've not seen anything special in Pylons or TurboGears 2 decorators, except that they are all functions that use the decorator package -- while my decorator is a class that doesn't use the decorator package yet. My attempt to

Re: Will multithreading make python less popular?

2009-02-16 Thread seb . binet
hi there, [snip] Google uses Processes for the Tabs in Chrome, because that way they get around many Memory Management Problems they would have with Threads or with a singlethreaded reactor. Using Processes is not per se a bad Idea. You pay a bit with Memory and CPU but in many situations you

RE: Changing the Image on a button

2009-02-16 Thread John Posner
from Tkinter import * def do(): btn.configure(image = None) root = Tk() img1 = PhotoImage(file=bacon.gif) btn = Button(image = img1, command = do, text = hello ) btn.img = img1 btn.pack() root.mainloop() Try this change: from: btn.configure(image = None)

Re: [Python-Dev] RELEASED Python 3.0.1

2009-02-16 Thread Benjamin Peterson
On Sun, Feb 15, 2009 at 9:15 PM, Ned Deily n...@acm.org wrote: It would be great if someone could add OS X links for the 3.0.1 and 2.6.1 to the main download page, too: http://www.python.org/download/ I've now added them to the main download page. -- Regards, Benjamin --

Re: Windows vista

2009-02-16 Thread Dick
On Feb 16, 1:46 am, loveshadow...@yahoo.com wrote: Hi. My name is toru. I start learning python couple weeks ago. I install the compiler from python.org. but I cannot use the IDLE program. (command line works fine so far) the error screen says that the my personal fire wall is blocking the

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread bieffe62
On 16 Feb, 14:47, Mamahita Sela mamahitas...@yahoo.com wrote: Dear All, I have read several howtos for threading in PyGTK. I have tried some but with no luck. What i want is: i can keep typing in gtk.TextView while periodically doing ping some hosts. I think, the thread part is working

Re: Turning a signature-changing decorator into a signature-preserving one

2009-02-16 Thread Gustavo Narea
On Feb 16, 5:18 pm, Michele Simionato michele.simion...@gmail.com wrote: On Feb 16, 4:59 pm, Gustavo Narea m...@gustavonarea.net wrote: I've not seen anything special in Pylons or TurboGears 2 decorators, except that they are all functions that use the decorator package -- while my

Re: logging and daemons

2009-02-16 Thread Diez B. Roggisch
Fernando M. Maresca schrieb: Hello. I'm in the process of replacing a custom logger class in one of my apps that has several daemons. In the last step of daemonizing a program, after closing fds, stderr and stdout are redirected to the logfile of the program. Now, I'm trying to use

Re: logging and daemons

2009-02-16 Thread Vinay Sajip
On Feb 16, 1:15 pm, Fernando M. Maresca fmare...@gmail.com wrote: Yes, but I'm trying to use *TimedRotating*FileHandler, which makes the fd of the logfile change in every rotation of the logfile. So the direct approach of std[out|err] redirection to the logfile fd obtained from the logger

Re: Will multithreading make python less popular?

2009-02-16 Thread Scott David Daniels
andrew cooke wrote: The best short to the GIL issue that I have read in a long time Thanks a lot for writing this, I'll be pointing to it from time to time. Were I writing such a thing I'd focus too much on the how (issues I know that non-GIL true concurrency faces), and not enough on the high

Re: how can this iterator be optimized?

2009-02-16 Thread Basilisk96
On Feb 14, 10:19 am, Paul McGuire pt...@austin.rr.com wrote: If func is expensive, you could try memoizing it.  Then subsequent calls just do arg lookups.  Michele Simianato has posted a good memoizing decorator on the Python wiki. -- Paul That's the trick! I almost forgot about that one.

chi squared (X2) in Python

2009-02-16 Thread ts8807385
I was wondering if anyone has done this in Python. I wrote two functions that do it (I think... see below), but I do not understand how to interpret the results. I'm doing an experiment to implement ent in Python. ent tests the randomness of files and chi squared is probably the best test for this

Re: how to distribute python extensions independently of python

2009-02-16 Thread M.-A. Lemburg
On 2009-02-12 18:38, Travis wrote: So, Recently I made a fix to the zlib module that I need for use at work. I would like other employees to be able to use it without recompiling python. I assume I can just rename it and distribute it as a python extension. I was wondering how I can

Re: Pythonic way to determine if one char of many in a string

2009-02-16 Thread Nicolas Dandrimont
* pyt...@bdurham.com pyt...@bdurham.com [2009-02-16 00:48:34 -0500]: Nicolas, I would go for something like: for char in word: if char in 'aeiouAEIUO': char_found = True break else: char_found = False It is clear (imo), and it is seems to be the

Re: how to distribute python extensions independently of python

2009-02-16 Thread Robert Kern
On 2009-02-12 11:38, Travis wrote: So, Recently I made a fix to the zlib module that I need for use at work. Would you mind contributing this fix back to Python? http://bugs.python.org/ If you don't want to go to the effort of making a patch, at least a description of the problem you

Re: logging and daemons

2009-02-16 Thread Scott David Daniels
Fernando M. Maresca wrote: On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python Yes, but I'm trying to use *TimedRotating*FileHandler, which makes the fd of the logfile change in every rotation

pythojn/xpath question...

2009-02-16 Thread bruce
hi... using libxml2dom as the xpath lib i've got a situation where i can have: foo=a.xpath( /html/body/table[2]/tr[45]/td) and i can get 11 as the number of returned td elements for the 45th row... this is as it should be. however, if i do: foo=a.xpath( /html/body/table[2]/tr) and then try

Re: Pythonic way to determine if one char of many in a string

2009-02-16 Thread J. Cliff Dyer
On Mon, 2009-02-16 at 00:28 -0500, Nicolas Dandrimont wrote: * pyt...@bdurham.com pyt...@bdurham.com [2009-02-16 00:17:37 -0500]: I need to test strings to determine if one of a list of chars is in the string. A simple example would be to test strings to determine if they have a vowel

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread laplacian42
On Feb 16, 2:34 am, Python Nutter pythonnut...@gmail.com wrote: Had a look and it is still under my radar unfortunately because of TkInter. OceanGUI Note: spelling is OcempGUI. Also, since google broke some of the links, here's that main link again: http://ocemp.sourceforge.net/gui.html has

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread Dotan Cohen
For applications installing the full wxWidgets or Qt toolkits would be less disk space and dependcies than OceanGUI What? Qt and wX are *huge* compared to OcempGUI. Don't forget that many people will already have Qt already installed, such as KDE users, or those who use Skype, Google Earth,

wxPython and Croatian characters

2009-02-16 Thread vedrandekovic
Hello, I have problem with configuring my wxPython script to work with Croatian characters like: đ,š,ž,č,ć. Here is my simple script without wxPython (this script works): # -*- coding: utf-8 -*- s = hello normal string đšžćč print s ..here is my snippet with wxPython:

Re: pythojn/xpath question...

2009-02-16 Thread Diez B. Roggisch
bruce schrieb: hi... using libxml2dom as the xpath lib i've got a situation where i can have: foo=a.xpath( /html/body/table[2]/tr[45]/td) and i can get 11 as the number of returned td elements for the 45th row... this is as it should be. however, if i do: foo=a.xpath(

To 3.0.2 or not to 3.0.2?

2009-02-16 Thread Lennart Regebro
I discovered some remaining cmp() in 3.0.1, 38 minutes after Benjamin fixed them. :) Unfortunately, that means porting setuptools to 3.0.1 will be a bit difficult. So my question is: Will there be a 3.0.2 with those fixes, or should I add workaround code for 3.0.1? -- Lennart Regebro:

Re: wxPython and Croatian characters

2009-02-16 Thread Diez B. Roggisch
vedrandeko...@gmail.com schrieb: Hello, I have problem with configuring my wxPython script to work with Croatian characters like: đ,š,ž,č,ć. Here is my simple script without wxPython (this script works): # -*- coding: utf-8 -*- s = hello normal string đšžćč print s ..here

Re: logging and daemons

2009-02-16 Thread Fernando M. Maresca
On Mon, Feb 16, 2009 at 10:11:51AM -0800, Scott David Daniels wrote: Fernando M. Maresca wrote: On Mon, Feb 16, 2009 at 05:07:45AM -0800, Garrett Cooper wrote: You can actually set sys.std[err|out] to your ?file? descriptor of choice in python Yes, but I'm trying to use

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread laplacian42
On Feb 16, 1:52 pm, Dotan Cohen dotanco...@gmail.com wrote: Don't forget that many people will already have Qt already installed, such as KDE users, or those who use Skype, Google Earth, or Opera. Though KDE's Qt will likely be accessibily installed in a convinient place, though, I'm not so

Re: Pythonic way to determine if one char of many in a string

2009-02-16 Thread Stefaan Himpe
An entirely different approach would be to use a regular expression: import re if re.search([abc], nothing expekted): print a, b or c occurs in the string 'nothing expekted' if re.search([abc], something expected): print a, b or c occurs in the string 'something expected' Best regards,

Re: replace ftp by local copy

2009-02-16 Thread Steve Holden
loial wrote: I have been given an old python application that calls ftplib in many places to copy files to a remote server. I have been given the task of cloneing this code so that ftp is not used, but files are just copied locally in a scenerio where ftp is not available. The code is not

Re: Easier to wrap C or C++ libraries?

2009-02-16 Thread Hrvoje Niksic
Nick Craig-Wood n...@craig-wood.com writes: Christian Heimes li...@cheimes.de wrote: Hrvoje Niksic schrieb: Diez B. Roggisch de...@nospam.web.de writes: The answer is easy: if you use C, you can use ctypes to create a wrapper - with pure python, no compilation, no platform issues.

Speedup Bitmap Parser

2009-02-16 Thread Jayson Santos
Hello people, I'm writing a Bitmap parser for study purposes, however when I parse a bitmap file and when I paint that file in a window, the script take to much time. How can I optimize my script loops to be faster ? Here is the script http://pastebin.com/m652b8d65 Best Regards Jayson Reis --

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread Bruno Desthuilliers
laplacia...@gmail.com a écrit : On Feb 16, 1:52 pm, Dotan Cohen dotanco...@gmail.com wrote: Don't forget that many people will already have Qt already installed, such as KDE users, or those who use Skype, Google Earth, or Opera. Though KDE's Qt will likely be accessibily installed in a

Re: illegal list name

2009-02-16 Thread Bruno Desthuilliers
Sandra Quiles a écrit : Hello. I have followed the instructions of a post on Installing mailman on OS X 10.4, and got to step 7 and hit this error. (snip) So. illegal name error. it list listname as 'mailman@mycomputername' that's in response to the 'bin/newlist mailman' command Sorry,

flexible find and replace ?

2009-02-16 Thread OdarR
Hi guys, how would you do a clever find and replace, where the value replacing the tag is changing on each occurence ? ...TAGTAGTAG..TAG. is replaced by this : ...REPL01REPL02REPL03..REPL04... A better and

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread Dotan Cohen
FWIW (and servers set aside, of course), I can hardly remember of any of linux box I worked one not having both GTK and KDE installed. I don't think that those netbooks come with Qt. And for a Windows installer, where one may want to package the toolkit with the program, a small toolkit may be

Re: flexible find and replace ?

2009-02-16 Thread bearophileHUGS
OdarR: how would you do a clever find and replace, where the value replacing the tag is changing on each occurence ? ...TAGTAGTAG..TAG. is replaced by this : ...REPL01REPL02REPL03..REPL04... You may use

Re: flexible find and replace ?

2009-02-16 Thread Jason Scheirer
On Feb 16, 12:10 pm, OdarR olivier.da...@gmail.com wrote: Hi guys, how would you do a clever find and replace, where the value replacing the tag is changing on each occurence ? ...TAGTAGTAG..TAG. is replaced by this :

Re: wxPython and Croatian characters

2009-02-16 Thread Jason Scheirer
On Feb 16, 10:58 am, vedrandeko...@gmail.com wrote: Hello, I have problem with configuring my wxPython script to work with Croatian characters like:  ð,¹,¾,è,æ. Here is my simple script without wxPython (this script works):       # -*- coding: utf-8 -*-       s = hello normal string ð¹¾æè

Re: explain

2009-02-16 Thread Terry Reedy
Jeroen Ruigrok van der Werven wrote: -On [20090216 11:17], Saeed Iravani (si.4...@yahoo.com) wrote: I download python 2.5.4 and install but I dont know that how perform python? I dont know from which directory perform python? It would help if you would clarify which operating system you

Re: Creating custom formatter function

2009-02-16 Thread Terry Reedy
Garrett Cooper wrote: Hello Python folks, I have a function where I'd like to prefix a format string via a `prefix' string. The definition of the base method is as follows: #START CODE def print_message(prefix, out_stream, fmt, *args, **kwargs): Print out [prefix]: [message]

Re: Speedup Bitmap Parser

2009-02-16 Thread Terry Reedy
Jayson Santos wrote: Hello people, I'm writing a Bitmap parser for study purposes, however when I parse a bitmap file and when I paint that file in a window, the script take to much time. 1. You turned constants into static methods called for every line, adding attribute lookup and function

Re: Will multithreading make python less popular?

2009-02-16 Thread rushenaly
Hi again OpenERP and ERP5 was written in python as i know. I really wonder how they do this without threads. I want to see a real time graph at the same time while i am working on the same screen. What is the secret? Thanks Rushen -- http://mail.python.org/mailman/listinfo/python-list

Re: Regarding Joystick

2009-02-16 Thread shreyas shah
Hi , I have figured out a code with the help of archives in pygame can anyone help me with controlling the speed of joystick ... i am going to integrate joystick with a PTZ camera ... i was wondering if there are any functions which can help me control the speed of camera and by controlling

Re: Speedup Bitmap Parser

2009-02-16 Thread bearophileHUGS
Jayson Santos: Hello people, I'm writing a Bitmap parser for study purposes, This code: x = 0 y = 0 for line in bmp.bitmap_lines.lines: for color in xrange(len(line.colors)): canvas.create_line(x, y, x+1, y, fill=#%02x%02x%02x %

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread Nick Craig-Wood
laplacia...@gmail.com laplacia...@gmail.com wrote: I think I just found the GUI toolkit for Python I've been searching for. It seems to meet all of the following requirements: * free software * small (I don't need batteries -- Python already comes with those.) * easy to use *

Re: Pythonic way to determine if a string is a number

2009-02-16 Thread Nick Craig-Wood
pyt...@bdurham.com pyt...@bdurham.com wrote: Thanks for everyone's feedback. I believe my original post's code (updated following my signature) was in line with this list's feedback. Christian: Thanks for reminding me about exponential formats. My updated code accounts for these type of

Re: flexible find and replace ?

2009-02-16 Thread Tim Chase
how would you do a clever find and replace, where the value replacing the tag is changing on each occurence ? ...TAGTAGTAG..TAG. is replaced by this : ...REPL01REPL02REPL03..REPL04... This is a variant of

Re: Found a very nice, small, cross-platform GUI toolkit for Python.

2009-02-16 Thread laplacian42
On Feb 16, 4:31 pm, Nick Craig-Wood n...@craig-wood.com wrote: Interesting!  One of the commercial apps I'm involved (C++ not python) in uses SDL as its GUI with windows etc built on top of it.  It means that it looks exactly the same on all supported platforms and since it usually runs full

  1   2   3   >