Google Highly Open Participation Contest

2007-11-28 Thread Titus Brown
Dear Python community, I'm happy to announce that the Python Software Foundation is part of a new Google Open Source program, the Highly Open Participation Contest. This contest is an effort by Google to engage pre-college students in open source programming: Google is offering prizes and awards

Re: How to Teach Python Variables

2007-11-28 Thread Paul Rudin
none atavory\@(none) writes: IIRC, I once saw an explanation how Python doesn't have variables in the sense that, say, C does, and instead has bindings from names to objects. Does anyone have a link? Variable is an abstract concept, and it's a slightly different concept for every

Unexpected behavior when initializing class

2007-11-28 Thread [EMAIL PROTECTED]
Hello everybody, I've banged my ahead around for a while trying to figure out why multiple instances of a class share the same instance variable. I've stripped down my code to the following, which reproduces my problem. class Test(object): def __init__(self, v=[]): self.values =

Re: Unexpected behavior when initializing class

2007-11-28 Thread Paul Rudin
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Hello everybody, I've banged my ahead around for a while trying to figure out why multiple instances of a class share the same instance variable. I've stripped down my code to the following, which reproduces my problem. class Test(object):

Re: Unexpected behavior when initializing class

2007-11-28 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hello everybody, I've banged my ahead around for a while trying to figure out why multiple instances of a class share the same instance variable. I've stripped down my code to the following, which reproduces my problem. This is a *feature* of Python that

Re: Unexpected behavior when initializing class

2007-11-28 Thread [EMAIL PROTECTED]
On Nov 28, 3:31 am, Paul Rudin [EMAIL PROTECTED] wrote: You have to understand that the default value for v - an empty list - is made at compile time - and it's the *same* list every time it's used i.e. if you don't pass in a value for v when you make new instances of your class. *smack*!!

Re: looking for ocbc example

2007-11-28 Thread Tim Golden
Carl K wrote: jay graves wrote: On Sep 21, 2:43 am, Tim Golden [EMAIL PROTECTED] wrote: Carl K wrote: It seems there are 2 odbc modules - pyOdbc and mxOdbc - anyone know the difference? In short, pyodbc is open source; mxOdbc requires a commercial license. pyodbc is a newcomer, but appears

Re: Unexpected behavior when initializing class

2007-11-28 Thread John Machin
On Nov 28, 7:19 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello everybody, I've banged my ahead around for a while trying to figure out why multiple instances of a class share the same instance variable. I've stripped down my code to the following, which reproduces my problem.

Re: Unexpected behavior when initializing class

2007-11-28 Thread Duncan Booth
Paul Rudin [EMAIL PROTECTED] wrote: You have to understand that the default value for v - an empty list - is made at compile time Not at compile time: the default value is created at runtime when the def statement is executed. -- http://mail.python.org/mailman/listinfo/python-list

How to debug Python program with GUI (Tkinter)?

2007-11-28 Thread Davy
Hi all, How to debug Python program with GUI, especially Tkinter? My debug environment is PythonWin. For example, when I single step in the program, the step will go to mainloop() and always loop there. How can I know where the program is processed? Any suggestions are welcome! Best regards,

Re: read/write to java socket in python

2007-11-28 Thread Dave Baum
Your server program is using readLine(), which will block until a newline is received. The server code does not write a newline, so it is waiting at recv() for data from the server, and the server is still waiting for a newline. If you change the client to do the following, it should work:

Re: OPLC purchase period extended

2007-11-28 Thread Richie Hindle
[Aahz] I'm sure that some people would be willing to serve as middleware... I would *love* to have one of these for my kids, if anyone here would be prepared to forward one to the UK for me. I can pay you the postage by PalPal, Amazon voucher, whatever suits. The XO reminds me of the

Re: How to debug Python program with GUI (Tkinter)?

