All types of Management careers.

2011-03-22 Thread gaurav
Rush for Perfect computer part time online home jobs to earn unlimited. http://rojgars1.webs.com/gov.htmhttp://rojgars.webs.com/bankingjobs.htm Management careers to earn extra. Employments in Management careers. http://managementjobs.webs.com/pm.htm http://jobshunter.webs.com/index.htm -- ht

Re: having both dynamic and static variables

2011-03-22 Thread John Ladasky
On Mar 5, 9:44 pm, John Nagle wrote: >     All functions in Python can be replaced dynamically. While they're > running. From another thread.  Really. Indeed, and I find this feature VERY useful when coding. Two places I've used it are: 1) in GUI coding (say, when I have a panel of buttons, an

Re: May I discuss here issues on Machine Learning?

2011-03-22 Thread Ben Finney
joy99 writes: > My apology to pose this non python question in this forum. I am trying > to develop one Naive Bayes Classifier and one HMM with Python. But my > question is not related to Python, rather to these two models, whether > I am choosing right parameters, etc for these models. > > Pytho

Re: file print extra spaces

2011-03-22 Thread MRAB
On 23/03/2011 01:54, Thomas L. Shinnick wrote: At 08:33 PM 3/22/2011, monkeys paw wrote: When i open a file in python, and then print the contents line by line, the printout has an extra blank line between each printed line (shown below): >>> f=open('authors.py') >>> i=0 >>> for line in f: prin

Re: file print extra spaces

2011-03-22 Thread MRAB
On 23/03/2011 01:33, monkeys paw wrote: When i open a file in python, and then print the contents line by line, the printout has an extra blank line between each printed line (shown below): >>> f=open('authors.py') >>> i=0 >>> for line in f: print(line) i=i+1 if i > 14: break author_list =

Re: file print extra spaces

2011-03-22 Thread Thomas L. Shinnick
At 08:33 PM 3/22/2011, monkeys paw wrote: When i open a file in python, and then print the contents line by line, the printout has an extra blank line between each printed line (shown below): >>> f=open('authors.py') >>> i=0 >>> for line in f: print(line) i=i+1 if i > 14:

Re: file print extra spaces

2011-03-22 Thread Alex Willmer
On Mar 23, 1:33 am, monkeys paw wrote: > When i open a file in python, and then print the > contents line by line, the printout has an extra blank > line between each printed line (shown below): > >  >>> f=open('authors.py') >  >>> i=0 >  >>> for line in f: >         print(line) >         i=i+1 >

Re: file print extra spaces

2011-03-22 Thread bruce bushby
Run your script and "pipe" the output to "| od -c" the octal dumper will show you what characters you're printing.I'm guessing python's "print" is adding one and each line in your file contains another. You can also use a "," in python I forget the exact syntax, something like "print(line

file print extra spaces

2011-03-22 Thread monkeys paw
When i open a file in python, and then print the contents line by line, the printout has an extra blank line between each printed line (shown below): >>> f=open('authors.py') >>> i=0 >>> for line in f: print(line) i=i+1 if i > 14: break author_lis

Re: PyCObject_FromVoidPtr etc.

2011-03-22 Thread Martin v. Loewis
> Is there a way to keep things (almost) as simple as this using the > 'Capsules' ?? Most certainly. Instead of PyCObject_FromVoidPtr, use PyCapsule_New. Either pass NULL as a name, or the class name for additional type-safety. Instead of PyCObject_AsVoidPtr, use PyCapsule_GetPointer. The only di

Re: Proxy authentication required

2011-03-22 Thread Chris Rebert
On Tue, Mar 22, 2011 at 3:57 AM, gervaz wrote: > On 22 Mar, 09:34, gervaz wrote: >> On 22 Mar, 00:02, Chris Rebert wrote: >> > On Mon, Mar 21, 2011 at 2:38 AM, gervaz wrote: >> > > Hi all, >> > > I've got to download some web pages but I'm behind a proxy. So far >> > > this is what I've used wi

Re: Python 3.2 Debug build

2011-03-22 Thread Benjamin Kaplan
On Tue, Mar 22, 2011 at 6:25 PM, Willis Cheung wrote: > Thanks for your answers. Just to make sure I do it correctly, is it the > CPython package on http://hg.python.org the one which I should be > downloading? Thanks again > > > > Wilis > If you want to compile your own copy of Python 3.2, you s

Re: os.stat bug?

2011-03-22 Thread Dan Stromberg
On Mon, Mar 21, 2011 at 1:32 AM, Laszlo Nagy wrote: > > Hi All, > > I have a Python program that goes up to 100% CPU. Just like this (top): > > PID USERNAME THR PRI NICE SIZERES STATE C TIME WCPU > COMMAND > 80212 user1 2 440 70520K 16212K select 1 0:30 100.0

Re: Problem with re module

2011-03-22 Thread Ethan Furman
John Harrington wrote: Here's a script that illustrates the problem. Any help would be appreciated!: #BEGIN SCRIPT import re outlist = [] myfile = "raw.tex" fin = open(myfile, "r") lineList = fin.readlines() fin.close() for i in range(0,len(lineList)): lineList[i]=re.sub(r'(\\begin{do

May I discuss here issues on Machine Learning?

2011-03-22 Thread joy99
Dear Group, My apology to pose this non python question in this forum. I am trying to develop one Naive Bayes Classifier and one HMM with Python. But my question is not related to Python, rather to these two models, whether I am choosing right parameters, etc for these models. Python is a chosen

PyCObject_FromVoidPtr etc.

2011-03-22 Thread Fons Adriaensen
Hello all, Upgrading to 3.2 has provided some sort of cold shower. I have hundreds of extensions that fail to install due to PyCObject_FromVoidPtr() and PyCObject_AsVoidPtr() not longer being available, and I'm looking for a (hopefully) simple solution. In all cases, these are extensions that cr

Re: Calling C++ Modules in Python

2011-03-22 Thread Stefan Behnel
zxpat...@gmail.com, 11.03.2011 23:16: On Mar 11, 2011 4:59pm, Dan Stromberg wrote: On Fri, Mar 11, 2011 at 1:15 PM, Patrick wrote: I saw in the Beginner document that "•Is easily extended by adding new modules implemented in a compiled language such as C or C++. ". While to my investigation, it

RE: Python 3.2 Debug build

2011-03-22 Thread Willis Cheung
Thanks for your answers. Just to make sure I do it correctly, is it the CPython package on http://hg.python.org the one which I should be downloading? Thanks again Willis From: Santoso Wijaya [mailto:santoso.wij...@gmail.com] Sent: Thursday, March 17, 2011 6:05 PM To: Willis Cheung Cc: p

Re: os.utime

2011-03-22 Thread Dan Stromberg
On Mon, Mar 21, 2011 at 2:43 AM, Christian Heimes wrote: > I'm sorry if I offended you in any way. I had to clarify the meaning of > st_ctime many times in the past because people confused it for the > creation ts of the file. > Apologies if I got too defensive. I agree that it was worth pointin

Re: Problem with re module

2011-03-22 Thread John Harrington
On Mar 22, 12:07 pm, Benjamin Kaplan wrote: > On Tue, Mar 22, 2011 at 2:40 PM, John Harrington > > > > wrote: > > On Mar 22, 11:16 am, John Bokma wrote: > >> John Harrington writes: > >> > I'm trying to use the following substitution, > > >> >      lineList[i]=re.sub(r'(\\begin{document})([^$])

help porting an open source toolkit to Mac and Windows/Cygwin

2011-03-22 Thread bobicanprogram
I am the facilitator for the SIMPL open source project (http:// www.icanprogram.com/simpl). The SIMPL toolkit project started over 10 years ago as a way to bring Send/Receive/Reply (QNX style) messaging to Linux. A SIMPL application consists of two or more interacting SIMPL modules. Those modul

Re: Problem with re module

2011-03-22 Thread Benjamin Kaplan
On Tue, Mar 22, 2011 at 2:40 PM, John Harrington wrote: > On Mar 22, 11:16 am, John Bokma wrote: >> John Harrington writes: >> > I'm trying to use the following substitution, >> >> >      lineList[i]=re.sub(r'(\\begin{document})([^$])',r'\1\n\n >> > \2',lineList[i]) >> >> > I intend this to matc

Re: Re: Calling C++ Modules in Python

2011-03-22 Thread zxpatric
Dan, Recently I am trying out both the SWIG and BOOST, maybe Cython later. However, I didn't get lucky with the combination of the latest SWIGwin 2.0.2 and Python3.2. No matter I build _example.pyd, example.pyd or _example.dll, or example.dll, it just doesn't get imported as said in the instructio

Re: Problem with re module

2011-03-22 Thread John Harrington
On Mar 22, 11:16 am, John Bokma wrote: > John Harrington writes: > > I'm trying to use the following substitution, > > >      lineList[i]=re.sub(r'(\\begin{document})([^$])',r'\1\n\n > > \2',lineList[i]) > > > I intend this to match any string "\begin{document}" that doesn't end > > in a line end

Re: Problem with re module

2011-03-22 Thread Peter Otten
John Harrington wrote: > I'm trying to use the following substitution, > > lineList[i]=re.sub(r'(\\begin{document})([^$])',r'\1\n\n > \2',lineList[i]) > > I intend this to match any string "\begin{document}" that doesn't end > in a line ending. If there's no line ending, then, I want to pl

best practice to resolve module dependency within a reusable application

2011-03-22 Thread Marc Aymerich
Hi, I'm developing a reusable app splited into modules. The end user chooses what modules wants to keep installed. Most of this modules are quite independent from each other, but I have one of them (called moduleP) with a pretty strong dependency with another another(called moduleBase). So I need t

Re: Problem with re module

2011-03-22 Thread John Bokma
John Harrington writes: > I'm trying to use the following substitution, > > lineList[i]=re.sub(r'(\\begin{document})([^$])',r'\1\n\n > \2',lineList[i]) > > I intend this to match any string "\begin{document}" that doesn't end > in a line ending. If there's no line ending, then, I want to pl

Re: argparse and filetypes

2011-03-22 Thread Robert Kern
On 3/22/11 9:06 AM, Bradley Hintze wrote: Hi, I just started with argparse. I want to simply check the extension of the file that the user passes to the program. I get a ''file' object has no attribute 'rfind'' error when I use os.path.splitext(args.infile). Here is my code. import argparse, s

Problem with re module

2011-03-22 Thread John Harrington
I'm trying to use the following substitution, lineList[i]=re.sub(r'(\\begin{document})([^$])',r'\1\n\n \2',lineList[i]) I intend this to match any string "\begin{document}" that doesn't end in a line ending. If there's no line ending, then, I want to place two carriage returns between the s

Re: interrupted system call w/ Queue.get

2011-03-22 Thread Philip Winston
On Feb 18, 10:23 am, Jean-Paul Calderone wrote: > The exception is caused by a syscall returning EINTR.  A syscall will > return EINTR when a signal arrives and interrupts whatever that > syscall > was trying to do.  Typically a signal won't interrupt the syscall > unless you've installed a signal

Re: problem installing a module

2011-03-22 Thread Emile van Sebille
On 3/22/2011 8:19 AM luca72 said... Hello i try to install pyvisa under winxp sp3 i get this error: home_dir =os.environ['HOME'] Installation is clearly expecting a HOME environment variable that isn't there. You'll need to set it then install. HTH, Emile return self.data[key.upper()]

Re: Switching between Python releases under Windows

2011-03-22 Thread Sridhar Ratnakumar
On Tue, Mar 8, 2011 at 8:03 AM, Tim Golden wrote: > On 08/03/2011 15:58, Tim Golden wrote: >> >> On 08/03/2011 14:55, Edward Diener wrote: >>> >>> I have multiple versions of Python installed under Vista. Is there any >>> easy way of switching between them so that invoking python and file >>> asso

Re: Problem with keyboard up/down arrows in Python 2.4 interpreter

2011-03-22 Thread Sridhar Ratnakumar
On Monday, March 21, 2011 at 11:37 PM, Benjamin Kaplan wrote: On Tue, Mar 22, 2011 at 2:27 AM, Julien wrote: > > Hi, > > > > I'm having problems when typing the up/down arrows in the Python 2.4 > > interpreter (exact version: Python 2.4.6 (#1, Mar 3 2011, 15:45:53) > > [GCC 4.2.1 (Apple Inc. buil

SQLObject 0.15.1

2011-03-22 Thread Oleg Broytman
Hello! I'm pleased to announce version 0.15.1, a bugfix release of branch 0.15 of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be easy to u

Re: Free Software University - Python Certificate

2011-03-22 Thread Noah Hall
On Tue, Mar 22, 2011 at 11:30 AM, Giovani wrote: >> I don't know whether this site is useful or not. >> >> Assuming this site is serious: >> If you are already subscribed you might be able to give some feedback. >> >> One can't even see the list of courses without regsitering. >> This is very unpr

Re: argparse and filetypes

2011-03-22 Thread Alex Willmer
On Mar 22, 2:06 pm, Bradley Hintze wrote: > Hi, > > I just started with argparse. I want to simply check the extension of > the file that the user passes to the program. I get a ''file' object > has no attribute 'rfind'' error when I use > os.path.splitext(args.infile). Addendum, some file object

problem installing a module

2011-03-22 Thread luca72
Hello i try to install pyvisa under winxp sp3 i get this error: home_dir =os.environ['HOME'] return self.data[key.upper()] key error : 'HOME' i have installed a lot of tyme pyvisa and this is the first time that i get this error. Thanks Luca -- http://mail.python.org/mailman/listinfo/python-list

os.stat UnicodeEncodeError:

2011-03-22 Thread Sandy Oz
Hello everyone, I'm running into a problem with file names containing Unicode chars. Here is the error that I get when calling os.path.isfile: File "/usr/lib/python2.6/genericpath.py", line 29, in isfile st = os.stat(path) UnicodeEncodeError: 'ascii' codec can't encode characters in p

Re: How to build and upload eggs to pypi?

2011-03-22 Thread Gabriel Genellina
On 21 mar, 08:53, morphex wrote: > Hi, > > I have a couple of project which are on PyPi, and now I'd like to > update some of them.  Is there a good howto somewhere, showing how to > add new versions (instead of updating one that's already there) etc? There is a tutorial: http://wiki.python.org/m

Re: puzzle about file Object.readlines()

2011-03-22 Thread Gabriel Genellina
On 19 mar, 16:05, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, MRAB wrote: > > On 19/03/2011 13:15, 林桦 wrote: > >> i use python 2.5. os is window 7. > >> the puzzle is :python don't read the leave text when meet character: > >> chr(26) > >> the code is: > >> /fileObject=open('d:\\temp\\1.txt','w

Re: argparse and filetypes

2011-03-22 Thread Alex Willmer
On Mar 22, 2:06 pm, Bradley Hintze wrote: > I just started with argparse. I want to simply check the extension of > the file that the user passes to the program. I get a ''file' object > has no attribute 'rfind'' error when I use > os.path.splitext(args.infile).  Here is my code. > > import argpar

Re: os.stat bug?

2011-03-22 Thread Laszlo Nagy
I guess that the code is running in kernel mode. I think this because I can send a KILL signal to it and the state changes to the following: What's your operating system and file system? A better file system or system setting may increase your performance a lot. XFS or ext3 / ext4 with hashed di

Separating design from code

2011-03-22 Thread Νικόλαος Κούρας
Hello, in this page http://www.superhost.gr/hosting.html at the bottom end i decided to create a textarea for the user to enter some comments related to the page that i want to submit to a mysql database table. Now i have seperated the design from the code: http://www.superhost.gr/hosting.html is

argparse and filetypes

2011-03-22 Thread Bradley Hintze
Hi, I just started with argparse. I want to simply check the extension of the file that the user passes to the program. I get a ''file' object has no attribute 'rfind'' error when I use os.path.splitext(args.infile). Here is my code. import argparse, sys, os des = 'Get restraint definitions fro

Re: Decorator Syntax

2011-03-22 Thread Rafe Kettler
On Mar 21, 8:59 pm, Mike Patterson wrote: > In my Python class the other day, the professor was going over > decorators and he briefly mentioned that there had been this huge > debate about the syntax and using the @ sign to signify decorators. > > I read about the alternative forms proposed here

Re: Free Software University - Python Certificate

2011-03-22 Thread Giovani
> I don't know whether this site is useful or not. > > Assuming this site is serious: > If you are already subscribed you might be able to give some feedback. > > One can't even see the list of courses without regsitering. > This is very unprofessional and might indicate, that they just want to > r

Re: Proxy authentication required

2011-03-22 Thread gervaz
On 22 Mar, 09:34, gervaz wrote: > On 22 Mar, 00:02, Chris Rebert wrote: > > > > > > > On Mon, Mar 21, 2011 at 2:38 AM, gervaz wrote: > > > Hi all, > > > I've got to download some web pages but I'm behind a proxy. So far > > > this is what I've used without any successful result receiving the > >

Re: Decorator Syntax

2011-03-22 Thread Laurent Claessens
And I'm willing to bet that there are plenty of scripts out there that use "dec" as a name for Decimal objects. You won. I owe you a beer ;) Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: Free Software University - Python Certificate

2011-03-22 Thread News123
Hi Juan, On 03/22/2011 04:54 AM, Giovani wrote: > Hi all, my name is Juan and I suscribed to this website called "Free > Software University", opened recently. One of the goals of this > website is making some free high quality courses, one of them about > Python. > > I want to say this message

Re: Proxy authentication required

2011-03-22 Thread gervaz
On 22 Mar, 00:02, Chris Rebert wrote: > On Mon, Mar 21, 2011 at 2:38 AM, gervaz wrote: > > Hi all, > > I've got to download some web pages but I'm behind a proxy. So far > > this is what I've used without any successful result receiving the > > error: "urllib.error.HTTPError: HTTP Error 407: Prox