Thank you both for helping me out. I am still rather new to Python
and so I'm probably trying to reinvent the wheel here.
When I try to do Paul's response, I get
>>>tokens = line.strip().split()
[]
So I am not quite sure how to read line by line.
tokens = input.read().split() gets me all the in
ike
if tokens.startswith('pattern') == true
Again, thanks so much. I've gone to http://gnosis.cx/TPiP/ and I have
a couple O'Reilly books, but they don't seem to have a straightforward
example for this kind of text manipulation.
Patrick
On Oct 14, 11:17 pm, John Machi
ry
needs to be put together. Something like
if tokens[1] and tokens[2] startswith('pattern') == true
tokens[2] = join(tokens[2]:tokens[3])
token[3] = token[4]
del token[4]
but the code isn't right...any ideas?
Again, thanks so much. I've gone to http://gnosis.cx/TPiP
yield chem
> chem = []
> chem.append(tok)
and
> for key, group in groupby(instream, unicode.isspace):
> if not key:
> yield "".join(group)
Thanks again,
Patrick
On Oct 15, 2:16 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
&g
And now for something completely different...
I see a lot of COM stuff with Python for excel...and I quickly made
the same program output to excel. What if the input file were a Word
document? Where is there information about manipulating word
documents, or what could I add to make the same prog
And now for something completely different...
I've been reading up a bit about Python and Excel and I quickly told
the program to output to Excel quite easily. However, what if the
input file were a Word document? I can't seem to find much
information about parsing Word files. What could I add
ep on getting "TypeError: coercing to Unicode: need string or
buffer, instance found". I'm probably copying the word document
wrong. What can I do?
Thanks,
Patrick
import os, codecs, glob, shutil, win32com.client
from win32com.client import Dispatch
input = 'C:\\text_samples\\
Indeed, the shutil.copyfile(doc,txt_doc) was causing the problem for
the reason you stated. So, I changed it to this:
for doc in glob.glob(input):
txt_split = os.path.splitext(doc)
txt_doc = txt_split[0] + '.txt'
txt_doc_dir = os.path.join(input_dir,txt_doc)
doc_dir = os.path.join
That KB document was really helpful, but the problem still isn't
solved. What's wierd now is that the unicode characters like
become è in some odd conversion. However, I noticed when I try to
open the word documents after I run the first for statement that Word
gives me a window that says File
Hi,
I'm trying to learn regular expressions, but I am having trouble with
this. I want to search a document that has mixed data; however, the
last line of every entry has something like C5H4N4O3 or CH5N3.ClH.
All of the letters are upper case and there will always be numbers and
possibly one .
H
This is related to my last post (see:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/c333cbbb5d496584/998af2bb2ca10e88#998af2bb2ca10e88)
I have a text file with an EINECS number, a CAS number, a Chemical
Name, and a Chemical Formula, always in this order. However, I
realized
-packages\pythonwin\pywin\framework
\scriptutils.py", line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:\Documents and Settings\Patrick Waldo\My Documents\Python
\WORD\try5-2-file-1-1.py", line 32, in ?
input = codecs.open(input_text, 'r','utf8
Finally I solved the problem, with some really minor things to tweak.
I guess it's true that I had two problems working with regular
expressions.
Thank you all for your help. I really learned a lot on quite a
difficult problem.
Final Code:
#For text files in a directory...
#Analyzes a randomly
t
exec codeObject in __main__.__dict__
File "C:\Documents and Settings\Patrick Waldo\My Documents\Python
\WORD\try5-2-file-1-all patterns.py", line 77, in ?
input = codecs.open(input_text, 'r','utf8')
File "C:\Python24\lib\codecs.py", line 666,
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>How to Speed Up Internet Searches??
>When you go to a web site, the first thing that happens is that.
>and for networking tips see at
> : : :
Please don't post this kind of stuff here any more. It's off topic
Hi all,
I'm analyzing some data that has a lot of country data. What I need
to do is sort through this data and output it into an excel doc with
summary information. The countries, though, need to be sorted by
region, but the way I thought I could do it isn't quite working out.
So far I can only
Great, this is very helpful. I'm new to Python, so hence the
inefficient or nonsensical code!
>
> 2) I would suggest using countries.sort(...) or sorted(countries,...),
> specifying cmp or key options too sort by region instead.
>
I don't understand how to do this. The countries.sort() lists
al
This is how I solved it last night in my inefficient sort of way and
after re-reading some of my Python books on dictionaries. So far this
gets the job done. However, I'd like to test if there are any
countries in the excel input that are not represented, ie the input is
all the information I hav
(Oops, sent as private, reposting to list)
On Nov 20, 2007 12:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> FWIW it's trivial to run pyflakes on your code (automatically behind
> the scenes) to get syntax checking; in vim, my syntax errors get
> underlined immediately for python code. It
Most of the time self doesn't bother me in the slightest. The one
time it does bother me however, is when I am turning a function into a
method. In this case, often I have many local variables which I
actually want to be instance variables, so I have to add self to all
of them. Of course, this i
On Nov 22, 2007 1:04 PM, Brian <[EMAIL PROTECTED]> wrote:
> / Chime Mode
> I have, in fact, sent this thread to my friend.
> His limiting factors are
>
> - money-control people favor MS platforms
> - C# and VS have minimal cost impact for academia
> - sys admins have everything locked down (probab
On 24 Nov 2007 08:41:24 GMT, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote:
> Donn Ingle wrote:
> > Already done, the code within PIL is causing the crash. It gets ugly and
> > out of my remit. It's a freetype/Pil thing and I simply want to a way to
> > catch it when it happens.
> > Since a segfault e
Ton Van Vliet:
> [... using/with ...]
This looks like a really nice little construct, and solves my small
quirk issue (which has popped up maybe twice in my python experience).
It could also be a solution to the OP's problem. The issue of course
is disambiguation. Is EVERY name looked up in the
On 24 Nov 2007 13:56:37 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> So::
>
> def meth(self):
> using self:
> tmp = raw_input('Enter age: ')
> age = int(tmp)
>
> becomes::
>
> def meth(self):
> using self:
> self.tmp = self.
Visual Studio 2005? Am I overlooking the documentation for
this??
Thanks in advance
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
Fairly new Python guy here. I am having a lot of trouble trying to
figure this out. I have some data on some regulations in Excel and I
need to basically add up the total regulations for each country--a
statistical analysis thing that I'll copy to another Excel file.
Writing with pyExcel
Is it possible to build python as a static library and embed all necessary c
and py modules rom the standard lib in it? This would make distributing and
embedded interpreter in our app MUCH simpler.
thanks!
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http
/Library/Application Support/East West/python_blah_blah on mac.
Of course, none of this matters if I can just include all of the required
libs (traceback, site, etc) in the static library, as asked by my previous
post..
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http
Looks like statically linking the c-based modules is pretty easy, but how
about the python-based modules?
On Dec 3, 2007 10:06 AM, Patrick Stinson <[EMAIL PROTECTED]>
wrote:
> Is it possible to build python as a static library and embed all necessary
> c and py modules rom the standa
Monty Python pioneered (or at least pioneered the organized televising
of) a form of humor where there is no punchline or reason something is
funny, it just is (or isn't). I find about half of it very funny, and
the rest very unfunny. I used to find it more hilarious than I do
now. It's an extre
> > > > Kay Schluehr wrote:
> > > > Python 2.6 and 3.0 have a more Pythonic way for the problem:
> > > > class A(object):
> > > > @property
> > > > def foo(self):
> > > > return self._foo
> > > > @foo.setter
> > > > def foo(self, value)
> > > > self._foo = value
> >
On Dec 17, 2007 1:10 PM, Bruno Desthuilliers
<[EMAIL PROTECTED]> wrote:
> Hem... May I remind you that Python doesn't have block comments ?-)
I suppose we could argue semantics, since """ strings are actually
processed, but they are basically block comments.
So, there we are, multiline strings A
If you're using an operating system supporting the readline utility
try:
http://www.python.org/doc/current/tut/node15.html
I am using a slightly modified version of the given example.
The last time I checked the size of my history file it had 4k+ entries.
Regards,
Patrick
--
2
Hi group!
Did anybosy here have some success using the bonobo bindings
to interact with nautilus?
--
Patrick
--
http://mail.python.org/mailman/listinfo/python-list
y
to be a significant benefit when coding in Common Lisp.
Regards,
Patrick
S P Engineering, Inc.| The experts in large scale distributed OO
| systems design and implementation.
[EMAIL
Those are two pragmatic
benefits.
>> 3. It adds another construction to the language.
That's a very minimal cost relative to the benefits.
You haven't made your case for named functions being preferable.
Regards,
Patrick
--
ways (or, perhaps worse, "nearly equivalent but with subtle
> differences" ones) to perform identical tasks is a *HUGE* conceptual
> cost: I like languages that are and stay SMALL and SIMPLE.
Like Scheme?
Regards,
Patrick
Hi all,
I tried reading http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/334695
on the same subject, but it didn't work for me. I'm trying to learn
how to make pivot tables from some excel sheets and I am trying to
abstract this into a simple sort of example. Essentially I want to
take in
On Dec 27, 10:59 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 28, 4:56 am, [EMAIL PROTECTED] wrote:
>
> > from itertools import groupby
>
> You seem to have overlooked this important sentence in the
> documentation: "Generally, the iterable needs to already be sorted on
> the same key functi
Wow, I did not realize it would be this complicated! I'm fairly new
to Python and somehow I thought I could find a simpler solution. I'll
have to mull over this to fully understand how it works for a bit.
Thanks a lot!
On Dec 28, 4:03 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 28, 11:4
Petr, thanks for the SQL suggestion, but I'm having enough trouble in
Python.
John would you mind walking me through your class in normal speak? I
only have a vague idea of why it works and this would help me a lot to
get a grip on classes and this sort of particular problem. The next
step is to
On Dec 29, 3:00 pm, [EMAIL PROTECTED] wrote:
> Patrick,
>
> in your first posting you are writing "... I'm trying to learn how to
> make pivot tables from some excel sheets...". Can you be more specific
> please? AFIK Excel offers very good support for pivot tables.
Sorry for the delay in my response. New Year's Eve and moving
apartment
> - Where the data come from (I mean: are your data in Excel already
> when you get them)?
> - If your primary source of data is the Excel file, how do you read
> data from the Excel file to Python (I mean did you solve this
Yes in the sense that the top part will have merged cells so that
Horror and Classics don't need to be repeated every time, but the
headers aren't the important part. At this point I'm more interested
in organizing the data itself and i can worry about putting it into a
new excel file later.
--
h
Petr thanks so much for your input. I'll try to learn SQL, especially
if I'll do a lot of database work.
I tried to do it John's way as en exercise and I'm happy to say I
understand a lot more. Basically I didn't realize I could nest
dictionaries like db = {country:{genre:{sub_genre:3}}} and cal
Is it possible to load a script from it's text data, and not from a file?
I'm writing a scripting engine and need to run the scripts right from the
editor.
cheers!
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net
Hi all,
I was just curious if there was a built-in or a more efficient way to
do take multiple rows of information and write them into excel using
pyExcelerator. This is how I resolved the problem:
from pyExcelerator import *
data = [[1,2,3],[4,5,'a'],['','s'],[6,7,'g']]
wb=pyExcelerator.Work
On Jan 22, 2008 10:59 PM, <[EMAIL PROTECTED]> wrote:
> I am writing a game, and it must keep a list of objects. I've been
> representing this as a list, but I need an object to be able to remove
> itself. It doesn't know it's own index. If I tried to make each object
> keep track of it's own index
'in' has a lower operator precedence than '=='
('t' in sample) == True
would fix the operator precedence.
On Feb 8, 2008 11:09 AM, c james <[EMAIL PROTECTED]> wrote:
> Try this
>
> >>> sample = {'t':True, 'f':False}
> >>> 't' in sample
> True
> >>> type('t' in sample)
>
> >>> 't' in sample ==
I tried to make a simple abstraction of my problem, but it's probably
better to get down to it. For the funkiness of the data, I'm
relatively new to Python and I'm either not processing it well or it's
because of BeautifulSoup.
Basically, I'm using BeautifulSoup to strip the tables from the
Feder
Hi all,
I have some data with some categories, titles, subtitles, and a link
to their pdf and I need to join the title and the subtitle for every
file and divide them into their separate groups.
So the data comes in like this:
data = ['RULES', 'title','subtitle','pdf',
'title1','subtitle1','pdf1
>def category_iterator(source):
> source = iter(source)
> try:
>while True:
> item = source.next()
This gave me a lot of inspiration. After a couple of days of banging
my head against the wall, I finally figured out a code that could
attach headers, titles, numbers,
On Wed, Mar 12, 2008 at 9:23 AM, Carl Banks <[EMAIL PROTECTED]> wrote:
> Even though it's typically used for graphical games, PyGame would be a
> good way to make a cross-platform "text-mode" game. It should be
> pretty straightforward to simulate a text mode terminal using a grid
> of sprites
(sorry michael, didn't mean to personal post
On Wed, Mar 19, 2008 at 9:24 AM, Michael Wieher wrote:
> I think py2exe does this, but it might be a bit bloated
No, py2exe basically bundles the main script and the interpreter
together so it's easy to run and requires no python installation.
Loo
It seems like this is mostly a non-issue. The original code actually
works correctly (of course the updated versions that solve the
exception problem are probably better). The only thing that is going
haywire is the interpreter shutdown process. I think it is going a
bit overboard to "consider _
eptions? I guess my overall question is how tuple
unpacking works underneath the covers. Can I implement tuple
unpacking for my own objects?
Thanks,
Patrick
--
http://mail.python.org/mailman/listinfo/python-list
It's dangerously close to april fools for this kind of posting!
Congrats on the release, it looks mighty impressive.
--
http://mail.python.org/mailman/listinfo/python-list
What kind of database do you need? Relational Databases?
The three major databases you can work with python are SQLite, MySQL and
PostgreSQL (favorite of mine.)
SQLite already comes with python. Try:
>>> import sqlite3
SQLite is... Lite. All the informations are stored in a single file.
MySQL
2009/1/19 Steven D'Aprano
> On Mon, 19 Jan 2009 15:47:00 +0530, srinivasan srinivas wrote:
>
> > Hi,
> > I have written a script which will spawn more than 200 no of
> > subprocesses. I have used subprocess.Popen to do that.
> >
> > OSError: [Error 24] Too many open files.
> >
> > Could someon
2009/1/20 Paul Rubin <"http://phr.cx"@nospam.invalid>
> Luis Zarrabeitia writes:
> > No wonder you can't get Bruno's point. For the second, static checks
> > to prevent accidents, you have pylint. For the first, not only you
> > are using the wrong tool, but you are barking at python for not
> >
I would recommend Netbeans with Python plugin, Eric4 and Komodo Edit, with
descending order of preference
2009/1/27 [email protected]
> Greetings! I've heard enough raving about Python, I'm going to see for
> myself what all the praise is for!
>
> I'm on a Mac. I use Netbeans for Java, P
2009/2/2 Joe Riopel
> I typically use vim/vi, because it's usually already installed on the
> OS's I work with and vim for Windows works the same. Also, using the
> same editor across these different OS's, I don't have to worry too
> much soft/hard tabs.
You shouldn't even think about hard tab
r? My hope is that there
is a change (simple or not) that can be made to the C code for the
frozen executable to resolve the problem.
Thanks in advance.
-Patrick
--
Patrick L. Hartling
http://www.137.org/patrick/
/*==*/
/*
Is there any reason why the last item in the traceback is one frame
below the top of the stack? It would be great to show the real line in
my editor...
--
http://mail.python.org/mailman/listinfo/python-list
lue, &traceback);
if(traceback) // traceback.tb_lineno
*lineno = ((PyTracebackObject *) traceback)->tb_lineno;
On Sun, Nov 30, 2008 at 8:59 PM, John Machin <[EMAIL PROTECTED]> wrote:
> On Dec 1, 4:47 pm, "Patrick Stinson" <[EMAIL PROTECTED]>
> wrote:
>> Is there an
)
I get a UnicodeDecodeError. However if I do,
c = unicode(cell.encode("utf-8"),"utf-8")
csvfile.write(c)
Why should I have to encode the cell to utf-8 and then make it unicode
in order to write to a text file? Is there a more intuitive way to
get around these bothersome unicode errors?
>> Daniel Fetchinson wrote:
>>> http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-
> stay.html
>>>
>>> The proposal is to allow this:
>>>
>>> class C:
>>> def self.method( arg ):
>>> self.value = arg
>>> return self.value
>>>
>>> instead of this:
>>>
>>> class C:
On Sun, Dec 7, 2008 at 4:43 PM, <[EMAIL PROTECTED]> wrote:
> Trying to decide which to get started with. Can anyone suggest some
> pros and cons to each of them?
>
> Would PyOpenGL be in the same camp as Pygame and pyglet? Do either of
> Pygame or pyglet make use of PyOpenGL behind the scenes?
> -
On Mon, Dec 8, 2008 at 12:55 PM, Arnaud Delobelle
<[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
>
>> class C:
>> def createfunc(self):
>> def self.func(arg):
>> return arg + 1
>>
>> Or, after the class definition is done, to extend it dynamically:
>>
>> def C.method
On Wed, Dec 10, 2008 at 6:57 AM, MRAB <[EMAIL PROTECTED]> wrote:
> Aaron Brady wrote:
>>
>> On Dec 9, 12:40 pm, MRAB <[EMAIL PROTECTED]> wrote:
>>>
>>> Aaron Brady wrote:
On Dec 9, 8:28 am, MRAB <[EMAIL PROTECTED]> wrote:
snip
>
> In some languages (I think Delphi is one of t
On Wed, Dec 10, 2008 at 11:57 AM, Benjamin Kaplan
<[EMAIL PROTECTED]> wrote:
>
>
> On Wed, Dec 10, 2008 at 12:22 PM, Patrick Mullen <[EMAIL PROTECTED]>
> wrote:
>>
>> I don't have a huge stake in this, but I wouldn't mind a change to
>> allow any
On Sat, Dec 20, 2008 at 10:15 PM, r wrote:
> On Dec 20, 11:11 pm, walterbyrd wrote:
>> On Dec 20, 5:05 pm, Roy Smith
>>
>> > He got really hung up on the % syntax.
>>
>> I guess it's good to know that there is, at least, one person in the
>> world doesn't like the % formatting. As least the move
On Sun, Dec 21, 2008 at 11:26 AM, r wrote:
> I noticed when i mentioned "self" nobody wants to touch that subject.
> There could be many reasons why...
>
> 0.) nobody but the 10 regulars i see here exists
> 1.) nobody cares(doubt it)
> 2.) nobody is brave enough to question it(maybe)
> 3.) most pe
On Sun, Dec 21, 2008 at 11:41 AM, Gilles Ganault wrote:
> Hi
>
> I'd like to rewrite a Web 2.0 PHP application in Python with AJAX, and
> it seems like Django and Turbogears are the frameworks that have the
> most momentum.
>
> I'd like to use this opportunity to lower the load on servers, as the
On Mon, Dec 29, 2008 at 6:13 PM, R. Bernstein wrote:
> How do I DRY the following code?
>
> class C():
>
> def f1(self, arg1, arg2=None, globals=None, locals=None):
> ... unique stuff #1 ...
> ... some common stuff #1 ...
> ret = eval(args, globals, locals)
> ... more stuff #2
I'm not finished reading the whole thread yet, but I've got some
things below to respond to this post with.
On Thu, Oct 23, 2008 at 9:30 AM, Glenn Linderman <[EMAIL PROTECTED]> wrote:
> On approximately 10/23/2008 12:24 AM, came the following characters from the
> keyboard of Christian Heimes:
>>
We are in the same position as Andy here.
I think that something that would help people like us produce
something in code form is a collection of information outlining the
problem and suggested solutions, appropriate parts of the CPython's
current threading API, and pros and cons of the many vario
As a side note to the performance question, we are executing python
code in an audio thread that is used in all of the top-end music
production environments. We have found the language to perform
extremely well when executed at control-rate frequency, meaning we
aren't doing DSP computations, just
returning a 6-tuple. This corresponds to the
general structure of a URL: scheme://netloc/path;parameters?query#fragment.
"""
What kind of URLs does it parse not containing "://" ?
--
Patrick Mézard
--
http://mail.python.org/mailman/listinfo/python-list
d yet we are so close! This is a big deal.
>
>
> Perfectly said, Patrick. It pains me to know how widespread python
> *could* be in commercial software!
>
> Also, good points about people being longwinded and that "code talks".
>
> Sadly, the time alone I've
on Python sandboxes, he could be a helpful
> supporter.
>
> Questions for Andy: is the type of work you want to do in independent
> threads mostly pure Python? Or with libraries that you can control to some
> extent? Are those libraries reentrant? Could they be made reentrant? How
>
; code and frameworks always use a context object pattern so that
> there's never and non-const global/shared data). I would go as far to
> say that this is the case with more performance-oriented software than
> you may think since it's usually a given for us to have to be pa
discussed above)
> - maturity (are we ready to bet the farm that mp is going to work
> properly on the platforms we need it to?)
>
> Again, I'm psyched that multiprocessing appeared in 2.6 and it's a
> huge huge step in getting everyone to unlock the power of python!
>
On Wed, Oct 29, 2008 at 4:05 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote:
> On approximately 10/29/2008 3:45 PM, came the following characters from the
> keyboard of Patrick Stinson:
>>
>> If you are dealing with "lots" of data like in video or sound editing,
ler:
>>
>> On Wed, Oct 29, 2008 at 8:05 PM, Glenn Linderman <[EMAIL PROTECTED]>
>> wrote:
>>
>>>
>>> On approximately 10/29/2008 3:45 PM, came the following characters from
>>> the
>>> keyboard of Patrick Stinson:
>>>
&g
On Fri, Nov 7, 2008 at 2:23 PM, RyanN <[EMAIL PROTECTED]> wrote:
>
> to do this I tried:
>
>def addCountry(self,country_name):
># create an instance of country
>exec(country_name + "= country('" + country_name + "')")
># Add this new instance of a country to a list
>
On Sun, Mar 1, 2009 at 8:35 AM, The Dude wrote:
> Hello,
>
> Each invocation of py2exe creates an executable along with a number of
> other files which need to be distributed with it, including library.zip. I
> noticed that compiling different scripts creates different, and incompatible
> libr
On Mon, Mar 2, 2009 at 6:56 PM, Maxim Khitrov wrote:
> - Show quoted text -
> On Mon, Mar 2, 2009 at 9:18 PM, William Heath wrote:
>> Hi All,
>> I am using py2exe to create a windows executable. I am curious if anyone
>> knows a way to automatically upgrade a py2exe windows executable while it i
2009/4/3 Jeremiah Dodds :
>
>
> On Thu, Apr 2, 2009 at 9:02 PM, andrew cooke wrote:
>>
>> Echo wrote:
>> > 2009/4/2 Jeremiah Dodds
>> >
>> >> The one thing that makes me want to use git more than any other dvcs is
>> >> that you don't have to create a new directory for branches. This may be
>> >>
2009/4/18 Filip Gruszczyński :
> Yep, I have heard a lot about test driven development. I am now
> programming a lot using DJango and I would like to use its test
> framework to try it. However, I have little experience with this (as
> most people I know). I also have no idea, how to apply this, wh
On Wed, Apr 22, 2009 at 9:33 PM, David Lyon wrote:
> Hi Steve,
>>> Why should the package developer dictacte which python version the
>>> package will run on ?
>>
>> Because they're the developer. Who else should decide what Python
>> versions to support?
> The developer shouldn't be making such d
Here's a quick dumb example, hope it helps:
def function1(a,b,c):
print a,b,c
def function2(x):
print x
def function3(y):
print y+3
def executeall(list):
print "setting up"
for function,args in list:
function(*args) #Calls the function passing in the arguments
mylist = [[f
I get an error reporting an unfound symbol using a statically linked release
build of python2.5 on a OSX-Tiger. This works fine on leopard, where the
system default python is version 2.5.1 - the same version that I'm using to
link to.
Sorry, I'm currently screwing with my configs and don't have a
, Patrick Stinson <
[EMAIL PROTECTED]> wrote:
> I get an error reporting an unfound symbol using a statically linked
> release build of python2.5 on a OSX-Tiger. This works fine on leopard, where
> the system default python is version 2.5.1 - the same version that I'm using
> to
In my experience, python is very pattern agnostic. You can do functional or
object oriented or procedural fairly easily, have deep or light object
trees, or even mix procedural style with some object oriented code if you
like. "There should be one way to do it" tends to not apply as much as some
Judging python's speed by how fast websites go is not going to work very
well. There are many things that can bog down the "speed" of loading a web
site, especially if you are judging speed by how long a page takes to load.
torontolife.com is loading extremely slow for me also. So is wikipedia.
M
I can see both sides of this argument, and I think TDD is great in some
cases and not so great in others. I have used it before, but don't use it
often, as the programs I write are very difficult to automatically test.
(Games, which many of the bugs have to do with whether an optimization
produces
Hi Erik,
As far as I know the only full web framework that works with a primarily
inline style is spyce, which is not currently under active development. I
used it for a while and it was the first python framework I used. I think
it's pretty good, if a little bit of an underdog.
That said, usin
There are certainly situations where data hiding is useful and perhaps a
wanted feature, but there has to be at least one place where I can use what
I want when I want to with some high and mighty designer telling me what I
should and shouldn't access. One of the reasons they have data hiding in
s
Here is a quick, ugly way you can easily hide data, although persistent
clients can still bypass it. x.__dict__ is ugly, though not any uglier than
x.__Ugly__Internal__Variable__Do__Not__Set
Another option would be to use another structure, such as a dictionary or
list, and store variables in the
201 - 300 of 648 matches
Mail list logo