2007-11-28 Thread Diez B. Roggisch
Davy wrote: Hi all, How to debug Python program with GUI, especially Tkinter? My debug environment is PythonWin. For example, when I single step in the program, the step will go to mainloop() and always loop there. How can I know where the program is processed? You can't - the mainloop

Is Ruby 1.9 going to be faster than CPython?

2007-11-28 Thread Nicola Larosa (tekNico)
Holy Shmoly, Ruby 1.9 smokes Python away! http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/ The post is less flaming than the title, fortunately. :-) -- Nicola Larosa - http://www.tekNico.net/ If you have multiple CPUs and you want to use them all, fork off as many

tcp traceroute

2007-11-28 Thread Thomas Guettler
Hi, I want to write a small tcp traceroute script. I works, but how can I get the IP of the hop that send 'no route to host'? Result: python tmp/tcptraceroute.py a.b.c.d 80 ttl=01: (113, 'No route to host') ttl=02: (113, 'No route to host') ttl=03: (113, 'No route to host') ttl=04: timed out

Re: securing a python execution environment...

2007-11-28 Thread miller . paul . w
Here's some proof of concept code I wrote a while back for this very purpose. What I do is use compiler.parse to take a code string and turn it into an abstract syntax tree. Then, using a custom visitor object that raises an exception if it comes across something it doesn't like, I use

Re: Different kinds of Import Errors

2007-11-28 Thread Peter Otten
Thomas Guettler wrote: If you look at this code, you see there are two kind of ImportErrors: 1. app_name has no attribute or file managment.py: That's OK. 2. managment.py exists, but raises an ImportError: That's not OK: reraise # Import the 'management' module within each

Trainings/Projects on Bioinformatics, Molecular Biology, MicroBiology, Drug Designing and SAS Programming at Global Institute of Biotechnology

2007-11-28 Thread Global Institute of Biotechnology
GLOBAL INSTITUTE OF BIOTECHNOLOGY ( A unit of SVS Education Society, Regn No 1640 of 2005, Govt.A.P.) 3-6-276/2, Sai Triveni Chambers, Above Mahesh Bank, Hyderabad, A.P. ABOUT OURSELVES Global Institute of Biotechnology in its short span of existence for a period of Three years has emerged as a

Trainings/Projects on Bioinformatics, Molecular Biology, MicroBiology, Drug Designing and SAS Programming at Global Institute of Biotechnology

2007-11-28 Thread Global Institute of Biotechnology
GLOBAL INSTITUTE OF BIOTECHNOLOGY ( A unit of SVS Education Society, Regn No 1640 of 2005, Govt.A.P.) 3-6-276/2, Sai Triveni Chambers, Above Mahesh Bank, Hyderabad, A.P. ABOUT OURSELVES Global Institute of Biotechnology in its short span of existence for a period of Three years has emerged as a

Re: string conversion latin2 to ascii

2007-11-28 Thread Jakub Wilk
* Martin Landa [EMAIL PROTECTED], 2007-11-27: I have unicode string (or better say latin2 encoding) containing non-ascii characters, e.g. s = Ukázka_možnosti_využití_programu_OpenJUMP_v_SOA I would like to convert this string to plain ascii (using some lookup table for latin2) to get -

**EARN $10000 PER MONTH**CHECK PROOF**

2007-11-28 Thread ramya1898
**EARN $1 PER MONTH**CHECK PROOF** **BPM SOFTWARE** **INTERNET SOFTWARE** **SOFTWARE DEVELOPMENT** **PROCESS MODELLING SOFTWARE** http://regantame.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: the annoying, verbose self

2007-11-28 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : On Tue, 27 Nov 2007 10:11:48 +0100, Bruno Desthuilliers wrote: Fine. Now since Python let you define your own callable types and your own descriptors, you can as well have an attribute that behave just like a method without being an instance of any of the method

Re: Troubleshooting garbage collection issues

2007-11-28 Thread [EMAIL PROTECTED]
Thanks for the thoughts - much appreciated! The threaded super-goat was indeed the offender. A very aggressive QA tester got us enough of a pattern to identify the offending module: pyOpenSSL. After looking at it closely, we found there are problems with its thread handling. In particular, the

