Re: [Tutor] Paython as a career

2009-03-17 Thread OkaMthembo
Luke, i think you gave a more balanced answer :)

On Tue, Mar 17, 2009 at 10:45 AM, Luke Paireepinart
wrote:

> You should not choose a specific programming language and start a career in
> it.  If you want a career in programming you need to learn a great deal
> about computer science (the theory).  One of the things you will learn in
> your studies is that programming languages are just the tools, and you
> leverage them to create great software.  Therefore you shouldn't need to
> "know" how used a programming language is - if you understand how
> programming works, you can choose a language to specialize in (for example,
> I use Python for all my personal projects because I feel like the language
> design is better than most others), but I am grounded enough in the theory
> that I am not tied to Python.  For example, I worked a 6-month internship
> where the main programming language was C#, and they used all Microsoft
> tools.  I'd never used C# or the tools, but within a week or two, I was able
> to familiarize myself with their codebase and start working on it at a
> fairly competent level.  Now it would take a while for me to become as
> productive in C# as I am in Python, just based on my ability to recall so
> much information about Python without having to look at reference material.
> If you're really asking us which language has the largest job market, Python
> is definitely not the answer to that question?  Can you find jobs in
> Python?  Sure, if you are determined and you look hard enough.  But as far
> as widespread use, I'd say C/C++, Java, and C# are still the reigning
> programming languages.  That's just my personal opinion and I didn't consult
> any statistical sources for that.
>
> What it all boils down to is this:  Programming is difficult.  If you like
> to spend your free time solving mathematical equations and doing logic
> problems, it might be for you.  If you like to spend your free time fixing
> up your car, or something, you'd probably do better to choose a different
> career.  I think you will not be very successful if you try to pick up a
> programming career on a whim, as a side income.  If you are not committed
> enough to either study it in school or learn it really well at a job, you
> will not be successful.  Especially if your boss is a programmer, it is very
> clear after only a short while at a job whether you are a competent
> programmer, and unless you find yourself in a very poorly run company, you
> won't be able to skirt by.  You'll have to know what you're doing.
>
> That having been said, for people of a certain mindset, programming is
> extremely enjoyable and a rewarding field to be in.  If you are interested
> in Python because you are interested in the things you can do with it,
> rather than being interested in it because it is a potential source of
> revenue, start playing around with it and learning it.  Do some projects.
> Ask us lots of questions.  And if you still like it after completing
> something substantial, then start thinking about it in terms of a career
> path.
>
> That's my 2 cents, of course you have no obligation to take my advice.  I
> hope it helps you one way or the other.
> Good luck.
> -Luke
>
> On Tue, Mar 17, 2009 at 1:37 AM, Hussain Ali <
> hussainali.hussain...@gmail.com> wrote:
>
>>  Dear all
>>
>> I want to start learning python but before going further I need answer to
>> my
>> questions so that my path can be clear to me. I shall be grateful for your
>> answers:
>>
>> 1) Where does python stand as compared to other programming languages?
>> 2) What is the future for python?
>> 3) Will it survive for long in this rapidly changing trends and new
>> languages?
>> 4) Should I start it to earn my bread and butter? I mean is that
>> beneficial for income.
>>
>>
>> Sincerely
>>
>> Hussain
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2009-03-17 Thread OkaMthembo
Doesn't backslash also escape the newline? Thought i saw something to that
effect in the tutorial.

Lloyd

On Tue, Mar 17, 2009 at 4:33 PM, Daniele  wrote:

> > From: dukelx2...@gmail.com
> > To: tutor@python.org
> > Honestly I'm doing tutorials, I'm not in school.  I am trying to learn it
> for my own sake.
> > I got the *'s to come up but they are not forming the way I would like it
> to.  So that why I was asking for help.
>
> I suppose the trick here is to add a comma at the end of the print
> statement, to let the next one continue printing on the same line.
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] combining Python 2.x and Python 3

2009-03-17 Thread OkaMthembo
Apparently there's a tool to convert older Python code to Python 3
compatibility - is this what you want? Must be somewhere in the cheese shop
- sorry i cannot recall the name, or where exactly i saw the discussion.

Lloyd

On Tue, Mar 17, 2009 at 1:33 PM, Andre Engels  wrote:

> I have an open source project I have done some work on, which is
> programmed in Python 2.3-2.6. I would like to change it so that it can
> be run under both Python 3 and Python 2.x. Two questions for that:
> * is there a place where I can find an overview of what to do to make
> such a change?
> * is there a way to check, on one computer, the code under both
> versions (I am using Windows Vista, in case it matters)?
>
> --
> André Engels, andreeng...@gmail.com
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] PHP as seen by a Python lover

2009-04-11 Thread OkaMthembo
Hi All,

I just tried setting up PHP on my machine,with Apache 2.2-something (Win.
XP).

I came back running.

It's a SCHLEP.

I love Python.

Happy Easter to you all - and to those that do not celebrate it, have a
great weekend!

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] python books

2009-04-26 Thread OkaMthembo
I'd recommend Core Python Programming by Wesley Chun..

On Sat, Apr 25, 2009 at 9:45 PM, Dayo Adewunmi wrote:

> chinmaya wrote:
>
>>
>>
>> On Mon, Apr 13, 2009 at 11:07 PM, sudhanshu gautam <
>> sudhanshu9...@gmail.com > wrote:
>>
>>I am new in python , so need a good books , previously read python
>>Bible and swaroop but not satisfied .
>>
>>
>>so tell me good books in pdf format those contents good problems also
>>
>>
>>___
>>Tutor maillist  -  Tutor@python.org 
>>http://mail.python.org/mailman/listinfo/tutor
>>
>>
>>
>>
>> I would say start with python tutorial, its nice decent starting material.
>> There is no better way to learn language than to practice it as you read.
>> Most of the tutorials out there are not written for 3.0, so you may want
>> to install 2.6.
>> I also recommend Dive Into python, its very beginner friendly, but
>> remember
>> it does not cover all (not all major) libraries never-the-less its one of
>> the
>> best beginner tutorial.
>>
>> Also install ipython its very powerful. And once you learn the interface
>> its very easy to find documentation and library references.
>>
>> Also you can look at 100s of python videos in showmedo.com <
>> http://showmedo.com>
>>
>>
>> --
>> chinmaya sn
>> 
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
> I'm currently reading Think Python
> http://www.greenteapress.com/thinkpython/thinkpython.html
>
> Regards
>
> Dayo
> ---
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Find a good linux distribution with python.

2009-05-25 Thread OkaMthembo
bhaaluu, your comments on Ubuntu are not only offensive, but display
ignorance and arrogance all at the same time.
Ubuntu is based on Debian, but provides a lower entry barrier to Linux for
many.

Not everybody wants to spend much time doing configurations. Many just want
a system that works.

Michael, to answer your question - Ubuntu is just fine!

Regards,
Lloyd



On Sun, May 24, 2009 at 11:11 PM, bhaaluu  wrote:

