Re: Absolute beginner

2009-12-30 Thread Krister Svanlund
In Python 3 the syntax for print has changed to print() so just put braces around the string and you'r good to go! On Wed, Dec 30, 2009 at 12:48 PM, wrote: > Hi there, > I installed python 3.1 on Windows Vista PC. > Am an absolute beginner with Python. > This is my problem : > > In Idle : > > Py

Re: Is python not good enough?

2010-01-12 Thread Krister Svanlund
Every language has it uses and Google obviously thought that it would take more resources to get Python to the level they need it than to start using Go. Python is great for alot of things but it's not perfect for anything. On Tue, Jan 12, 2010 at 4:09 PM, ikuta liu wrote: > I'm a little confuse

Re: Default path for files

2010-01-24 Thread Krister Svanlund
On Sun, Jan 24, 2010 at 4:08 PM, Rotwang wrote: > Hi all, can anybody tell me whether there's a way to change the default > location for files to be opened by open()? I'd like to be able to create > files somewhere other than my Python folder without having to write the full > path in the filename

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:07 PM, evilweasel wrote: > Hi folks, > > I am a newbie to python, and I would be grateful if someone could > point out the mistake in my program. Basically, I have a huge text > file similar to the format below: > > AGACTCGAGTGCGCGGA   0 > AGATAAGCTAATTAAGCTACTGG

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund wrote: > On Thu, Jan 28, 2010 at 4:07 PM, evilweasel > wrote: >> Hi folks, >> >> I am a newbie to python, and I would be grateful if someone could >> point out the mistake in my program. Basically, I have a huge text

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:31 PM, Krister Svanlund wrote: > On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund > wrote: >> On Thu, Jan 28, 2010 at 4:07 PM, evilweasel >> wrote: >>> Hi folks, >>> >>> I am a newbie to python, and I would be grateful if

Re: list comprehension problem

2009-11-02 Thread Krister Svanlund
On Mon, Nov 2, 2009 at 10:11 PM, Aahz wrote: > In article > <7589e0a1-98b2-4df4-bc76-5d4c10194...@f20g2000prn.googlegroups.com>, > Falcolas   wrote: >> >>I'd also recommend trying the following filter, since it is identical >>to what you're trying to do, and will probably catch some additional >>

Re: Function attributes

2010-02-10 Thread Krister Svanlund
On Wed, Feb 10, 2010 at 2:59 PM, Muhammad Alkarouri wrote: > Hi everyone, > > What is the simplest way to access the attributes of a function from > inside it, other than using its explicit name? > In a function like f below: > > def f(*args): >    f.args = args >    print args > > is there any ot

Re: Executing Python code on another computer

2010-02-19 Thread Krister Svanlund
On Fri, Feb 19, 2010 at 4:52 PM, SiWi wrote: > Hello community, > I googled for an answer of the following problem, but I couldn't find > anything. > I've got a netbook and my fast workstation compter, which I usually > use for developing. > But I'd also like to take my netbook around the house an

Re: Question about getmtime

2010-02-19 Thread Krister Svanlund
On Fri, Feb 19, 2010 at 5:05 PM, Brandon wrote: > Hi everyone, > > Does copying or moving a file affect the return value of > os.path.getmtime(path)? > > Thank you, > Brandon Wouldn't it be easier to make a script and see for yourself then to write a mail about it? -- http://mail.python.org/mail

Re: if not global -- then what?

2010-02-20 Thread Krister Svanlund
On Sat, Feb 20, 2010 at 8:25 PM, egasimus wrote: > Hi, newbie here. I've read on using the 'global' keyword being > discouraged; then what is the preferred way to have something, for > example a class containing program settings, accessible from > everywhere, in a program spanning multiple files?

Re: Is there a way to continue after an exception ?

2010-02-20 Thread Krister Svanlund
On Sun, Feb 21, 2010 at 12:52 AM, Stef Mientki wrote: > hello, > > I would like my program to continue on the next line after an uncaught > exception, > is that possible ? > > thanks > Stef Mientki > Yes, you catch the exception and do nothing. -- http://mail.python.org/mailman/listinfo/python-l

Re: What's Going on between Python and win7?