Re: How to Teach Python Variables

2007-11-28 Thread Aaron Watters
On Nov 27, 5:31 pm, MonkeeSage [EMAIL PROTECTED] wrote: Of course. But then it really depends on the teaching methodology, doesn't it? There is no reason (well, barring the restraints of the curriculum vitea), that one should learn topics so complex as to require off-putting the *real*

Re: How to Teach Python Variables

2007-11-28 Thread hdante
On Nov 28, 1:09 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: Python variables are pointers and that's it. How do I increment a Python variable so that it points to the next address, like I can do with pointers in C, Pascal, and other

Re: string conversion latin2 to ascii

2007-11-28 Thread kyosohma
On Nov 27, 5:08 pm, John Machin [EMAIL PROTECTED] wrote: On Nov 28, 8:45 am, [EMAIL PROTECTED] wrote: On Nov 27, 3:35 pm, Martin Landa [EMAIL PROTECTED] wrote: Hi all, sorry for a newbie question. I have unicode string (or better say latin2 encoding) containing non-ascii

Re: Unexpected behavior when initializing class

2007-11-28 Thread Mel
Paul Rudin wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: A common paradigm to get round this - assuming you want a different empty list each time - is something like: def __init__(self, v = None): self.values = v if v else [] (or maybe test explicitly for None, but you get the

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-28 Thread Thomas Guettler
Istvan Albert schrieb: It will be awesome if mod_wsgi can run CGI without invoking python on each access. For SCGI there is something like this: cgi2scgi: it is small executable written in C, which connects to a running SCGI server. Executing this small binary on every request is no big

Tip of the day generator.

2007-11-28 Thread Joseph king
Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a file with a lot of tips and useless facts and then have python

WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread black_13
I have included a small script the reproduces the error I am having in larger script. The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' seems to be causing the error but im not sure why. - script import _winreg import string def

Re: How to Teach Python Variables

2007-11-28 Thread hdante
On Nov 28, 1:42 pm, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-28, hdante [EMAIL PROTECTED] wrote: On Nov 28, 1:09 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: Python variables are pointers and that's it. How do I increment a

Re: How to Teach Python Variables

2007-11-28 Thread Neil Cerutti
On 2007-11-28, hdante [EMAIL PROTECTED] wrote: On Nov 28, 1:42 pm, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-28, hdante [EMAIL PROTECTED] wrote: On Nov 28, 1:09 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote: Python variables are

Re: Tip of the day generator.

2007-11-28 Thread Diez B. Roggisch
Joseph king wrote: Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a file with a lot of tips and useless

Re: How to Teach Python Variables

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 9:51 AM, hdante [EMAIL PROTECTED] wrote: On Nov 28, 1:42 pm, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-11-28, hdante [EMAIL PROTECTED] wrote: On Nov 28, 1:09 am, Steven D'Aprano [EMAIL PROTECTED] wrote: On Tue, 27 Nov 2007 10:21:36 -0800, hdante wrote:

Re: Tip of the day generator.

2007-11-28 Thread Neil Cerutti
On 2007-11-28, Joseph king [EMAIL PROTECTED] wrote: Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a file

Re: WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread Jerry Hill
On Nov 28, 2007 11:04 AM, black_13 [EMAIL PROTECTED] wrote: I have included a small script the reproduces the error I am having in larger script. The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' seems to be causing the error but im not sure why. ... WindowsError: [Error 5]

Re: How to Teach Python Variables

2007-11-28 Thread hdante
On Nov 28, 2:06 pm, Neil Cerutti [EMAIL PROTECTED] wrote: That's right. Languages may have arbitrary sets of operations defined for their variables. There's nothing wrong with that. No, arbitrary operations would be useless. 1) You may convince a big company to add you newly developed

Re: Tip of the day generator.