> On Sun, May 24, 2009 at 4:02 PM, Michael Bernhard Arp Sørensen
>  wrote:
> >
> > What distro do you run?
> >
>
> Debian GNU/Linux
>
> >
> > Another point: There's so many modules on the Internet, that it's
> difficult
> > to get some sort of overview. That's why a distro is such a great idea
> > because so many packages with python stuff is included. Could you get any
> > kind of overview over python modules/libs other than a repo in a distro?
> >
>
> Like anything else that is huge, just tackle the parts of it that you need.
>
> >
> > I have concluded that there's no such thing as a perfect distro. Only
> some
> > distros come close to perfection. In that case I was wondering if I
> should
> > create my own python repo to set up a good working environment for
> > development. That way I could use any distro. On the other hand, any code
> I
> > migth write would be difficult for others to use.
> >
> > Any ideas or comments?
> >
>
> "Ubuntu" is an African word that means "I can't configure Debian."
> 8^D
> Knoppix, Ubuntu, and several other distributions are all based on
> the fine work that the Debian GNU/Linux community does. Debian
> GNU/Linux is completely Free, and is developed by volunteers from
> around the world.
>
> >
> > I use emacs with rope, ipython and python. I like those in newer versions
> if
> > not bleeding edge.
> >
>
> If you're really serious about having the 'perfect' distro, you can start
> with Debian GNU/Linux and make your own, the way you want it to be.
> While it is not a trivial matter to re-master a Linux Live CD, it is much
> easier than it used to be! You could pack it full of Python! It is this
> reason that there are hundreds of Linux Live CD distributions. Each
> person thinks that their distro is the best. This is one reason why
> GNU/Linux is so fantastic!
>
> > Med venlig hilsen/Kind regards
> >
> > Michael B. Arp Sørensen
> > Programmer / BOFH
> > Denmark
> >
> > "If you want to enter my network while I'm out, you can find my SSH-key
> > under my mouse mat" - Michael Bernhard Arp Sørensen
> >
>
> Why don't you make a Python-centric Linux Live CD?
> --
> b h a a l u u at g m a i l dot c o m
> Kid on Bus: What are you gonna do today, Napoleon?
> Napoleon Dynamite: Whatever I feel like I wanna do. Gosh!
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Best Python Editor

2009-06-15 Thread OkaMthembo
I second Tom Green, when i started off with Python i mainly used Pyscripter
on Windows and its excellent.

On Sat, Jun 13, 2009 at 1:48 PM, Tom Green  wrote:

> For Windows check out PyScripter.  Its IDE is similar to Borland Delphi and
> I find it very easy to use.  Whatever works for you would be "best" for
> you.  PyScripter is FREE and I would highly recommend it for people who are
> new to Python or people with programming experience that are used to
> programming in a IDE.
>
> Regards,
> T. Green
>
>
>
> On Sat, Jun 13, 2009 at 6:52 AM, Dave Angel  wrote:
>
>> Eddie  wrote:
>>
>>  Hi guys,
>>>
>>> What would you regard as the best free Python editor to use on Windows
>>> for a new guy? Searching Google i see that there is quite a few out
>>> there and is "VIM" the best one to go with?
>>>
>>> Regards
>>> Eddie
>>>
>>>
>>>
>> This is such a common question on the python forums it ought to be in a
>> FAQ, and maybe it is.
>>
>> VI and EMACS are the two "standard" Unix editors, going back decades.
>>  Somebody used to the flexibility of either of those two, who is now stuck
>> on Windows, would naturally not want to give up any of the "customizability"
>> of these.  And people have posted macros for each to automate some of the
>> things you'd like for Python, such as auto-indent.  VIM is an editor in that
>> heritage.
>>
>> Somebody who's used Windows for 20 years, however, might expect that
>> Ctrl-S, Ctrl-F4, Alt-F4, etc. have standard meanings.  So they might be more
>> comfortable in an editor that starts with the Windows interface, and builds
>> on it.   I use metapad for many things, though not for Python.  Others use
>> Notepad++.
>>
>> Next question is whether you want an IDE.  The ability to single-step in
>> the debugger, locate and fix a problem in source, and start again, in a
>> single environment is appealing.  When I have a stack trace showing in the
>> debugger, I can use the debugger to locate the source at any level of that
>> stack without having to explicitly load the file and jump to the specified
>> line number.  And no risk that the same file is already loaded into some
>> other editor and I'm going to lose changes if some are made one place and
>> some another.  And of course, it's nice to have a locals window, a globals
>> window, a watch window, ...
>>
>> People that do not like an IDE cite the advantage of using a single editor
>> for several programming languages, for word processing, and for web design.
>>  If such an editor is highly programmable, that would seem very good as
>> well.
>>
>> So then it comes down to opinion.  I use the (not-free) Komodo IDE.  There
>> is a free Komodo-Edit with most of the same features, but I really don't
>> know what subset it includes.  It is programmable with many canned add-ins,
>> or you can customize it yourself with recorded macros and with scripts in
>> Python or (I think) Javascript.  Its addin technology is related somehow to
>> Firefox, and I think it used a lot of the Mozilla code in its engine.  The
>> default UI is very familiar to people with Windows experience, though I
>> don't know how it works on Mac and Linux
>>
>> http://www.activestate.com/komodo/Komodo IDE
>> http://www.activestate.com/komodo_edit/   opensource Komodo Edit
>> http://www.activestate.com/komodo_edit/comparison/comparison between
>> the two
>>
>>
>>
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Currency conversion module in python

2009-07-30 Thread OkaMthembo
Hi Amit, this might be what you want..hopefully with a dollop of humor :)

http://lmgtfy.com/?q=currency+conversion+module+in+python&l=1

Cheers

On Thu, Jul 30, 2009 at 12:45 AM, Amit Sethi wrote:

> Hi , Does anybody know of any currency conversion module in python
>
> --
> A-M-I-T S|S
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] What language should I learn after Python?

2009-10-07 Thread OkaMthembo
Hi everyone,

I've watched this discussion grow with great interest, as not too long ago i
was asking myself the OP's question. I started with C#.NET when i got into
programming, then moved to Java. This is all at work. I taught myself
Python, and will soon be tackling C as well as i can use that to write
Python and Ruby extensions and target Apple devices.

Overall i've chosen to use Python as a general purpose language, C, Java for
mobile development (also a good skill to have as it is in demand) and Ruby
for web dev.

I think it's good to choose a handfull of skills and pursue them
systematically, rather than dabbling in everything and mastering nothing.
Have a brace of languages that cover your bases.

On Wed, Oct 7, 2009 at 3:50 PM, Alan Gauld wrote:

> "Serdar Tumgoren"  wrote
>
>  Programming Paradigms for Dummies, by Peter Norvig
>> http://lambda-the-ultimate.org/node/3465
>>
>
> Thanks for posting the link. I hadn't seen it before but it made
> interesting reading. Although maybe digging a tad deeper than the OP had in
> mind!
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Stolen thread: Bottom folk vs. toppers was trouble using2to3.py

2009-11-05 Thread OkaMthembo
I'm afraid you guys are witty! Good on you. Rob, you're right - and Alan,
you're right too. BRA-VO.

On Wed, Nov 4, 2009 at 12:19 AM, Alan Gauld wrote:

