ANN: XYZCommander-0.0.2

2009-10-23 Thread Max E. Kuznecov
I'm pleased to announce the XYZCommander version 0.0.2! XYZCommander is a pure console visual file manager. Main features: * Tight integration with python run–time system — most of the settings can be changed on the fly via management console. * Powerful configuration system - define own

Announcing IronPython 2.0.3

2009-10-23 Thread David DiCato
Hello Python Community, I am delighted to announce the release of IronPython 2.0.3. This release is a minor update to IronPython 2.0.2 and the latest in a series of CPython 2.5-compatible releases running on the .NET platform. Again, our priority was to make IronPython 2.0.3 a bugfix release

[ANN] Advanced Scientific Programming in Python Winter School in Warsaw, Poland

2009-10-23 Thread Tiziano Zito
Advanced Scientific Programming in Python a Winter School by the G-Node and University of Warsaw Scientists spend more and more time writing, maintaining, and debugging software. While techniques for doing this efficiently have evolved, only few scientists actually use them. As a result,

ANN: XYZCommander-0.0.2 (added missing homepage URL)

2009-10-23 Thread Max E. Kuznecov
I'm pleased to announce the XYZCommander version 0.0.2! XYZCommander is a pure console visual file manager. Main features: * Tight integration with python run–time system — most of the settings can be changed on the fly via management console. * Powerful configuration system - define own

PAMIE and beautifulsoup problem

2009-10-23 Thread elca
hello, currently im making some web scrap script. and i was choice PAMIE to use my script. actually im new to python and programming. so i have no idea ,if i use PAMIE,it really helpful to make script to relate with win32-python. ok my problem is , while im making script,i was encounter two

AttributeError: 'SSLSocket' object has no attribute 'producer_fifo'

2009-10-23 Thread VYAS ASHISH M-NTB837
I am getting the following error when I try to run my program to post and receive xmls to an https server. Traceback (most recent call last): File C:\Python31\lib\threading.py, line 509, in _bootstrap_inner self.run() File C:\Python31\lib\threading.py, line 462, in run

Re: pyodbc - problem passing None as parameter