2007-11-28 Thread Jason
On Nov 28, 9:00 am, Joseph king [EMAIL PROTECTED] wrote: Hey i was wondering if any one would know if there was a way to have python randomly read form a file or would you ahve to know the byte postion and somehow randomize splicing the file so the sentence you want show's up. i.e have a

Re: WindowsError: [Error 5] Access is denied With _winreg.enum

2007-11-28 Thread kyosohma
On Nov 28, 10:04 am, black_13 [EMAIL PROTECTED] wrote: I have included a small script the reproduces the error I am having in larger script. The line 'hkey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,name)' seems to be causing the error but im not sure why. - script

Re: Tip of the day generator.

2007-11-28 Thread Neil Cerutti
On 2007-11-28, Neil Cerutti [EMAIL PROTECTED] wrote: import textwrap import random import os print Sigswap v0.4 [...] Yikes! That program was in dire need of Pythonification. It must have been written early in my Pythonology. -- Neil Cerutti --

Creating the windows MSI of python

2007-11-28 Thread Floris Bruynooghe
Hello I've managed to build python2.4 and python2.5 in windows with MSVC++ 7.1 fine following the instructions in the PCbuild directory. However now I am wondering how to create the MSI from this[1], but can't find any instructions. All I'm looking for is the equivalent of make install (or make

Re: How to Teach Python Variables

2007-11-28 Thread hdante
On Nov 28, 2:12 pm, Chris Mellon [EMAIL PROTECTED] wrote: Right. Python variables are pointers, except for all the ways that they are different. By the same criteria, they are also puppies. Give it a rest. I'm sorry if your notion of pointer is incorrect. A pointer (or, more formally, a

Re: Unexpected behavior when initializing class

2007-11-28 Thread Arnaud Delobelle
On Nov 28, 3:04 pm, Mel [EMAIL PROTECTED] wrote: Paul Rudin wrote: [EMAIL PROTECTED] [EMAIL PROTECTED] writes: A common paradigm to get round this - assuming you want a different empty list each time - is something like: def __init__(self, v = None): self.values = v if v else []

Re: How to Teach Python Variables

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 10:57 AM, hdante [EMAIL PROTECTED] wrote: On Nov 28, 2:12 pm, Chris Mellon [EMAIL PROTECTED] wrote: Right. Python variables are pointers, except for all the ways that they are different. By the same criteria, they are also puppies. Give it a rest. I'm sorry if your

string parsing / regexp question

2007-11-28 Thread Ryan Krauss
I need to parse the following string: $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr -{{{\it m_2}\,s^2\,F }\over{k}}-F+\left({\it m_2}\,s^2\,\left({{{\it m_2}\,s^2}\over{k}}+1 \right)+{\it m_2}\,s^2\right)\,{\it x_1}\cr 1\cr

Re: Creating the windows MSI of python

2007-11-28 Thread Christian Heimes
Floris Bruynooghe wrote: It would be great if someone knows how Python builds it's MSI. The Tools/ directory contains a script in Tools/msi/msi.py. Martin von Löwis is using the script to generate the official MSI bundles. You need to run it from a development shell. Good luck! Christian --

Re: string parsing / regexp question

2007-11-28 Thread Tim Chase
The trick is that there are extra curly braces inside the \pmatrix{ } strings and I don't know how to write a regexp that would count the number of open and close curly braces and make sure they match, so that it can find the correct ending curly brace. This criterion is pretty much a

Re: How to Teach Python Variables

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 11:23:42AM -0600, Chris Mellon wrote regarding Re: How to Teach Python Variables: On Nov 28, 2007 10:57 AM, hdante [EMAIL PROTECTED] wrote: On Nov 28, 2:12 pm, Chris Mellon [EMAIL PROTECTED] wrote: Right. Python variables are pointers, except for all the ways

Python Nmap script linux version