> "Robert Berman"  wrote
>
>  The war between bottom posters and top posters has been long, arduous,
>> and most often incredibly silly.
>>
>
> It has, I agree but there is a very real difference in that gratuitous top
> posting does actually become unreadable if not done very carefully.
> And it also encorages people to leave the whole previous thread in
> place which is very naughty for those who pay for ther internet
> access by the byte! (Or those whose mail server implements
> space quotas!)
>
> But if a general comment is being made that does not need to refer
> to specific quotations from the earlier rtext then I have no problem
> with top posting. Provided all but a small context quote is left below.
> But please don't send me 3 pages of text to just add two sentences
> at the top!!!
>
>
>  I simply propose that the only requirement to communications here is
>> that replies and questions be well formulated, courteous, and reasonably
>> intelligent.
>>
>
> Ah but there's the rub, what is "well formatted"? :-)
>
>
>  If there are going to be arguments pertaining to the posts, let them be
>> over content and not placement.
>>
>
> When you are trying to respond to hundreds of emails a day a
> few top posted messages can cause severe headaches. Personally I
> just ignore anything that has top posting that is hard to read, I don't
> have
> time to unscramble it nor to waste time asking the poster to desist.
> If they post scrambled mail it doesn't get answered...
>
> So its not quite a case of the "color of the bikeshed" because this one
> does make a very real difference to the usability of the medium and
> to the success of the message in reaching its full audience.
>
> In most cases it doesn't hurt much but in longer threads it does.
> So, please folks, be sensitive to your readers.
>
> Alan G.
>
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] TimeOut in

2009-11-11 Thread OkaMthembo
Hi Somnath,

I think the exception simply means that the thread object or class does not
have a cancel function. maybe read docs on Python threads to see what
functions can be called on those?

On Sun, Nov 8, 2009 at 9:09 PM, somnath chakrabarti <
chakrabarti.somn...@gmail.com> wrote:

> Hi Alan,
>
> I am importing the constraint library package in the beginning that is
> having classes Problem, Solver and all the methods that I am calling. Now,
> as you said after making the change from
>
> self.p = threading.Timer(100, self.onTimeout)
>
> I am getting the below error. I am also attaching the constraint.py
> package that my code is using
>
> - Somnath
>
>
> %%% Error Message 
>
> 
> Magic Square:
>
> Exception in thread Thread-1:
> Traceback (most recent call last):
>   File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
> self.run()
>   File "C:\Python26\lib\threading.py", line 477, in run
> self.__target(*self.__args, **self.__kwargs)
>   File "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\ms_t.py",
> line 43, in getSolution
>
> self.solution=Problem.getSolution(self)
>   File
> "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\constraint.py", line
> 215, in getSolution
> return self._solver.getSolution(domains, constraints, vconstraints)
>   File
> "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\constraint.py", line
> 524, in getSolution
> return iter.next()
>   File
> "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\constraint.py", line
> 506, in getSolutionIter
> pushdomains):
>   File
> "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\constraint.py", line
> 1173, in __call__
> domain.hideValue(value)
>   File
> "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\constraint.py", line
> 787, in hideValue
> list.remove(self, value)
> ValueError: list.remove(x): x not in list
> None
> Time taken: 0.047
>
> Traceback (most recent call last):
>   File "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\csc671.py",
> line 125, in 
> ms_t.magic_square(size,func_solver())
>   File "C:\Users\Somnath\Documents\NetBeansProjects\CSC671\src\ms_t.py",
> line 68, in magic_square
> t.cancel()
> AttributeError: 'Thread' object has no attribute 'cancel'
> None
> Time Exceeded Limit.
>
>
> On Sun, Nov 8, 2009 at 12:17 PM, Alan Gauld wrote:
>
>>
>> "somnath chakrabarti"  wrote
>>
>>
>> Below is the code that I have written to do the timeout implementation.
>>> But
>>> I am getting error as follows. Can anybody please help me where I am
>>> going
>>> wrong?
>>>
>>
>> I have no idea how this framework is upposed to work but my
>> guess is that the problem lies here:
>>
>>
>>   def getSolution(self,solver):
>>>   Problem.setSolver(self,solver)
>>>   self.p = threading.Timer(100, self.onTimeout())
>>>
>>
>> Thios looks like you should be providing a callback
>> function self.onTimeout but you are calling the function
>> instead of referencing it. This calls the method before
>> self.p has been defined.
>>
>> You need to remove the parentheses after Timeout.
>>
>> I think...
>>
>> --
>> Alan Gauld
>> Author of the Learn to Program web site
>> http://www.alan-g.me.uk/
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
>
> --
> Thanks and regards,
> Somnath Chakrabarti.
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Writing code while tired, counterproductive?

2009-11-15 Thread OkaMthembo
>From first-hand experience, i would concur :)

A refreshed mind will perform much better than an over-exerted one.

On Sat, Nov 14, 2009 at 8:57 PM, Alan Gauld wrote:

>
> "Modulok"  wrote
>
>  Does anyone else find, writing code while tired to be counterproductive?
>>
>
> Yes. Doing anything that is mentally taxing is usually a bad idea when
> tired!
>
> Alan G
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] I love python / you guys :)

2009-11-16 Thread OkaMthembo
Stefan, you echoed my thinking too :)

On Mon, Nov 16, 2009 at 8:58 AM, Stefan Lesicnik  wrote:

> hi,
>
> Although not a question, i just want to tell you guys how awesome you are!
>
> I am not a programmer, i can do a bit of bash. I have never officially
> learnt programming, but numerous times looked at some perl, c, java
> and never really gotten past the beginning stages of it. That all
> changed when i picked up python. Although my style and use of python
> is probably barbaric at best, I really enjoy it when you can make
> things work. Python was just amazing from a readability / logical
> point of view. If i can think of something, there is a way to do it in
> python. After learning the simple data structures it seems i can
> really do anything i want to.
>
> I really appreciate all the effort the knowledgeable guys put into
> this list (you know who you are! you post answers all the time!). I've
> asked a couple of questions and the answers have always been excellent
> and i've learnt so much.
>
> So i guess i just wanted to say thanks for supporting a great
> language, and helping me as i learn to shape my thinking into better
> and better ways to do things.
>
> stefan
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2009-11-23 Thread OkaMthembo
Hi Mark,

When i started off i had pretty much the same questions. I think you need to
start with the Python tutorial as it will show you the basics (from the
Python shell and how to write and run Python files, to language syntax +
keywords and how to define and use functions, classes, modules etc). From
there you could approach any good tutorial to reiterate on that as you will
have a good basic grasp.


On Sat, Nov 21, 2009 at 3:20 AM, Alan Gauld wrote:

>
> "mark guinder"  wrote
>
>> ok, all i know is that i have python installed on my computer(mac),  and i
>> know how to open up "IDLE", how do i write my first program,  what do i use
>> , how do i open that, and how to i save it as a prograam?
>>
>
> That's slightly more than I assume for beginners in my tutorial...
> So you  could try that.
>
> Or any of the other non-programmers tutorials linked on the python web site
>
> http://www.python.org
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] quick question

2009-11-26 Thread OkaMthembo
Hi Travis,

Welcome to the python mailing list. You have come to the right place for
support and advice pertaining to python; it is what this list is about.


On Thu, Nov 26, 2009 at 12:49 PM, Travis Murphy  wrote:

>  i am a first year student taking a python developers course. i wanted to
> know if from time to time in the future, is there somebody there i can speak
> to for support?
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] quick question

2009-11-26 Thread OkaMthembo
By the way, when asking a question or answering, you only ever need to send
the message to tutor@python.org :)

On Thu, Nov 26, 2009 at 3:29 PM, OkaMthembo  wrote:

> Hi Travis,
>
> Welcome to the python mailing list. You have come to the right place for
> support and advice pertaining to python; it is what this list is about.
>
>
> On Thu, Nov 26, 2009 at 12:49 PM, Travis Murphy  wrote:
>
>>  i am a first year student taking a python developers course. i wanted to
>> know if from time to time in the future, is there somebody there i can speak
>> to for support?
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>
>
> --
> Regards,
> Lloyd
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
Hi All,