2009-10-23 Thread Frank Millman
Tim Golden wrote: Frank Millman wrote: cur.execute('select * from ctrl.dirusers where todate is ?', None) Traceback (most recent call last): File stdin, line 1, in module pyodbc.ProgrammingError: ('42000', [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near

Re: Help with code = Extract numerical value to variable

2009-10-23 Thread Steve
Sorry I'm not being clear Input** sold: 16 sold: 20 sold: 2 sold: 0 sold: storefront 7 0 storefront sold null Output 16 20 2 0 0 7 0 0 0 0 -- http://mail.python.org/mailman/listinfo/python-list

RE: AttributeError: 'SSLSocket' object has no attribute 'producer_fifo'

2009-10-23 Thread VYAS ASHISH M-NTB837
Tried using asyncore.dispatcher_with_send in place of asynchat.async_chat and after a few request-responses, I get this: Exception in thread Thread-2: Traceback (most recent call last): File C:\Python31\lib\threading.py, line 509, in _bootstrap_inner self.run() File

Re: Python 2.6 Deprecation Warnings with __new__ — Can someone expla in why?

2009-10-23 Thread Terry Reedy
Consider this: def blackhole(*args, **kwds): pass The fact that it accept args that it ignores could be considered misleading or even a bug. Now modify it to do something useful, like return a new, naked, immutable object that is the same for every call except for identity, and which still

Re: Cpython optimization

2009-10-23 Thread Terry Reedy
Qrees wrote: Hello As my Master's dissertation I chose Cpython optimization. That's why i'd like to ask what are your suggestions what can be optimized. Well, I know that quite a lot. I've downloaded the source code (I plan to work on Cpython 2.6 and I've downloaded 2.6.3 release). By looking

PyGUI menubar

2009-10-23 Thread dr k
I want to completely eliminate the menu bar from my PyGUI 2.0.5 application. the obvious thing, app.menus = [] doesn't work. i want not only the menus but the menu bar to disappear. help? [ a quick look at the code makes me suspect that it cannot be done presently but maybe there is a sneaky

Re: Cpython optimization

2009-10-23 Thread MRAB
Olof Bjarnason wrote: [snip] A short question after having read through most of this thread, on the same subject (time-optimizing CPython): http://mail.python.org/pipermail/python-list/2007-September/098964.html We are experiencing multi-core processor kernels more and more these days. But

Re: a splitting headache

2009-10-23 Thread Paul Rudin
Mensanator mensana...@aol.com writes: No one ever considers making life easy for the user. That's a bizarre assertion. -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-23 Thread Mensanator
On Oct 22, 1:22 pm, Paul Rudin paul.nos...@rudin.co.uk wrote: Mensanator mensana...@aol.com writes: No one ever considers making life easy for the user. That's a bizarre assertion. I have a bad habit of doing that. -- http://mail.python.org/mailman/listinfo/python-list

Re: a splitting headache

2009-10-23 Thread Mensanator
On Oct 22, 2:23 pm, Falcolas garri...@gmail.com wrote: On Oct 22, 11:56 am, Mensanator mensana...@aol.com wrote: [massive snip] Yes, AFTER you read the docs. Not to feed the troll, I prefer the term gadfly. but obligatory reference to XKCD: http://xkcd.com/293/ --

Re: Cpython optimization

2009-10-23 Thread Olof Bjarnason
2009/10/22 MRAB pyt...@mrabarnett.plus.com Olof Bjarnason wrote: [snip] A short question after having read through most of this thread, on the same subject (time-optimizing CPython): http://mail.python.org/pipermail/python-list/2007-September/098964.html We are experiencing multi-core

Re: Cpython optimization

2009-10-23 Thread Olof Bjarnason
2009/10/23 Olof Bjarnason olof.bjarna...@gmail.com 2009/10/22 MRAB pyt...@mrabarnett.plus.com Olof Bjarnason wrote: [snip] A short question after having read through most of this thread, on the same subject (time-optimizing CPython):

Re: Help with my program

2009-10-23 Thread Lie Ryan
tanner barnes wrote: Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class.

Re: Help with my program

2009-10-23 Thread Alan Gauld
tanner barnes tanner...@hotmail.com wrote I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class. In general thats not a good

Re: problem with pythonw.exe

2009-10-23 Thread Christian Heimes
Martin Shaw wrote: I have a tkinter application running on my windows xp work machine and I am attempting to stop the console from appearing when the application runs. I've researched around and the way to do this appears to be to use pythonw.exe instead of python.exe. However when I try to

Re: pyodbc - problem passing None as parameter

2009-10-23 Thread Frank Millman
Tim Goldenwrote: Frank Millman wrote: I want the final WHERE clause to show 'WHERE todate IS NULL'. Of course, I understand that. What I mean is that if a piece of SQL say: WHERE table.column IS ? then the only possible (meaningful) value ? can have is NULL (or None, in python-speak).

Re: Cpython optimization

2009-10-23 Thread Stefan Behnel
Olof Bjarnason wrote: [snip] A short question after having read through most of this thread, on the same subject (time-optimizing CPython): http://mail.python.org/pipermail/python-list/2007-September/098964.html We are experiencing multi-core processor kernels more and more these days.

Re: pyodbc - problem passing None as parameter

2009-10-23 Thread Tim Golden
Frank Millman wrote: Thanks, Tim, for the detailed explanation. I appreciate your taking the time. It was difficult for me to use the code that you posted, because under my present setup I define my SQL statements externally, and the WHERE clause has to conform to one or more rows of six

Re: Please help with regular expression finding multiple floats

2009-10-23 Thread Edward Dolan
On Oct 22, 3:26 pm, Jeremy jlcon...@gmail.com wrote: My question is, how can I use regular expressions to find two OR three or even an arbitrary number of floats without repeating %s?  Is this possible? Thanks, Jeremy Any time you have tabular data such as your example, split() is generally

Re: Please help with regular expression finding multiple floats

2009-10-23 Thread Edward Dolan
I can see why this line could wrap 1.E-08 1.58024E-06 0.0048 1.E-08 1.58024E-06 0.0048 But this one? 1.E-07 2.98403E-05 0.0018 anyway, here is the code - http://codepad.org/Z7eWBusl -- http://mail.python.org/mailman/listinfo/python-list

Validating positional arguments in optparse

2009-10-23 Thread Filip Gruszczyński
optparse module is quite smart, when it comes to validating options, like assuring, that certain option must be an integer. However, I can't find any information about validating, that positional arguments were provided and I can't find methods, that would allow defining positional argument in

Re: Validating positional arguments in optparse

2009-10-23 Thread Jean-Michel Pichavant
Filip Gruszczyński wrote: optparse module is quite smart, when it comes to validating options, like assuring, that certain option must be an integer. However, I can't find any information about validating, that positional arguments were provided and I can't find methods, that would allow

Re: Validating positional arguments in optparse

2009-10-23 Thread Filip Gruszczyński
That being said, I still stick with optparse. I prefer the dogmatic interface that makes all my exe use the exact same (POSIX) convention. I really don't care about writing /file instead of --file I would like to keep POSIX convention too, but just wanted OptionParser to do the dirty work of

Re: Help with code = Extract numerical value to variable

2009-10-23 Thread Sion Arrowsmith
Steve zerocostprod...@gmail.com wrote: If there is a number in the line I want the number otherwise I want a 0 I don't think I can use strip because the lines have no standards What do you think strip() does? Read http://docs.python.org/library/stdtypes.html#str.lstrip *carefully*

Help with code = Extract numerical value to variable

2009-10-23 Thread Dave Angel
Steve wrote: Sorry I'm not being clear Input** sold: 16 sold: 20 sold: 2 sold: 0 sold: storefront 7 0 storefront sold null Output 16 20 2 0 0 7 0 0 0 0 Since you're looking for only digits, simply make a string containing all characters that aren't digits. Now, loop

Bug? concatenate a number to a backreference: re.sub(r'(zzz:)xxx', r'\1'+str(4444), somevar)

2009-10-23 Thread abdulet
Well its this normal? i want to concatenate a number to a backreference in a regular expression. Im working in a multprocess script so the first what i think is in an error in the multiprocess logic but what a sorprise!!! when arrived to this conclussion after some time debugging i see that:

Re: problem with pythonw.exe

2009-10-23 Thread Dave Angel
Martin Shaw wrote: Hi, I have a tkinter application running on my windows xp work machine and I am attempting to stop the console from appearing when the application runs. I've researched around and the way to do this appears to be to use pythonw.exe instead of python.exe. However when I try to

Re: Cpython optimization

2009-10-23 Thread Olof Bjarnason
2009/10/23 Stefan Behnel stefan...@behnel.de Olof Bjarnason wrote: [snip] A short question after having read through most of this thread, on the same subject (time-optimizing CPython): http://mail.python.org/pipermail/python-list/2007-September/098964.html We are experiencing

Re: Bug? concatenate a number to a backreference: re.sub(r'(zzz:)xxx', r'\1'+str(4444), somevar)

2009-10-23 Thread Peter Otten
abdulet wrote: Well its this normal? i want to concatenate a number to a backreference in a regular expression. Im working in a multprocess script so the first what i think is in an error in the multiprocess logic but what a sorprise!!! when arrived to this conclussion after some time

Re: Bug? concatenate a number to a backreference: re.sub(r'(zzz:)xxx', r'\1'+str(4444), somevar)

2009-10-23 Thread abdulet
On 23 oct, 13:54, Peter Otten __pete...@web.de wrote: abdulet wrote: Well its this normal? i want to concatenate a number to a backreference in a regular expression. Im working in a multprocess script so the first what i think is in an error in the multiprocess logic but what a

Re: Cpython optimization

2009-10-23 Thread Antoine Pitrou
Le Fri, 23 Oct 2009 09:45:06 +0200, Olof Bjarnason a écrit : So I think my first question is still interesting: What is the point of multiple cores, if memory is the bottleneck? Why do you think it is, actually? Some workloads are CPU-bound, some others are memory- or I/O-bound. You will

search python wifi module

2009-10-23 Thread Clint Mourlevat
hello, i search a wifi module python on windows, i have already scapy ! thanks @+ -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing deadlock

2009-10-23 Thread paulC
On Oct 23, 3:18 am, Brian Quinlan br...@sweetapp.com wrote: My test reduction: import multiprocessing import queue def _process_worker(q):      while True:          try:              something = q.get(block=True, timeout=0.1)          except queue.Empty:              return          

Re: How to schedule system calls with Python

2009-10-23 Thread Jorgen Grahn
On Thu, 2009-10-22, Al Fansome wrote: Jorgen Grahn wrote: On Fri, 2009-10-16, Jeremy wrote: On Oct 15, 6:32 pm, MRAB pyt...@mrabarnett.plus.com wrote: TerryP wrote: On Oct 15, 7:42 pm, Jeremy jlcon...@gmail.com wrote: I need to write a Python script that will call some command line

Re: multiprocessing deadlock

2009-10-23 Thread Brian Quinlan
On 24 Oct 2009, at 00:02, paulC wrote: On Oct 23, 3:18 am, Brian Quinlan br...@sweetapp.com wrote: My test reduction: import multiprocessing import queue def _process_worker(q): while True: try: something = q.get(block=True, timeout=0.1) except

Re: Cpython optimization

2009-10-23 Thread Olof Bjarnason
2009/10/23 Antoine Pitrou solip...@pitrou.net Le Fri, 23 Oct 2009 09:45:06 +0200, Olof Bjarnason a écrit : So I think my first question is still interesting: What is the point of multiple cores, if memory is the bottleneck? Why do you think it is, actually? Some workloads are CPU-bound,

Re: Please help with regular expression finding multiple floats

2009-10-23 Thread Jeremy
On Oct 23, 3:48 am, Edward Dolan byteco...@gmail.com wrote: On Oct 22, 3:26 pm, Jeremy jlcon...@gmail.com wrote: My question is, how can I use regular expressions to find two OR three or even an arbitrary number of floats without repeating %s?  Is this possible? Thanks, Jeremy Any

Re: search python wifi module

2009-10-23 Thread Jorgen Grahn
On Fri, 2009-10-23, Clint Mourlevat wrote: hello, i search a wifi module python on windows, i have already scapy ! What is a wifi module? Your OS is supposed to hide networking implementation details (Ethernet, PPP, Wi-fi, 3G ...) and provide specific management interfaces when needed. What

Re: Validating positional arguments in optparse

2009-10-23 Thread Robert Kern
On 2009-10-23 05:54 AM, Filip Gruszczyński wrote: That being said, I still stick with optparse. I prefer the dogmatic interface that makes all my exe use the exact same (POSIX) convention. I really don't care about writing /file instead of --file I would like to keep POSIX convention too, but

Re: Help with code = Extract numerical value to variable

2009-10-23 Thread rurpy
On 10/23/2009 05:16 AM, Dave Angel wrote: Steve wrote: Sorry I'm not being clear Input** sold: 16 sold: 20 sold: 2 sold: 0 sold: storefront 7 0 storefront sold null Output 16 20 2 0 0 7 0 0 0 0 Since you're looking for only digits, simply make a string

breaking out to the debugger (other than x=1/0 !)

2009-10-23 Thread bdb112
After a while programming in python, I still don't know how to break out to the debugger other than inserting an instruction to cause an exception. x=1/0 In IDL one woudl write stop,'reason for stopping...' at which point you can inspect locals (as in pdb) and continue (but you can't with pdb if

Re: breaking out to the debugger (other than x=1/0 !)

2009-10-23 Thread Diez B. Roggisch
bdb112 wrote: After a while programming in python, I still don't know how to break out to the debugger other than inserting an instruction to cause an exception. x=1/0 In IDL one woudl write stop,'reason for stopping...' at which point you can inspect locals (as in pdb) and continue

Read any function in runtime

2009-10-23 Thread joao abrantes
Hey. I want to make a program like this: print Complete the function f(x)= then the user would enter x+2 or 1/x or any other function that only uses the variable x. Then my python program would calculate f(x) in some points for example in f(2),f(4).. etc . How can I do this? --

Re: Read any function in runtime

2009-10-23 Thread Matt McCredie
joao abrantes senhor.abrantes at gmail.com writes: Hey. I want to make a program like this:print Complete the function f(x)=then the user would enter x+2 or 1/x or any other function that only uses the variable x. Then my python program would calculate f(x) in some points for example in

Re: breaking out to the debugger (other than x=1/0 !)

2009-10-23 Thread bdb112
That's perfect - and removing the breakpoint is not an issue for me as it is normally conditional on a debug level, which I can change from pydb if debuglvl3: import pydb pydb.set_trace() 'in XXX: c to continue' The text line is a useful prompt (The example here is for pydb which

Re: unicode and dbf files

2009-10-23 Thread Ethan Furman
John Machin wrote: On Oct 23, 3:03 pm, Ethan Furman et...@stoneleaf.us wrote: John Machin wrote: On Oct 23, 7:28 am, Ethan Furman et...@stoneleaf.us wrote: Greetings, all! I would like to add unicode support to my dbf project. The dbf header has a one-byte field to hold the encoding

Re: A new way to configure Python logging

2009-10-23 Thread Jean-Michel Pichavant
Vinay Sajip wrote: If you use the logging package but don't like using the ConfigParser-based configuration files which it currently supports, keep reading. I'm proposing to provide a new way to configure logging, using a Python dictionary to hold configuration information. It means that you can

Re: Cpython optimization

2009-10-23 Thread Antoine Pitrou
Le Fri, 23 Oct 2009 15:53:02 +0200, Olof Bjarnason a écrit : This would be way to speed up things in an image processing algorithm: 1. divide the image into four subimages 2. let each core process each part independently 3. fixmerge (along split lines for example) into a resulting, complete

Copying a ZipExtFile

2009-10-23 Thread Moore, Mathew L
Hello all, A newbie here. I was wondering why the following fails on Python 2.6.2 (r262:71605) on win32. Am I doing something inappropriate? Interestingly, it works in 3.1, but would like to also get it working in 2.6. Thanks in advance, --Matt import io import shutil import tempfile

Re: A new way to configure Python logging

2009-10-23 Thread Vinay Sajip
For my part, I'm configuring the loggers in the application entry point file, in python code. I'm not sure I am that concerned. However being a great fan of this module, I kindly support you for any improvements you may add to this module and appreciate all the work you've already done

Re: Cpython optimization

2009-10-23 Thread Olof Bjarnason
This would be way to speed up things in an image processing algorithm: 1. divide the image into four subimages 2. let each core process each part independently 3. fixmerge (along split lines for example) into a resulting, complete image Well, don't assume you're the first to think

Re: Cpython optimization

2009-10-23 Thread Jason Sewall
On Fri, Oct 23, 2009 at 2:31 PM, Olof Bjarnason olof.bjarna...@gmail.com wrote: This would be way to speed up things in an image processing algorithm: 1. divide the image into four subimages 2. let each core process each part independently 3. fixmerge (along split lines for example) into a

Re: multiprocessing deadlock

2009-10-23 Thread paulC
Hey Paul, I guess I was unclear in my explanation - the deadlock only happens   when I *don't* call join. Cheers, Brian Whoops, my bad. Have you tried replacing prints with writing a another output Queue? I'm wondering if sys.stdout has a problem. Regards, Paul C. --

How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Peng Yu
As far as I know, linux doesn't support a system level way to figure out all the symbolic links point to a give file. I could do a system wide search to look for any symbolic link that point to the file that I am interested in. But this will be too slow when there are many files in the systems.

Re: How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Falcolas
On Oct 23, 1:25 pm, Peng Yu pengyu...@gmail.com wrote: As far as I know, linux doesn't support a system level way to figure out all the symbolic links point to a give file. I could do a system wide search to look for any symbolic link that point to the file that I am interested in. But this

Re: How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Grant Edwards
On 2009-10-23, Peng Yu pengyu...@gmail.com wrote: [...] I'm thinking of writing a daemon program [...] But I have never make a daemon program like this in python. Could somebody point me what packages I need in order to make a daemon process like this?

Re: How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Falcolas
On Oct 23, 1:38 pm, Falcolas garri...@gmail.com wrote: On Oct 23, 1:25 pm, Peng Yu pengyu...@gmail.com wrote: As far as I know, linux doesn't support a system level way to figure out all the symbolic links point to a give file. I could do a system wide search to look for any symbolic

Dll in python

2009-10-23 Thread snonca
hello I would like to know how to create dll in python to implement a project. NET There is a Tutorial Thanks Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Dll in python

2009-10-23 Thread Diez B. Roggisch
snonca schrieb: hello I would like to know how to create dll in python to implement a project. NET There is a Tutorial Take a look at iron-python. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Dll in python

2009-10-23 Thread Martien Verbruggen
On Fri, 23 Oct 2009 13:09:10 -0700 (PDT), snonca luis.bi...@gmail.com wrote: hello I would like to know how to create dll in python to implement a project. NET Are you maybe looking for this: http://pythonnet.sourceforge.net/ Martien -- | Martien

Re: Dll in python

2009-10-23 Thread Aahz
In article f57b5b5b-7a51-4611-9611-49e4068ac...@d4g2000vbm.googlegroups.com, snonca luis.bi...@gmail.com wrote: [...] Was I the only person who read the Subject: line and thought, How do you roll D11, anyway? -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ In

Re: A new way to configure Python logging

2009-10-23 Thread Wolodja Wentland
On Thu, Oct 22, 2009 at 09:25 +, Vinay Sajip wrote: I need your feedback to make this feature as useful and as easy to use as possible. I'm particularly interested in your comments about the dictionary layout and how incremental logging configuration should work, but all feedback will be

Re: Dll in python

2009-10-23 Thread Rami Chowdhury
On Fri, 23 Oct 2009 14:08:58 -0700, Aahz a...@pythoncraft.com wrote: In article f57b5b5b-7a51-4611-9611-49e4068ac...@d4g2000vbm.googlegroups.com, snonca luis.bi...@gmail.com wrote: [...] Was I the only person who read the Subject: line and thought, How do you roll D11, anyway? Surely

Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Varnon Varnon
I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sciences. I want to write a program to help me record data from movie files. Currently I have a program that can record the time of a

Re: Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Rebert
On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon varnonz...@gmail.com wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sciences. I want to write a program to help me record

Re: multiprocessing deadlock

2009-10-23 Thread Brian Quinlan
On 24 Oct 2009, at 06:01, paulC wrote: Hey Paul, I guess I was unclear in my explanation - the deadlock only happens when I *don't* call join. Cheers, Brian Whoops, my bad. Have you tried replacing prints with writing a another output Queue? I'm wondering if sys.stdout has a problem.

Re: Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Terry Reedy
Chris Rebert wrote: On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon varnonz...@gmail.com wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sciences. I want to write a program to

Re: Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Varnon
Thanks, That works wonderfuly. Once I set quicktimes preferences to play on open it opens and plays the movie exactly like I want. But now I need a line of code to bring python to the front again so it can read my input. Any more suggestions? On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert

Re: Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Rebert
On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert c...@rebertia.com wrote: On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon varnonz...@gmail.com wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is

Re: Python help: Sending a play command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Varnon
On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert c...@rebertia.com wrote: On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon varnonz...@gmail.com wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is

Re: PySerial

2009-10-23 Thread Ronn Ross
I'm using pySerial to connect to a serial port (rs232) on a windows xp machine. I'm using python interactive interpretor to interact with the device. I type the following: import serial ser = serial.Serial(2) ser.write(command) But this does nothing to the control. I have been able to connect via

Re: PySerial

2009-10-23 Thread Chris Rebert
On Thu, Oct 22, 2009 at 4:43 PM, Ronn Ross ronn.r...@gmail.com wrote: I'm using pySerial to connect to a serial port (rs232) on a windows xp machine. I'm using python interactive interpretor to interact with the device. I type the following: import serial ser = serial.Serial(2)

Re: PySerial

2009-10-23 Thread Ronn Ross
I have tried setting the baud rate with no success. Also I'm using port #2 because Im using a usb to serial cable. On Fri, Oct 23, 2009 at 7:51 PM, Chris Rebert c...@rebertia.com wrote: On Thu, Oct 22, 2009 at 4:43 PM, Ronn Ross ronn.r...@gmail.com wrote: I'm using pySerial to connect to a

How to modify local variables from internal functions?

2009-10-23 Thread kj
I like Python a lot, and in fact I'm doing most of my scripting in Python these days, but one thing that I absolutely *DETEST* about Python is that it does allow an internal function to modify variables in the enclosing local scope. This willful hobbling of internal functions seems to

Re: How to modify local variables from internal functions?

2009-10-23 Thread Chris Rebert
On Fri, Oct 23, 2009 at 5:19 PM, kj no.em...@please.post wrote: I like Python a lot, and in fact I'm doing most of my scripting in Python these days, but one thing that I absolutely *DETEST* about Python is that it does allow an internal function to modify variables in the enclosing

Re: How to modify local variables from internal functions?

2009-10-23 Thread Stephen Hansen
On Fri, Oct 23, 2009 at 5:19 PM, kj no.em...@please.post wrote: I like Python a lot, and in fact I'm doing most of my scripting in Python these days, but one thing that I absolutely *DETEST* about Python is that it does allow an internal function to modify variables in the enclosing

Re: How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Aahz
In article mailman.1942.1256325954.2807.python-l...@python.org, Peng Yu pengyu...@gmail.com wrote: I'm thinking of writing a daemon program which will build a database on all the symbolic links that point to any files. Later on, whenever I change or remove any file or symbolic link, I'll will

Re: How to write a daemon program to monitor symbolic links?

2009-10-23 Thread Lawrence D'Oliveiro
In message mailman.1942.1256325954.2807.python-l...@python.org, Peng Yu wrote: As far as I know, linux doesn't support a system level way to figure out all the symbolic links point to a give file. Do you know of a system that does? I'm thinking of writing a daemon program which will build a

Re: How to modify local variables from internal functions?

2009-10-23 Thread MRAB
kj wrote: I like Python a lot, and in fact I'm doing most of my scripting in Python these days, but one thing that I absolutely *DETEST* about Python is that it does allow an internal function to modify variables in the enclosing local scope. This willful hobbling of internal

Re: python pyodbc - connect error

2009-10-23 Thread Gabriel Genellina
En Thu, 22 Oct 2009 22:33:52 -0300, Threader Slash threadersl...@gmail.com escribió: Hi again.. I have done the same test using pyodbc, but to MySQL ODBC driver. It works fine for MySQL. The problem still remains to Lotus Notes. Any other hints please? http://www.connectionstrings.com

Is there a command that returns the number of substrings in a string?

2009-10-23 Thread Peng Yu
For example, the long string is 'abcabc' and the given string is 'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling 'find()' multiple times to figure out how many times a given string appears in a long string. I'm wondering if there is a function in python which can directly

Re: multiprocessing deadlock

2009-10-23 Thread Gabriel Genellina
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan br...@sweetapp.com escribió: I don't like a few things in the code: def _do(i): print('Run:', i) q = multiprocessing.Queue() for j in range(30): q.put(i*30+j) processes = _make_some_processes(q) while not

Re: Is there a command that returns the number of substrings in a string?

2009-10-23 Thread Stephen Hansen
On Fri, Oct 23, 2009 at 7:31 PM, Peng Yu pengyu...@gmail.com wrote: For example, the long string is 'abcabc' and the given string is 'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling 'find()' multiple times to figure out how many times a given string appears in a long

Re: Is there a command that returns the number of substrings in a string?

2009-10-23 Thread Erik Max Francis
Peng Yu wrote: For example, the long string is 'abcabc' and the given string is 'abc', then 'abc' appears 2 times in 'abcabc'. Currently, I am calling 'find()' multiple times to figure out how many times a given string appears in a long string. I'm wondering if there is a function in python

Re: PySerial

2009-10-23 Thread Gabriel Genellina
En Fri, 23 Oct 2009 20:56:21 -0300, Ronn Ross ronn.r...@gmail.com escribió: I have tried setting the baud rate with no success. Also I'm using port #2 because Im using a usb to serial cable. Note that Serial(2) is known as COM3 in Windows, is it ok? -- Gabriel Genellina --

Re: PAMIE and beautifulsoup problem

2009-10-23 Thread Gabriel Genellina
En Fri, 23 Oct 2009 03:03:56 -0300, elca high...@gmail.com escribió: follow script is which i was found in google. but it not work for me. im using PAMIE3 version.even if i changed to pamie 2b version ,i couldn't make it working. You'll have to provide more details. *What* happened? You got

Re: AttributeError: 'SSLSocket' object has no attribute 'producer_fifo'

2009-10-23 Thread Gabriel Genellina
En Fri, 23 Oct 2009 03:27:40 -0300, VYAS ASHISH M-NTB837 ashish.v...@motorola.com escribió: Tried using asyncore.dispatcher_with_send in place of asynchat.async_chat and after a few request-responses, I get this: Exception in thread Thread-2: Traceback (most recent call last): File

Re: Copying a ZipExtFile

2009-10-23 Thread Gabriel Genellina
En Fri, 23 Oct 2009 14:15:33 -0300, Moore, Mathew L moor...@battelle.org escribió: with io.BytesIO() as memio: shutil.copyfileobj(f, memio) zip = zipfile.ZipFile(file=memio) # Can't use zip.extract(), because I want to ignore paths # within archive.

Re: multiprocessing deadlock

2009-10-23 Thread Brian Quinlan
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote: En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan br...@sweetapp.com escribió: I don't like a few things in the code: def _do(i): print('Run:', i) q = multiprocessing.Queue() for j in range(30): q.put(i*30+j)

[issue7188] optionxform documentation confusing

2009-10-23 Thread Martin v . Löwis
New submission from Martin v. Löwis mar...@v.loewis.de: In http://stackoverflow.com/questions/1611799/preserve-case-in-configparser, somebody is confused about adjusting ConfigParser.optionxform. The documentation is indeed confusing, in particular by claiming that you should set it to str().

[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-10-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Not really, that was the last thing to get this issue closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7006 ___

[issue7188] optionxform documentation confusing

2009-10-23 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r75623. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7188 ___

[issue6670] Printing the 'The Python Tutorial'

2009-10-23 Thread brimac
brimac bri...@bcs.org added the comment: Georg, Ezio Many Thanks brimac 2009/10/22 Georg Brandl rep...@bugs.python.org Georg Brandl ge...@python.org added the comment: OK, fixed in Sphinx, and in the Python stylesheet in r75617. -- resolution: - fixed status: open - closed

[issue7189] struct.calcsize returns strange size

2009-10-23 Thread Igor Mikushkin
New submission from Igor Mikushkin igor.mikush...@gmail.com: I think in second case struct size should be 53. In [31]: struct.calcsize('ihhi35scc') Out[31]: 49 In [32]: struct.calcsize('ihhi35scci') Out[32]: 56 -- components: Library (Lib) messages: 94379 nosy: igor.mikushkin

  1   2   >