2007-11-28 Thread Daniel Folkes
I made this script for fun. you need to have Nmap installed on your linux computer and it will find all the computers on the network and then run Nmap on it. Hope you enjoy! import os fn = 'i.result' ip = '192.168.1.1-255' ip1 = ip[:3] ips = [] os.system(nmap -sP 192.168.1.1-255 +fn) f =

Try/Except/Yield/Finally...I'm Lost :-}

2007-11-28 Thread Victor Subervi
Hi; I am trying to find words in a document that are identical to any word in a vocabulary list, to replace that word with special markup. Let's say the word is dharma. I don't want to replace the first few letters of, say dharmawuhirfuhi. Also, to make matters more difficult, if the word adharma

Re: Code Management

2007-11-28 Thread misc
On Nov 20, 4:09 pm, Jens [EMAIL PROTECTED] wrote: 1) Should I put my unittests in a subdirectory? Does the subdirectory have to be a package? As others have suggested, this is a good way to organise your tests. To avoid problems with the import path, look at nosetests [1]. This allows you to

Re: Books on Python

2007-11-28 Thread shadowsithe
On Nov 27, 10:05 pm, barcaroller [EMAIL PROTECTED] wrote: Can someone kindly recommend some good books on the following: Python for beginners Python for advanced users Is there a bible like Larry Wall's Programming Perl or Bjarne Stroustrup's The C++ Programming Language? Python in

Trying to build cjson on Widnows, getting errors

2007-11-28 Thread Jack
Since I don't have VS2003, I'm trying to build cjson with MingW and Cygwin but I'm getting lots of errors like these: build\temp.win32-2.5\Release\cjson.o(.text+0x8e):cjson.c: undefined reference to `_imp___Py_NoneStruct' build\temp.win32-2.5\Release\cjson.o(.text+0x95):cjson.c: undefined

Re: Books on Python

2007-11-28 Thread Jeff McNeil
I've purchased a couple of books on Python and I keep going back to Python in a Nutshell. It's about the only printed text I keep on my desk all the time. It has a nice introduction to the language and includes the specification, too. If you're familiar with programming,

Re: string parsing / regexp question