Is there a python implementation that takes advantage of all cores on modern
multicore machines?

-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
Sorry to double -post, Lie. Didn;t "Reply to all"..

Thats interesting - is Unladen Swallow production-ready? I've been over the
site briefly, but i can't decide whether it's still in incubation or not.

On Fri, Nov 27, 2009 at 3:04 PM, Lie Ryan  wrote:

> On 11/27/2009 8:57 PM, OkaMthembo wrote:
>
>> Hi All,
>>
>> Is there a python implementation that takes advantage of all cores on
>> modern multicore machines?
>>
>
> yes, Cpython if you used "multiprocessing". Ironpython and Jython doesn't
> have GIL. Unladen Swallow plans to remove GIL.
>
> Many minor python branch have been attempted to remove GIL, just as many
> are rejected for merging back to the main trunk since they slow down single
> threading. You might be able to find these patches from the internet and
> download the appropriate python source, patch them, and get python minus
> GIL.
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
Thanks, i must admit the concept of the GIL is cloudy to me - for example,
if the python interpreter on a single machine is
handling one process and locks until it is done, then on to the next one,
and so on - isn't that what causes speed issues?
I was wondering why python can't implicitly handle multiple processes at
once by using all machine cores (have many threads, each
invoking the interpreter and handling a process).

Maybe i should get up to speed on threads first to get the bigger picture?


On Fri, Nov 27, 2009 at 3:38 PM, Kent Johnson  wrote:

> On Fri, Nov 27, 2009 at 4:57 AM, OkaMthembo  wrote:
> > Hi All,
> >
> > Is there a python implementation that takes advantage of all cores on
> modern
> > multicore machines?
>
> Presumably you mean something like, "Is there a python implementation
> that can run multiple compute-bound processes on multiple cores
> concurrently."
>
> Some options:
> - the multiprocessing module in the std lib - here is an example of
> using it with numpy:
> http://folk.uio.no/sturlamo/python/multiprocessing-tutorial.pdf
>
> - Jython and IronPython both have threading models that allow multiple
> threads to run concurrently on multiple processors.
>
> Kent
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
Thanks everyone,

I realise that my question is vague on a few fronts. To try and clarify,
supposing i had a box running a
Python web app on it, and the web server handles say, 10 concurrent
requests. Now i've read that only one
instance of the  Python interpreter can run on a single machine. Can that
interpreter be invoked by the web server
to run several requests at once, or do the requests get queued and handled
one at a time? If the interpreter cannot
handle concurrent requests by the web server, is it because of the GIL? I am
thinking that on multi-core machines
the interpreter should be able to run different processes on each core, thus
being able to serve more requests?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
Thanks Kent, that did clear some of the smog.

>At least make sure you understand the difference between threads and
processes.

Will be taking that advice. I think it's the reason i struggle to ask the
question better.

On Fri, Nov 27, 2009 at 5:12 PM, Kent Johnson  wrote:

> On Fri, Nov 27, 2009 at 8:57 AM, OkaMthembo  wrote:
> > Thanks, i must admit the concept of the GIL is cloudy to me - for
> example,
> > if the python interpreter on a single machine is
> > handling one process and locks until it is done, then on to the next one,
> > and so on - isn't that what causes speed issues?
>
> A single interpreter runs in a single process. Within that process,
> only one thread can be interpreting Python byte codes at one time. If
> a thread is blocked, for example waiting for I/O, another thread can
> run. Some C extensions release the GIL so other threads can run
> concurrently.
>
> > I was wondering why python can't implicitly handle multiple processes at
> > once by using all machine cores (have many threads, each
> > invoking the interpreter and handling a process).
>
> Because explicit is better than implicit?
>
> The multiprocessing module allows you to control multiple processes
> from Python and do pretty much what you describe above - a Python main
> program can create multiple processes, each running a separate
> interpreter, all working on a single problem.
>
> > Maybe i should get up to speed on threads first to get the bigger
> picture?
>
> At least make sure you understand the difference between threads and
> processes.
>
> Kent
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python on multicore machines

2009-11-27 Thread OkaMthembo
> That's likely the source of your confusion then. You can run any number of
> Python interpreters on a single machine (limited by system resources like
> RAM, obviously), and in fact, many web servers will do that for you to
> handle multiple requests in parallel.

Thanks Stefan, i was  not aware of the fact.

On Fri, Nov 27, 2009 at 5:42 PM, Stefan Behnel  wrote:

> OkaMthembo, 27.11.2009 16:15:
> > i've read that only one
> > instance of the  Python interpreter can run on a single machine.
>
> That's likely the source of your confusion then. You can run any number of
> Python interpreters on a single machine (limited by system resources like
> RAM, obviously), and in fact, many web servers will do that for you to
> handle multiple requests in parallel.
>
> Stefan
>
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Regards,
Lloyd
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python fast enough for ad server?

2007-05-09 Thread OkaMthembo

Hi guys,

I need to write an ad-serving application and i'm using Win XP as my dev
platform. Naturally, i want it to be as painless as possible and i was
thinking of writing it 100% in Python. However, i have not written any big
apps in the language and i wonder if Python would have the performance or
scale fast enough to a large user base. I also reluctantly think of using
Python and Java, but Jython only supports Python 2.2 at the moment (same as
my other option, Boost) and i'm using Python 2.5. what does everyone think?

Best Regards,

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python fast enough for ad server?

2007-05-10 Thread OkaMthembo

Thanks for all your contributions. i think i will do it all in Python, it
seems to me that the advantages far outweigh any negatives.

Maybe once its a working project, we can then benchmark the code and see
what gives.

Thanks again,

Lloyd

On 5/9/07, Eric Walstad <[EMAIL PROTECTED]> wrote:


Hey OkaMthenbo,

OkaMthembo wrote:
> Hi guys,
>
> I need to write an ad-serving application and i'm using Win XP as my dev
> platform. Naturally, i want it to be as painless as possible and i was
> thinking of writing it 100% in Python. However, i have not written any
> big apps in the language and i wonder if Python would have the
> performance or scale fast enough to a large user base.
Most certainly for some definitions of 'large'  :)

Most web apps these days are not written in a single language/technology
and are often not running on a single piece of hardware.  If you search
the archives of your favorite Python web application framework I'm
pretty sure you'll find a discussion on how to scale your app to handle
a 'large' user base.  At the risk of oversimplification, but in hopes of
avoiding premature optimization, I'd focus first on achieving working
code, then benchmark it, then optimize if optimization is still needed.

Many others have achieved high volume Python web apps using a mix of all
the wonderful open source tools available.  If your content doesn't
change quickly and the ratio of GETs/POSTs is high, a caching server in
front of your python app might be just the trick (memcached, squid,etc).
But don't waste your time if you don't need to.  Define 'too slow' and
then prove to yourself that your app passes that threshold.  If so, then
figure out why it's slow and optimize the slow parts.

Good luck,

Eric.





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python fast enough for ad server?

2007-05-11 Thread OkaMthembo

Hi guys,