2010-02-22 Thread Krister Svanlund
On Mon, Feb 22, 2010 at 4:22 PM, W. eWatson wrote: > Last night I copied a program from folder A to folder B. It inspects the > contents of files in a folder. When I ran it in B, it gave the results for > A! Out of frustration I changed the name in A, and fired up the program in > B. Win7 went int

Re: When will Python go mainstream like Java?

2010-02-22 Thread Krister Svanlund
On Mon, Feb 22, 2010 at 10:56 PM, AON LAZIO wrote: > That will be superb > > -- > Passion is my style And when will be as famous as the beatles? -- http://mail.python.org/mailman/listinfo/python-list

Re: When will Python go mainstream like Java?

2010-02-23 Thread Krister Svanlund
On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk wrote: > You mean it's not? > > -- >        -Ed Falk, f...@despams.r.us.com >        http://thespamdiaries.blogspot.com/ Javas popularity was very much a product of its time. It was something new and exciting and people got a bit too excited maybe,

Re: [python3]

2010-03-19 Thread Krister Svanlund
On Fri, Mar 19, 2010 at 6:42 PM, Kevin Adams wrote: > Greetings! > > Please forgive me if im posting this to the wrong group. > > I'm new to Python, learning Python3 from the O'rielly "Learning > Python" book.  Reading > about operator overloading, specifically __getitem__.   I put together > a sm

Problem with sys.path when embedding Python3 in C

2010-03-22 Thread Krister Svanlund
Hi, I've recently begun experimenting with embedding python and i got a small problem. This is my current testing code (basically all from python docs): > int main(int argc, char *argv[]) > > { > > PyObject *pModuleName, *pTestModule, *pTestFunc, *pTestResult, *pTestArgs; > > PyImport_AppendInitta

Re: Problem with sys.path when embedding Python3 in C

2010-03-23 Thread Krister Svanlund
On Tue, Mar 23, 2010 at 8:07 AM, Gabriel Genellina wrote: > En Mon, 22 Mar 2010 18:19:49 -0300, Krister Svanlund > escribió: > >> Hi, I've recently begun experimenting with embedding python and i got >> a small problem. >> >> The following line here is the

Re: OT: Meaning of "monkey"

2010-03-29 Thread Krister Svanlund
On Mon, Mar 29, 2010 at 3:09 PM, djc wrote: > Mensanator wrote: >> On Mar 26, 2:44 pm, Phlip wrote: >>> On Mar 26, 6:14 am, Luis M. González wrote: >>> Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc.

Re: How to run python without python

2010-04-01 Thread Krister Svanlund
On Fri, Apr 2, 2010 at 1:36 AM, Spencer wrote: > Is there a way to developing a script on linux and give it > to someone on microsoft, so that they could run it on microsoft > without installing python? > > Wayne > > -- > http://mail.python.org/mailman/listinfo/python-list > Short answer: No. --

Re: HTMLWindow or HtmlWindow or perhaps HTMLwindo