2007-11-28 Thread Paul McGuire
On Nov 28, 11:32 am, Ryan Krauss [EMAIL PROTECTED] wrote: I need to parse the following string: $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr -{{{\it m_2}\,s^2\,F }\over{k}}-F+\left({\it m_2}\,s^2\,\left({{{\it

Control mouse position and clicking

2007-11-28 Thread Glich
hi, how can I, control mouse position and clicking from python? I want to interact with a flash application inside firefox. thanks. ps: I am not using windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: wxPython problem

2007-11-28 Thread SMALLp
[EMAIL PROTECTED] wrote: On Nov 28, 1:06 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin

wxPython problem

2007-11-28 Thread SMALLp
Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin lik thile in IDLE: import wx app = wx.App() wx.Frmae(none, -1) same thing,

Re: wxPython problem

2007-11-28 Thread kyosohma
On Nov 28, 1:06 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i vrite smoethin lik thile in IDLE: import

Re: Control mouse position and clicking

2007-11-28 Thread Paul McGuire
On Nov 28, 1:29 pm, Glich [EMAIL PROTECTED] wrote: hi, how can I, control mouse position and clicking from python? I want to interact with a flash application inside firefox. thanks. ps: I am not using windows. Ooof, I was about to suggest using pywinauto, because I was able to interact with

Re: Control mouse position and clicking

2007-11-28 Thread Laszlo Nagy
Paul McGuire wrote: On Nov 28, 1:29 pm, Glich [EMAIL PROTECTED] wrote: hi, how can I, control mouse position and clicking from python? I want to interact with a flash application inside firefox. thanks. ps: I am not using windows. Ooof, I was about to suggest using pywinauto,

Re: win32serviceutil won't start

2007-11-28 Thread Nikola Skoric
Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), [EMAIL PROTECTED] [EMAIL PROTECTED] kaze: Sorry I didn't reply sooner. If you're creating a service based on a Python file, check out the following links in addition to the book Wolfgang mentioned:

Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this: i've a byte that naturally is composed from 2 nibbles hilow, and two chars.. like A nd B. What i wonna do is to write A to the High

Re: string parsing / regexp question

2007-11-28 Thread Paul McGuire
On Nov 28, 1:23 pm, Paul McGuire [EMAIL PROTECTED] wrote: As Tim Grove points out, ... s/Grove/Chase/ Sorry, Tim! -- Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this: i've a byte that naturally is composed from 2 nibbles

Re: Bit Operations

2007-11-28 Thread Tim Chase
I'm really confused on how t do it, maybe cause python is type-less (dynamic typed) Being duck-typed doesn't really have anything to do with it. Python supports logical shifting and combining i've a byte that naturally is composed from 2 nibbles hilow, and two chars.. like A nd B. What i

Re: win32serviceutil won't start

2007-11-28 Thread kyosohma
On Nov 28, 1:59 pm, Nikola Skoric [EMAIL PROTECTED] wrote: Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), [EMAIL PROTECTED] [EMAIL PROTECTED] kaze: Sorry I didn't reply sooner. If you're creating a service based on a Python file, check out the following links in addition to the book Wolfgang

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 2:27 PM, Chris Mellon [EMAIL PROTECTED] wrote: On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My

Re: string parsing / regexp question

2007-11-28 Thread Tim Chase
Paul McGuire wrote: On Nov 28, 1:23 pm, Paul McGuire [EMAIL PROTECTED] wrote: As Tim Grove points out, ... s/Grove/Chase/ Sorry, Tim! No problem...it's not like there aren't enough Tim's on the list as it is. :) -tkc -- http://mail.python.org/mailman/listinfo/python-list

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 7:07 am, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this: i've a byte that naturally is composed from 2 nibbles hilow,

Re: Bit Operations

2007-11-28 Thread Grant Edwards
On 2007-11-28, Chris Mellon [EMAIL PROTECTED] wrote: On Nov 28, 2007 2:07 PM, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this:

Re: Bit Operations

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 09:07:56PM +0100, Gianmaria Iaculo - NVENTA wrote regarding Bit Operations: Hi there, I'm so new to python (coming from .net so excuse me for the stupid question) and i'm tring to do a very simple thing,with bytes. My problem is this: i've a byte that naturally

Optimized Python bytecode

2007-11-28 Thread Looney, James B
I'm using SCons to build all kinds of things, and part of our build process involves creating a release version of our software. In the case of Python, that means compiling the .py into a .pyc or .pyo. Because I'm placing the compiled script into a different location from the .py, I have to

Re: Bit Operations

2007-11-28 Thread Dan Upton
0xff (((0xff a) 4) | (0xff b)) 150 or, if you're sloppy, (a 4) | b 150 Slightly OT, maybe - why exactly is the second alternative 'sloppy?' I believe you, because I had a problem once (in Java) with bytes not having the value I expected unless I did the and-magic, but I wasn't

Re: Creating the windows MSI of python

2007-11-28 Thread Floris Bruynooghe
On Nov 28, 5:26 pm, Christian Heimes [EMAIL PROTECTED] wrote: Floris Bruynooghe wrote: It would be great if someone knows how Python builds it's MSI. The Tools/ directory contains a script in Tools/msi/msi.py. Martin von Löwis is using the script to generate the official MSI bundles. You

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
Txs all, i wont to respond to who asked why i needed it: I'm using python on GSM modules and the informations i have to move goes along GPRS/UMTS connections so it's beatiful for me to transfer more informations with less space... imagine i have to send this simple data 41.232323,12.345678

Tuning question

2007-11-28 Thread Wally Lepore
Hi Graham Is this email still good? Its been awhile since we spoke last on the tuning list. Are you still on Yahoo messenger? Also, what is your email address please. You told me to email you when I had questions that seemed too basic for the tuning list. Thanks Graham. My email is [EMAIL

Re: Bit Operations

2007-11-28 Thread J. Clifford Dyer
On Wed, Nov 28, 2007 at 10:05:40PM +0100, Gianmaria Iaculo - NVENTA wrote regarding Re: Bit Operations: Txs all, i wont to respond to who asked why i needed it: I'm using python on GSM modules and the informations i have to move goes along GPRS/UMTS connections so it's beatiful for me to

Python Network Graph Library

2007-11-28 Thread [EMAIL PROTECTED]
Hi Folks, I am looking for a network Graph Library with Python bindings (Iron or C!). Just need a simple relationship visualisation - seen a few via google but many seem to be unmaintained. Any suggestions? Thanks, Davy Mitchell -- Davy Mitchell Blog - http://daftspaniel.blogspot.com Twitter

Re: Bit Operations

2007-11-28 Thread Chris Mellon
On Nov 28, 2007 3:18 PM, J. Clifford Dyer [EMAIL PROTECTED] wrote: On Wed, Nov 28, 2007 at 10:05:40PM +0100, Gianmaria Iaculo - NVENTA wrote regarding Re: Bit Operations: Txs all, i wont to respond to who asked why i needed it: I'm using python on GSM modules and the informations i

Re: Control mouse position and clicking

2007-11-28 Thread Bjoern Schliessmann
Glich wrote: hi, how can I, control mouse position and clicking from python? I want to interact with a flash application inside firefox. thanks. ps: I am not using windows. On Mac, IIRC, you can't. Regards, Björn -- BOFH excuse #394: Jupiter is aligned with Mars. --

exporting from twiki

2007-11-28 Thread Gerry
I have a twiki, with documentation on 200 things. I'd like to export the 200 pages, with their embedded graphs, to some static version (word, pdf, ...) that I can give to a non-connected, reference user community to read - i.e., no =navigation required beyond back and forth to a table of

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
U are really nice guys... i'm really apreciating (sorry 4 my bad english) Chriss is right this are coordinates and i'm treating as strings naturally I dont really have floating points on my module.. it run a 1.5 python version from Telit. So i dont have zLib too... just have 1.5 Mb of Ram

Re: Bit Operations

2007-11-28 Thread Tim Chase
0xff (((0xff a) 4) | (0xff b)) 150 or, if you're sloppy, (a 4) | b 150 Slightly OT, maybe - why exactly is the second alternative 'sloppy?' I believe you, because I had a problem once (in Java) with bytes not having the value I expected unless I did the and-magic, but I wasn't

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 8:35 am, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: U are really nice guys... i'm really apreciating (sorry 4 my bad english) Chriss is right this are coordinates and i'm treating as strings naturally I dont really have floating points on my module.. it run a 1.5 python

Re: Books on Python

2007-11-28 Thread Lou Pecora
In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: On Nov 27, 10:05 pm, barcaroller [EMAIL PROTECTED] wrote: Can someone kindly recommend some good books on the following: Python for beginners Python for advanced users Is there a bible like Larry Wall's Programming Perl

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 8:05 am, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Txs all, i wont to respond to who asked why i needed it: I'm using python on GSM modules and the informations i have to move goes along GPRS/UMTS connections so it's beatiful for me to transfer more informations with less

Re: Bit Operations

2007-11-28 Thread Gianmaria Iaculo - NVENTA
John can you make an example of this solution? You maen that a more compact way is possible??? Firma Gianmaria Iaculo John Machin [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] On Nov 29, 8:05 am, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: Txs all, i wont to

Re: Books on Python

2007-11-28 Thread kyosohma
On Nov 27, 9:05 pm, barcaroller [EMAIL PROTECTED] wrote: Can someone kindly recommend some good books on the following: Python for beginners Python for advanced users Is there a bible like Larry Wall's Programming Perl or Bjarne Stroustrup's The C++ Programming Language? For good

Re: Bit Operations

2007-11-28 Thread John Machin
On Nov 29, 9:20 am, Gianmaria Iaculo - NVENTA [EMAIL PROTECTED] wrote: John can you make an example of this solution? Which possible solution? (a) 32-bit floating point (b) 32-bit integer (c) packed decimal You maen that a more compact way is possible??? More compact than what? If your

Re: Python Network Graph Library

2007-11-28 Thread jay graves
On Nov 28, 3:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Folks, I am looking for a network Graph Library with Python bindings (Iron or C!). Just need a simple relationship visualisation - seen a few via google but many seem to be unmaintained. I've used GraphViz before but never

Re: wxPython problem

2007-11-28 Thread SMALLp
SMALLp wrote: [EMAIL PROTECTED] wrote: On Nov 28, 1:06 pm, SMALLp [EMAIL PROTECTED] wrote: Hy. I'm new in linux (Ubuntu 7.10) as well as in python. I installed IDLE, and i installed package python-wxgtkX. I start IDLE and when i want co compile my aplication all windows close. Also when i

Re: Control mouse position and clicking

2007-11-28 Thread Tony
On Nov 28, 9:33 pm, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: snip On Mac, IIRC, you can't. Regards, well, you can do it from Java, (the Robot class, as I recall), so you should be able to do it in Jython, which is a Python implementation, so Tony --

Re: Control mouse position and clicking

2007-11-28 Thread Tony
On Nov 28, 9:33 pm, Bjoern Schliessmann usenet- [EMAIL PROTECTED] wrote: snip On Mac, IIRC, you can't. Regards, well, you can do it from Java, (the Robot class, as I recall), so you should be able to do it in Jython, which is a Python implementation, so Tony --

Re: Running unmodified CGI scripts persistently under mod_wsgi.

2007-11-28 Thread Graham Dumpleton
On Nov 29, 2:36 am, Thomas Guettler [EMAIL PROTECTED] wrote: Istvan Albert schrieb: It will be awesome ifmod_wsgican run CGI without invoking python on each access. For SCGI there is something like this: cgi2scgi: it is small executable written in C, which connects to a running SCGI

Re: How to Teach Python Variables

2007-11-28 Thread Ben Finney
Chris Mellon [EMAIL PROTECTED] writes: Whether you like it or not, the term pointer has a specific common meanings. They do not mean any means by which you may reference a value. variable is certainly less clear and is used much more loosely, but in the specific context of comparison to C,

Re: string parsing / regexp question

2007-11-28 Thread Ryan Krauss
Interesting. Thanks Paul and Tim. This looks very promising. Ryan On Nov 28, 2007 1:23 PM, Paul McGuire [EMAIL PROTECTED] wrote: On Nov 28, 11:32 am, Ryan Krauss [EMAIL PROTECTED] wrote: I need to parse the following string: $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it

Re: string parsing / regexp question

2007-11-28 Thread Ryan Krauss
On Nov 28, 2007 1:23 PM, Paul McGuire [EMAIL PROTECTED] wrote: On Nov 28, 11:32 am, Ryan Krauss [EMAIL PROTECTED] wrote: I need to parse the following string: $$\pmatrix{{\it x_2}\cr 0\cr 1\cr }=\pmatrix{\left({{{\it m_2}\,s^2 }\over{k}}+1\right)\,{\it x_1}-{{F}\over{k}}\cr -{{{\it

Re: image rendering in python

2007-11-28 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: http://cdnll.i.imagechef.com/ic/templimg2/Shaved%20Head.jpg Do u know how to make such images using PIL using PIL, you can prepare a background image (the head), an overlay layer (properly shaded flesh tones) and a mask (e.g. using ImageDraw and a suitable font), and

Re: Python Network Graph Library

2007-11-28 Thread Anand Patil
On Nov 28, 2007 2:38 PM, jay graves [EMAIL PROTECTED] wrote: On Nov 28, 3:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Folks, I am looking for a network Graph Library with Python bindings (Iron or C!). Just need a simple relationship visualisation - seen a few via google

  1   2   >