I stumbled upon a tool called Psyco (http://psyco.sourceforge.net/) sounds
like what i need.

Thanks again,

Lloyd

On 5/10/07, OkaMthembo <[EMAIL PROTECTED]> wrote:


Thanks for all your contributions. i think i will do it all in Python, it
seems to me that the advantages far outweigh any negatives.

Maybe once its a working project, we can then benchmark the code and see
what gives.

Thanks again,

Lloyd

On 5/9/07, Eric Walstad <[EMAIL PROTECTED]> wrote:
>
> Hey OkaMthenbo,
>
> OkaMthembo wrote:
> > Hi guys,
> >
> > I need to write an ad-serving application and i'm using Win XP as my
> dev
> > platform. Naturally, i want it to be as painless as possible and i was
> > thinking of writing it 100% in Python. However, i have not written any
>
> > big apps in the language and i wonder if Python would have the
> > performance or scale fast enough to a large user base.
> Most certainly for some definitions of 'large'  :)
>
> Most web apps these days are not written in a single language/technology
>
> and are often not running on a single piece of hardware.  If you search
> the archives of your favorite Python web application framework I'm
> pretty sure you'll find a discussion on how to scale your app to handle
> a 'large' user base.  At the risk of oversimplification, but in hopes of
> avoiding premature optimization, I'd focus first on achieving working
> code, then benchmark it, then optimize if optimization is still needed.
>
> Many others have achieved high volume Python web apps using a mix of all
> the wonderful open source tools available.  If your content doesn't
> change quickly and the ratio of GETs/POSTs is high, a caching server in
> front of your python app might be just the trick (memcached, squid,etc).
> But don't waste your time if you don't need to.  Define 'too slow' and
> then prove to yourself that your app passes that threshold.  If so, then
>
> figure out why it's slow and optimize the slow parts.
>
> Good luck,
>
> Eric.
>



--
"The Stupidry Foundry"





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] ActivePython and CPython

2007-05-14 Thread OkaMthembo

Hi guys,

What are the difference between ActiveState's Python distributions and the
standard Python distribution from python.org, and which is better?
Also, what IDE will give a user the ability to view HTML designs of a web
application as well as the code view (like Dreamweaver does with PHP pages)?

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python and Clearsilver for Web Development

2007-06-21 Thread OkaMthembo

Hi All,

Would anyone have experience using Clearsilver with Python for web
development? i wish to find out
- how easy/ difficult it is to seperate presentation from logic,
- how fast such a setup would be compared to asp.net, jsp and php
- whether or not such a setup would work with Lighttpd.
I have access to the Clearsilver reading material but i wish to hear other
opinions.

The link is http://www.clearsilver.net

Best regards,

Sithembewena Lloyd Dube

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Large Scale Python websites

2007-08-07 Thread OkaMthembo
Hi all,

Is anyone aware of any large scale web apps developed in Python? Please let
me know of any that you know of...

Kind Regards,

-- 
Sithembewena Lloyd Dube

"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Large Scale Python websites

2007-08-08 Thread OkaMthembo
On 8/7/07, Mike Hansen <[EMAIL PROTECTED]> wrote:
>
> > >> Is anyone aware of any large scale web apps developed in Python?
> > >> Please let
> > >> me know of any that you know of...
>
> I think that reddit.com switched from LISP to Python a while back.
>
> Mike
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>


Interesting to hear these examples, especially YouTube. Apparently, Yelp.comand
Slide.com also use the beautiful language.

Thanks to everyone,


-- 
Sithembewena Lloyd Dube

"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] YouTube Python web framework

2008-01-14 Thread OkaMthembo
Dear Friends,

Does anybody know what Python web framework e.g. Webware or Web.py, etc
YouTube is built on/in?

Kind Regards,

-- 
Sithembewena Lloyd Dube

"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] YouTube Python web framework

2008-01-14 Thread OkaMthembo
Thanks Kent :)

On Jan 14, 2008 2:09 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> OkaMthembo wrote:
> > Dear Friends,
> >
> > Does anybody know what Python web framework e.g. Webware or Web.py, etc
> > YouTube is built on/in?
>
> There is a little info here, perhaps the referenced video has more
> details:
> http://highscalability.com/youtube-architecture
>
> Kent
>



-- 
Sithembewena Lloyd Dube

"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] web.py vs webwareforpython

2008-02-21 Thread OkaMthembo
Which is better for large scale apps? I know YouOS and reddit use web.py -
which big site successfully uses
webware?

 Thanks.

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] web.py vs webwareforpython

2008-02-21 Thread OkaMthembo
Thanks Kent. Well, i looked about and initially settled on webware - because
it seemed mature and is IMO well documented. Ive read Cheetah + webware docs
and it looked good. Then i heard of web.py on some reddit write-up.
Apparently really easy to use and lightweight. I found out YouOS uses it and
thought there must be a good reason.

I am just very curious as to which python web framework will ultimately be
the best to work with; and i dont want to waste time trying if some arent
worth the trouble.
On Thu, Feb 21, 2008 at 2:16 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:

> OkaMthembo wrote:
> > Which is better for large scale apps? I know YouOS and reddit use web.py
> > - which big site successfully uses
> > webware?
>
> A starting point:
> http://wiki.w4py.org/who-is-using-webware.html?
>
> Probably a better place to ask:
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>
> I'm curious - how did you settle on those two?
>
> Kent
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] web.py vs webwareforpython

2008-02-21 Thread OkaMthembo
Thanks, Alan.

Django was the first Python framework i ever considered. I had a perception
that it was biased towards the publishing industry - then again,
experiencewise im in no position to make the judgement.

Lloyd Dube
On Thu, Feb 21, 2008 at 6:34 PM, Alan Gauld <[EMAIL PROTECTED]>
wrote:

>
> "OkaMthembo" <[EMAIL PROTECTED]> wrote
>
> > I am just very curious as to which python web framework will
> > ultimately be
> > the best to work with; and i dont want to waste time trying if some
> > arent
> > worth the trouble.
>
> I think that may be why Kent asked his question, since neither
> webware nor web.py are the dominant Python web
> frameworks as far as I can tell.
>
> If I was a gambling man my money would currently be on
> Django, mainly because my personal favourite TurboGears
> seems to have had a strategic stumble and lost clarity somewhat.
>
> But there are so many web frameworks for Python that it's
> a very difficult question to answer. Fortunately almost all
> web frameworks work in similar underlying ways so moving
> from one to the other is not as difficult as moving betweeen
> GUI tookits, say.
>
> Alan G.
>
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] web.py vs webwareforpython

2008-02-25 Thread OkaMthembo
@Kent, that's some useful background info.

@Marc, i also thought about the issue of Python hosts not supporting
long-running processes. Do check with WebFaction though
http://www.webfaction.com - apparently one can get Python hosting that
allows installation of certain server modules e.g. mod_python, etc. I hope i
understood you correctly.

Lloyd Dube.


On Thu, Feb 21, 2008 at 9:28 PM, Marc Tompkins <[EMAIL PROTECTED]>
wrote:

> Sorry to jump in the middle here, but I have a somewhat related
> question...
>
> I have a few websites set up for my clients, mostly using Mambo/Joomla
> (PHP-based).  My clients tend to be small brick-and-mortar businesses
> (doctors, lawyers, etc.) who merely wish to use their website as an
> extension of their marketing effort, not as a storefront, and generally I
> set the thing up / perform updates, etc. and turn over the day-to-day
> running of the site (posting new articles/pictures/videos, running fora,
> sending newsletters) to a member of their staff.
>
> I'd love to switch to a Python-based solution for my future and ongoing
> projects, and Django looks very exciting to me, but...  honestly, Django
> won't run on most commodity-grade web hosts.  And I'm frankly sick of
> hearing the knee-jerk response "GoDaddy sucks!  1and1 sucks!" because, darn
> it, they work just fine with Joomla.  Django requires "long-running
> processes", which a cheap webhost obviously doesn't like...
>
> I don't really have anything against Joomla - it's worked well for me -
> but I do feel pretty silly raving about how great Python is, and then when
> the subject of web development comes up having to shuffle my feet and say
> "...ummm... well, there I use PHP.  But Python's really great!"
> I also don't have a love affair going with GoDaddy or 1and1, but they've
> both been very affordable and (especially GoDaddy) very easy to work with,
> which I can't say for a lot of other companies I've dealt with.  They've
> also both been around for a few years, and I'm confident that they still
> will be there in a few more.  These are all very important to me and my
> clients.
> I'd like - if possible - to use a relatively mature framework which I can
> then extend.  I'm happy starting from scratch and experimenting with my own
> personal hobby projects, but in this area I'd like the core functionality to
> "just work".
>
> So my question is: does anybody have a good Python-based CMS / template /
> whatever framework up and running on a commodity-priced, shared webhost?  If
> so, which one?  Which host?  Inquiring minds wanna know.
> --
> www.fsrtechnologies.com
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>


-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] python web dev

2007-01-04 Thread OkaMthembo

hi pythonistas!

this is my first post. please could you tell me which is the best
lightweight python web framework? also, which is the best templating
language for python? (which can handle other data formats in addition to
text). so far im lured by Cheetah, although i havent done any web dev with
python yet.

i absolutely love python syntax, but web dev in python is murky water. it
seems unneccesarily hard, even compared to php and asp.net

thanks,

Shortash
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] python web dev

2007-01-05 Thread OkaMthembo

Thanks Gents,

You do all make sense to me. My dilemma really, is that im from a .NET
background where i write business logic in C#  and write my own stored
procs, etc...with the "cosmetic" design fully seperated from it all. so i
think id feel more confortable with a framework thatd provide a basic MVC
architecture and leave me to roll my own SQL etc, not one that will generate
half a project for me. ive taken another look at Cheetah and i think i like
it the most thus far.

My other issue is: has anybody run a python web app under lighttpd? and if
so, where can i get the Windows lighttpd build? the link to
kevinworthington.com on the official site is dead, and ive not had a
response from the lighttpd webmaster.

happy coding...

Shortash



On 1/4/07, Simon Brunning <[EMAIL PROTECTED]> wrote:


On 1/4/07, OkaMthembo <[EMAIL PROTECTED]> wrote:
> this is my first post.

Welcome!

> please could you tell me which is the best
> lightweight python web framework?

Best? That's a potentially contensious one. But I can tell you that if
you were to look at either Django or TurboGears you wouldn't be going
too far wrong. (I use Django, but I know that both are good.)

> also, which is the best templating
> language for python? (which can handle other data formats in addition to
> text). so far im lured by Cheetah, although i havent done any web dev
with
> python yet.

Cheetah's good, but if you go with Django, it has its own which is
pretty good too. (I use both at times.)

--
Cheers,
Simon B
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/

___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] lighttpd for windows

2007-01-13 Thread OkaMthembo

hey folks!

Could someone please show me where to get lighttpd for windows xp sp2? ive
tried the lighttpd site but no success

thanks

"shortash"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Perfect Python web stack?

2007-01-17 Thread OkaMthembo

Ok pythonistas!

Please help me to decide. I might have asked some of you before, so please
bear with me.

I want to build a database driven python web app and i need to decide, so
please vote on the best components (im developing on XP SP2):

1) MySQL vs PostGRES
2) Lighttpd + FastCGI vs Apache + mod_python
3) Pylons + Cheetah + Kid/Mochikit/Dojo vs Django/Turbogears

This is not to light fires, its for my sole information :-)

Thanks in advance, gurus.

"Shortash"

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Perfect Python web stack?

2007-01-17 Thread OkaMthembo

Thanks, gentlemen. Input appreciated and noted.

"Shortash"

On 1/17/07, Mike Hansen <[EMAIL PROTECTED]> wrote:




> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of OkaMthembo
> Sent: Wednesday, January 17, 2007 3:59 AM
> To: tutor
> Subject: [Tutor] Perfect Python web stack?
>
> Ok pythonistas!
>
> Please help me to decide. I might have asked some of you
> before, so please bear with me.
>
> I want to build a database driven python web app and i need
> to decide, so please vote on the best components (im
> developing on XP SP2):
>
> 1) MySQL vs PostGRES
> 2) Lighttpd + FastCGI vs Apache + mod_python
> 3) Pylons + Cheetah + Kid/Mochikit/Dojo vs Django/Turbogears
>
> This is not to light fires, its for my sole information :-)
>
> Thanks in advance, gurus.
>
> "Shortash"

I think I recently read the you need to purchase MySQL to get a binary
for Windows, but don't quote me.

Postgre + Apache + Cheetah + Dojo is working for me. Sometime soon, I
want to experiment with Django.

I'm not familiar with Lighttpd, FastCGI, mod_python, Pylons, or Kid.
When I was looking for a JavaScript toolkit, I took a look at Mochikit
and Dojo. I was able to understand Dojo better although I hear that
Mochikit is more Python-like. 

Mike


-

  NOTICE:  This e-mail transmission and any documents or files attached to
  it contain information for the sole use of the above-identified
individual or entity.

  Its contents may be privileged, confidential, and exempt from disclosure
under the law.
  Any dissemination, distribution, or copying of this communication is
strictly prohibited.

  Please notify the sender immediately if you are not the intended
recipient.

FGNS


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor






--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Perfect Python web stack?

2007-01-19 Thread OkaMthembo

Thanks folks,
Just to add a bit of chaos :-)...i am settled on using Quicksilver:
http://www.quicksilver.net
I guess with so many frameworks out there, it all boils down to specific
implementations and
how much rolling their own one can do.

I hope to benchmark Quicksilver performance and i'll report back.

Happy coding,
"Shortash"

On 1/19/07, Alan Gauld <[EMAIL PROTECTED]> wrote:



"Dave Kuhlman" <[EMAIL PROTECTED]> wrote

> I'm currently learning Pylons.  The tutorials for Pylons discuss
> two object-relational mappers for Python: SQLObject and SQLAlchemy.
> If you want to view your database from a higher, more abstract
> level, you might want to look at them, too.

FWIW.

Both of these are standard in TurboGears too.

SQL Alchemy seems to get the expert users vote. SQLObjects seems
to be older and works OK for the simple stuff I've been playing with
so far.

Alan G.


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Perfect Python web stack?

2007-01-19 Thread OkaMthembo

Im thoroughly embarrassed. its http://www.clearsilver.net and not
quicksilver as i said earlier.

thanks Kent.

"Shortash"

On 1/19/07, Kent Johnson <[EMAIL PROTECTED]> wrote:


OkaMthembo wrote:
> Thanks folks,
> Just to add a bit of chaos :-)...i am settled on using Quicksilver:
> http://www.quicksilver.net

Is that the right URL? It doesn't work for me.

Kent





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Best IDE for Python

2007-01-25 Thread OkaMthembo

hi guys,

would someone please point me to an active link to download SPE? the url to
Stani's site just wont click through to
http://stani.be/python/spe/blog/

i have a similar problem with the url to the Windows distro of Lighttpd from
http://www.kevinworthington.com:8181/

would appreciate any help...


kind regards,

"Shortash"

On 1/25/07, Hieu Hoang <[EMAIL PROTECTED]> wrote:


Hi all,

> -- Forwarded message --
> From: "Alan Gauld" <[EMAIL PROTECTED]>
  [snip]
> > Is there a good  IDE  where in I type the name of
> > the class object and then dot  then all the attributes
> > of the object are displayed so on.
>
> There are several that do this but many are OS specific.
> The PythonWin IDE that comes as standard in the winall
> package or the ActiveState version of Pytthon can do this.
>
> I'm prettty sure Blackadder, Wing and Eclipse will do it too.

I can add Geany, SPE, and after reading Senthil's remark on gVim c-x
c-n, Pida. Geany works on top of PyGTK, SPE on wxPython, pida need
kiwi which requires pygtk also.

> > I tried to  install IDLE but I have no idea how to install tkinter?
>
> Tkinter is usually built in to Python. If you are compiling
> from source (on Linux?) You need to configure the makefile
> to include it, but most pre-built packages will have it.

On self-compiled python, I just need to have tcl-dev and tk-dev
packages installed (ubuntu linux), and the configure script does the
proper work. I have only tried the epydoc gui.

> > Any help that enables me to use good IDE as soon
> > as possible is appreciated
>
> Personally I just use vim and an interpreter prompt! :-)

Me too, just that pida bundles them in one window.

Hieu
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Best IDE for Python

2007-01-26 Thread OkaMthembo

hi guys,

how useable is vim on Windows? i saw on its site that it was developed
primarily as a Unix tool.

i wish i could learn Unix. which distro do you think is good to learn? ive
been eyeing FreeBSD but ive got untouched Ubuntus.

thanks_up_ front()

"Shortash"

On 1/25/07, Mike Hansen <[EMAIL PROTECTED]> wrote:




>
> > Activestate just released Komodo Edit and Komodo IDE. I
> believe both do
> > auto-completion that shows a list of possibilities. Komodo
> Edit is free
> > and Komodo IDE cost some $$.
>
> IMHO: If one programs in more than one programming language, the
> ultimate would be an editor/IDE that can accommodate all with similar
> functionality and behavior for all.
>
> MTCW
> tim

I agree. Depending on what I'm doing, I toggle between VIM and Komodo. I
like that both can handle multiple languages.

Mike


-

  NOTICE:  This e-mail transmission and any documents or files attached to
  it contain information for the sole use of the above-identified
individual or entity.

  Its contents may be privileged, confidential, and exempt from disclosure
under the law.
  Any dissemination, distribution, or copying of this communication is
strictly prohibited.

  Please notify the sender immediately if you are not the intended
recipient.

FGNS


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor






--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] youtube & yelp

2007-01-31 Thread OkaMthembo

Hi folks,

im of the beaten path here, but does anyone know what frameworks YouTube and
Yelp use? i know/ read that they use python.

Thankee

"shortash"

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread OkaMthembo

Hi Guys,

I need some wisdom from you. Is it possible to have PHP pages posting to
python scripts on the server side and returning values back to the calling
PHP files? Like, if my enterval.php form's action="think.py", would the two
scripts be able to talk to each other?

Thanks and Best Regards,

"Shortash"

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Python 2.5 and PHP 5.2.0

2007-02-01 Thread OkaMthembo

Thank you s much gentlemen, you have come to my aid very promptly indeed
:-)

I have to say, this is why i love Open Source; For the People, By the
People!

Thankee

"Shortash"

On 2/1/07, Christopher Arndt <[EMAIL PROTECTED]> wrote:


Luke Paireepinart schrieb:
> I can think of a roundabout way to do what you want:
>
> PHP file returns a form to the client.  when this form is submitted to
> the py file, all of the data your py script needs is sent in the query
> string or whatever.
> the py file does whatever it does, and then inside the html it returns
> to the client, it includes an instant redirect back to the PHP file with
> whatever data you want to return.

The Python script can access the PHP page on the server directly, by
just making a request to localhost (if the PHP page is on the same
server). You could use urllib or some higher level HTTP client library
and pass the data to the PHP page either in a GET or POST request. The
PHP page looks just like any other web service to the Python script.
Based on the results from the request, it can then return HTML to the
client with a redirect to the PHP script, so the user can see the
updated data, or an error message.

Chris
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] PYTHON MOBILE WEB DEVELOPMENT

2007-03-06 Thread OkaMthembo

Hello All,

I am keen to find out if there are any frameworks for Python mobile web
development out there.
Does anyone know of a major/popular mobile web app written in python?
Moreover, if i wrote a mobile web app
with standard HTML for presentation and Python as a server-side language,
would there be any catches relating to phone compatibility etc?
I know next to nothing about WAP, so can i use HTTP for a mobile app?

Quite a mouthful, i know :-). I would really appreciate any advice.

With Thanks,

Lloyd

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python Mobile Web Development

2007-03-06 Thread OkaMthembo

Hello All,

I am keen to find out if there are any frameworks for Python mobile web
development out there.
Does anyone know of a major/popular mobile web app written in python?
Moreover, if i wrote a mobile web app
with standard HTML for presentation and Python as a server-side language,
would there be any catches relating to phone compatibility etc?
I know next to nothing about WAP, so can i use HTTP for a mobile app?

Quite a mouthful, i know :-). I would really appreciate any advice.

With Thanks,

Lloyd

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] File storage vs DB storage.

2007-04-10 Thread OkaMthembo

Hello all,

Im a newbie and am currently going through the Python Tutorial for the
second time. At work, i use C#, but what a delight Python is!

Ok, to get to the point: when building a web app that should store an
retrieve photos, what would be more efficient between the app storing the
files on a local hard disk, or saving blobs/ binary data to a database?
Someone toldme that database storage should be avoided as it would cause a
botleneck, whereas i dont want to imagine the nightmare of managing tons of
files sitting in a folder. I use Windows XP.


Cheers,

--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] File storage vs DB storage.

2007-04-11 Thread OkaMthembo

Thanks, gentlemen.

Indeed, using directories may be a better bet when there are many files
involved. At least, this has been my feeling, and i gather the same from
your replies.

I'll be using Lighttpd + FastCGI + Python + MySQL (maybe PostGRE here) on
Win. XP SP2. Any known caveats of this combo before i plunge?

Thanks again

Lloyd

On 4/10/07, Alan Gauld <[EMAIL PROTECTED]> wrote:


"OkaMthembo" <[EMAIL PROTECTED]> wrote

> Ok, to get to the point: when building a web app that should store
> an
> retrieve photos, what would be more efficient between the app
> storing the
> files on a local hard disk, or saving blobs/ binary data to a
> database?
> Someone toldme that database storage should be avoided as it
> would cause a botleneck,

I wouldn't say a bottleneck but it can cause problems by
making the database itself very big. That can cause
problems for some operations, including admin tasks.
Some databases work better with blobs than others.

> whereas i dont want to imagine the nightmare of managing
> tons of files sitting in a folder. I use Windows XP.

Naming issues are usually the biggest problem.
It will work best if you use a numrerical naming convention
and manage all of the meta data in the database, along
with the filename.

The advantage of using the file system is that you can
use different folders to help organise the files - folders for
month created or submitter or whatever. Also you can
use the facilities of the OS to create encrypted folders,
secure folders, compressed folders, move the folders
onto other drives as the capacity expands, do incremental
backups etc etc.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld


___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor





--
"The Stupidry Foundry"
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Stackless Python

2008-04-28 Thread OkaMthembo
Hi guys,