2010-11-15 Thread Krister Svanlund
""" CapitalizedWords (or CapWords, or CamelCase -- so named because of the bumpy look of its letters[4]). This is also sometimes known as StudlyCaps. Note: When using abbreviations in CapWords, capitalize all the letters of the abbreviation. Thus HTTPServerError is better

Re: HTMLWindow or HtmlWindow or perhaps HTMLwindo

2010-11-15 Thread Krister Svanlund
On Mon, Nov 15, 2010 at 9:09 PM, Ben James wrote: > On 15/11/2010 19:53, Boštjan Mejak wrote: >> >> Hello, I am wondering which of the 3 class names are prefered by PEP-8? >> >> class HTMLWindow(...) >> >> class HtmlWindow(...) >> >> class HTMLwindow(...) >> >> >> Thank you for your answer in adva

Re: while True or while 1

2010-12-12 Thread Krister Svanlund
On Sun, Dec 12, 2010 at 3:14 PM, Max Countryman wrote: > I'm sure this has been brought up many times, but a quick Googling didn't > yield the decisive results I was hoping for, so I apologize if this has > already been addressed in great detail somewhere else. > > I am wondering what the ration

Re: Python Learning Environment

2010-04-17 Thread Krister Svanlund
On Sat, Apr 17, 2010 at 6:32 PM, Vijay Shanker Dubey wrote: > Hi, > My Linux box is ubuntu system. I want to create a development environment on > my system for python programing language. I got to see there are two > versions of python language > 1. python 2.5.6 > 2. python 3.1.2 > To find out wh

Re: Python Learning Environment

2010-04-17 Thread Krister Svanlund
On Sat, Apr 17, 2010 at 7:06 PM, Vijay Shanker Dubey wrote: > Yes you are right about symlink thing. > So what should I do for a clever developer environment? > Should I change that python link to python3 or python3.1? > > Regards, > Vijay Shanker Dubey > It all depends on what you want to do. I

Re: any modules having a function to partition a list by predicate provided?

2010-04-19 Thread Krister Svanlund
On Tue, Apr 20, 2010 at 3:40 AM, segunai wrote: > On 4월20일, 오전10시16분, Chris Rebert wrote: >> On Mon, Apr 19, 2010 at 6:00 PM, knifenomad wrote: >> > i know it's not very hard to get that solution. >> > just by implementing simple function like below. >> >> > def partition(target, predicate)

Re: Need help in python plug-in development

2010-04-28 Thread Krister Svanlund
On Wed, Apr 28, 2010 at 12:21 PM, Suraj Sakhare wrote: > Hi, I am new to python. I am using python 2.6. I have gone through the > basic python and now I am trying to develop some plugin for maya 2009 > through python. So, for that I would need helping hand. You would have to ask questions for tha

Re: Global variables for python applications

2010-05-16 Thread Krister Svanlund
On Sun, May 16, 2010 at 7:50 PM, AON LAZIO wrote: > Hi, >    How can I set up global variables for the entire python applications? > Like I can call and set this variables in any .py files. >    Think of it as a global variable in a single .py file but this is for the > entire application. >    Th

Re: creating addon system

2010-05-21 Thread Krister Svanlund
On Fri, May 21, 2010 at 5:50 PM, timo verbeek wrote: > What is the easiest way in python to create a addon system? > I found to easy ways: > * using a import system like this: >       for striper in stripers: >        if striper["enabled"]: >            exec("from strip import %s as _x"%striper["s

Re: Stackless Python and EVE Online

2010-08-31 Thread Krister Svanlund
On Tue, Aug 31, 2010 at 5:10 PM, Benjamin Kaplan wrote: > On Tuesday, August 31, 2010, Roman Sokolyuk wrote: >> Hi, >> >> I am new to Python and I wanted to understand something... >> The EVE Online Client is build using Stackless Python >> So when I install the client on my machine, how doe sit

Re: How to determine if a Python script is being run right after startup on Windows

2010-09-07 Thread Krister Svanlund
On Tue, Sep 7, 2010 at 11:43 AM, Dennis Verdonschot wrote: > Hi Ryan, > > Maybe I'm missing something, but wouldn't creating a shortcut and > putting that shortcut in your Start - Programs - Startup section of > the Windows menu not work for this program? Or if really needed you > can edit the sta

Re: 3D cube navigation

2010-09-10 Thread Krister Svanlund
On Fri, Sep 10, 2010 at 9:10 PM, sahilsk wrote: > hi, i need to make a 3d cube as a navigation menu.. each face having > separate  button .. or effect. > any idea,  how can i make one such 3D figures with functionality of > mouse events? In what environment, what toolkit, for what purpose? -- ht

Re: C++ vs. Python Was: Re: help!!!

2010-10-06 Thread Krister Svanlund
On Wed, Oct 6, 2010 at 12:16 PM, Hans-Peter Jansen wrote: > On Wednesday 06 October 2010, 06:28:51 Dennis Lee Bieber wrote: >> On Tue, 05 Oct 2010 23:54:00 -0400, >> >> declaimed the following in gmane.comp.python.general: >> > plz can u convert this cpp file into python i need that badly as soon

Re: How i can get data from an image

2010-10-26 Thread Krister Svanlund
You should check out OpenCV. On Tue, Oct 26, 2010 at 8:53 PM, Kechagias Apostolos wrote: > Hello there. > I ve been using python a lot lately for my school in order to make small > gui(wxpython) apps. > Today a teacher came up with an interesting project. > The idea is that he gives you a series

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Krister Svanlund
On Fri, Nov 5, 2010 at 2:43 PM, Matty Sarro wrote: > Hey Everyone, > Just curious - I'm working on a program which includes a calculation of a > circle, and I found myself trying to use pi*radius^2, and getting errors > that data types float and int are unsupported for "^". Now, I realized I was >