I was just wondering...doesanybody think Stackless Python would be ideal for
writing web apps, ie better for large systems?
And are there Python hosts that run Stackless?

Regards,

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Stackless Python and CPython code compatibility

2008-06-05 Thread OkaMthembo
Hi guys,

Could someone please explain whether or not using Stackless Python with
CPython affects compatibility across
code versions? e.g. if one wanted Stackless for web development, would
Cheetah, Django, Zope, Plone et al play
nicely with it?

Regards,

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python and the Global Interpreter Lock

2008-08-07 Thread OkaMthembo
Hi there,

I just came across something called the Global Interpreter Lock, and
apparently its a condition where an interpreter locks resources to
avoid sharing them with other apps/ processes on the system? I wish to find
out what this means in terms of Python. for example does it mean
that Python cannot take advantage of multiple CPUs? And does it mean that
only one interpreter will run per box in a hosting environment?

I look forward to enlightenment.

Thanks,

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Python GIL

2008-11-25 Thread OkaMthembo
Hi all,

I wish to find out what the Global Interpreter Lock is and its relevance
regarding the serving of high traffic Python sites. My understanding from
what i read is that its a state whereby only one interpreter can be invoked
on a physical machine. How does this impact performance of web apps that
receive a high rate of requests? Do scripts wait in some marshalled queue
for a certain period until their turn to be interpreted, or can multiple
simultaneous requests be processed in parallel by the Python interpreter?

Please clear my confusion regarding this topic. Any explanation would be
appreciated.

Best regards,

-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Want to write a Perl based IP to Domain Name converter.

2009-01-31 Thread OkaMthembo
Lol..thats okay. Now that you are here and have seen what fun we have
writing Python code - why not join the party?

Don't be shy to join us :p - i bet you won't be sorry.



On Sat, Jan 31, 2009 at 4:11 PM,  wrote:

> On Saturday, January 31, 2009 at 21:44, ken...@tds.net wrote:
> > On Sat, Jan 31, 2009 at 7:11 AM,   wrote:
> >> Hi all,
> >>
> >> The script in the following can do the batch conversion from domain name
> to IP:
>
> >  This is a Python list, not Perl!
>
> OMG!  It's my mistake, sorry for this.
> --
> Hongyi Zhao 
> Xinjiang Technical Institute of Physics and Chemistry
> Chinese Academy of Sciences
> GnuPG DSA: 0xD108493
> 2009-1-31
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading file, adding to each line, writing file

2009-02-04 Thread OkaMthembo
The following is adapted from my humble text processing script that i use at
work for a recurring task of mine. Any excuse not to use Java all day :)



file_1 = open('step2', 'r+')
lines = file_1.readlines()
sentences = []
for line in lines:
if line:
sentences.insert(line + '-d')
file_1.close()
file_2 = open('pyout', 'w+')
if len(sentences) > 0:
for sentence in sentences:
file_2.write(sentence)
file_2.close()



On Wed, Feb 4, 2009 at 4:30 PM, David  wrote:

> Hello everybody,
>
> I have easily spent some four hours on this problem, and I am now asking
> for rescue.
>
> Here is what I am trying to do: I have a file ("step2", with some 30 or so
> lines. To each line I would like to add " -d" at the end. Finally, I want to
> save the file under another name ("pyout".
> So far I have managed to read the file, line by line, and save it under
> another name:
>
> 
>
> # add " -d" to each line of a textfile
>
> infile = open("step2", 'r') # open file for appending
> outfile = open("pyout","a") # open file for appending
>
> line = infile.readline()# Invokes readline() method on file
> while line:
>outfile.write(line),# trailing ',' omits newline character
>line = infile.readline()
>
> infile.close()
> outfile.close()
>
> 
>
> As I said, before writing to file "pyout" I would like to append the string
> " -d" to each line. But how, where? I can't append to strings (which the
> lines gained with infile.readline() seem be), and my trial and error
> approach has brought me nothing but a headache.
>
> Thanks for your help!
>
> David
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading file, adding to each line, writing file

2009-02-04 Thread OkaMthembo
The following is adapted from my humble text processing script that i use at
work for a recurring task of mine. Any excuse not to use Java all day :)

There was an error with my other posts. Pardon the triple posting - won't
happen again soon.



file_1 = open('step2', 'r+')
lines = file_1.readlines()
sentences = []
for line in lines:
if line:
sentences.insert(len(sentences), line + '-d')
file_1.close()
file_2 = open('pyout', 'w+')
if len(sentences) > 0:
for sentence in sentences:
file_2.write(sentence)
file_2.close()




On Wed, Feb 4, 2009 at 4:30 PM, David  wrote:

> Hello everybody,
>
> I have easily spent some four hours on this problem, and I am now asking
> for rescue.
>
> Here is what I am trying to do: I have a file ("step2", with some 30 or so
> lines. To each line I would like to add " -d" at the end. Finally, I want to
> save the file under another name ("pyout".
> So far I have managed to read the file, line by line, and save it under
> another name:
>
> 
>
> # add " -d" to each line of a textfile
>
> infile = open("step2", 'r') # open file for appending
> outfile = open("pyout","a") # open file for appending
>
> line = infile.readline()# Invokes readline() method on file
> while line:
>outfile.write(line),# trailing ',' omits newline character
>line = infile.readline()
>
> infile.close()
> outfile.close()
>
> 
>
> As I said, before writing to file "pyout" I would like to append the string
> " -d" to each line. But how, where? I can't append to strings (which the
> lines gained with infile.readline() seem be), and my trial and error
> approach has brought me nothing but a headache.
>
> Thanks for your help!
>
> David
>
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] reading file, adding to each line, writing file

2009-02-04 Thread OkaMthembo
Hmm...thanks Kent. Could use such information myself. I did feel that my
code was bloated or could be tweaked somehow.

Ha...there i double posted again :( Am having trouble paying attention
today.

On Wed, Feb 4, 2009 at 5:42 PM, Kent Johnson  wrote:

> On Wed, Feb 4, 2009 at 10:18 AM, OkaMthembo  wrote:
> > The following is adapted from my humble text processing script that i use
> at
> > work for a recurring task of mine. Any excuse not to use Java all day :)
> >
> > There was an error with my other posts. Pardon the triple posting - won't
> > happen again soon.
> >
> >
> >
> > file_1 = open('step2', 'r+')
> > lines = file_1.readlines()
> > sentences = []
> > for line in lines:
> > if line:
>
> I don't think line will ever be empty, so this test is not needed.
>
> > sentences.insert(len(sentences), line + '-d')
>
> sentences.append(line + '-d') is simpler. Note this appends after the
> newline so it is not really what the OP wants.
>
> > file_1.close()
> > file_2 = open('pyout', 'w+')
> > if len(sentences) > 0:
>
> This test is not needed, if sentences is empty the for statement won't
> do anything.
>
> > for sentence in sentences:
> > file_2.write(sentence)
>
> The loop could be replaced with
> file_2.writelines(sentences)
>
> Kent
>



-- 
Lloyd Dube
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] (no subject)

2009-02-06 Thread OkaMthembo
Lol..indeed [?]


On Fri, Feb 6, 2009 at 5:08 PM, bob gailer  wrote:

> Okeke emmanuel wrote:
>
>>
>>
>> 
>>
>> ___
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
> At least the subject is accurate!
>
> --
> Bob Gailer
> Chapel Hill NC
> 919-636-4239
> ___
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Lloyd Dube
<<338.png>>___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor