googleboy a écrit :
> Hi.
>
> I am trying to collapse an html table into a single line. Basically,
> anytime I see ">" & "<" with nothing but whitespace between them, I'd
> like to remove all the whitespace, including newlines. I've read the
> how-to and I have tried a bunch of things, but noth
Aaron a écrit :
> I have a data sructure setup and I populate it in a loop like so:
>
> y=0
> while X:
>DS.name = "ASDF"
>DS.ID = 1234
>list[y] = DS;
>y = y + 1
>
> print list
Traceback (most recent call last):
File "", line 1, in ?
File "/usr/tmp/python-9150sSF", line 2,
Ivan Shevanski a écrit :
> Alright heres my problem. . .Say I want to carry over a variable from
> one function to another or even another run of the same function. Is
> that possible? Heres a quick example of what I'm talking about.
>
> def abc():
>x = 1
>y = x + 1
>print y
>
> def
mrstephengross a écrit :
> I'd like to do some basic SQL stuff in Python. It seems like there are
> a heck of a lot of SQL modules for Python. What's the simplest and
> easiest one to use?
Probably the one that go with your RDBMS.
--
http://mail.python.org/mailman/listinfo/python-list
Laszlo Zsolt Nagy a écrit :
> Dave wrote:
>
>> Hello All,
>>
>> I would like to gather some information on Python's runtime
>> performance. As far as I understand, it deals with a lot of string
>> objects. Does it require a lot string processing during program
>> execution? How does it handle
Robin Becker a écrit :
> Is there a way to override a data property in the instance? Do I need to
> create another class with the property changed?
Do you mean attributes or properties ?
--
http://mail.python.org/mailman/listinfo/python-list
Stewart Midwinter a écrit :
> I've made a comparison of the relative popularity of blogging tools
> used by python programmers. I was surprised by the number of python
> developers not using python for their blogs; isn't that like GM
> employees driving Toyota cars?
>
> See my post at:
>
> http:
the.theorist a écrit :
> I have a small, simple class which contains a dictionary (and some
> other stuff, not shown). I then have a container class (Big) that holds
> some instances of the simple class. When I try to edit the elements of
> the dictionary, all instances obtain those changes; I want
Mattia Adami a écrit :
> Hi to all.
> I'm intristing in write a plugin for browsers that can execute python
> code.
> I know the main problem is security. Many thread were opened about this
> in the ng.
> I would know if fork python rewriting some library could avoid
> problems. I.e. one problem is
Loris Caren a écrit :
> If
>
> a = 'apple'
> b = 'banana'
> c = 'cabbage'
>
> How can I get something like:-
>
> for i in 'abc':
> r = eval(i)
> if r == 'cabbage': r = 'coconut'
>
> actually change the object referenced by r rather
> than creating a new object temporarily referenced
dcrespo a écrit :
>>I think it would be time for you to read the Fine Manual...
>
>
> hi, thanks for your answer... I really did it the same way you
> suggested, but I forgot to tell you that I wanted to get a better way
> for doing it.
Let us know if you find one...
>
> By the way, knowing yo
Noah a écrit :
> I have a dictionary that I would like to expand to satisfy a
> function's agument list. I can used the ** syntax to pass a dictionary,
> but
> this only works if each key in the dictionary matches an argument.
> I cannot pass a dictionary that has more keys than the function has
>
Jeffrey Schwab a écrit :
> bruno at modulix wrote:
>
>> Steven D'Aprano wrote:
>>
>>> On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>>
Tieche Bruce A MSgt USMTM/AFD wrote:
> I am new to python,
>
> Could someone explain (in English) how and when to use self?
>>
Steven D'Aprano a écrit :
> On Thu, 03 Nov 2005 20:19:03 +0100, bruno at modulix wrote:
>
>
>>Steven D'Aprano wrote:
>>
>>>On Thu, 03 Nov 2005 10:14:23 +0100, bruno at modulix wrote:
>>>
>>>
>>>
Tieche Bruce A MSgt USMTM/AFD wrote:
>I am new to python,
>
>
>
>Cou
Tieche Bruce A MSgt USMTM/AFD a écrit :
> Well, thanx for all the ... useful information.
>
> I thought that I would try, but this has turned out to be a waist of my time.
>
> Have fun playing with your egos
s/your egos/words/
If you can't stand a joke (possibly very bad, but that's another po
Colin J. Williams a écrit :
> bruno at modulix wrote:
>
>> venk wrote:
>>
>>> Hi,
>>> can some one properly explain the differences between class types and
>>> classic classes? ... Still face problems in identifying what is what.
>>
>>
>>
>> I'm not sure I understand your question. Are you talkin
[EMAIL PROTECTED] a écrit :
> Your suggestion ('_name' -> implementation, 'name' -> API)
This is not "my" convention, it's *the* (mostly agreed upon) Python
convention. Like 'self', or CONSTANT, or a whole lot of things in Python.
> makes sense
> as a convention between programmers that know a
David Rasmussen a écrit :
> If I have a collection of dicts like:
>
> john = {'id': 1, 'name': "John Cleese", 'year': 1939}
> graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941}
>
> I could store all of them in a list. But for easy lookup, I might store
> all these in a dict instead, like
Sam Pointon a écrit :
>>If I could just say to Python: john and graham (and ...) are all a part
>>of a "superdict" and either their id or their name can be used as keys.
>
>
>>Can I do that somehow?
>
>
> Sure you can. There are two obvious ways to do this - enlist the aid of
> a Superdict (or
David Rasmussen a écrit :
> What is the best book for Python newbies (seasoned programmer in other
> languages)?
I don't know if it's the "best", but a DiveIntoPython/PythonCookbook
combo may be a good choice.
--
http://mail.python.org/mailman/listinfo/python-list
Erik Max Francis a écrit :
> David T wrote:
>
>> Individuals, and perhaps groups of individuals are the creators of
>> works.
>
>
> When someone pays you to create a work, then they own the copyright,
Depends on the country's laws and the exact agreement.
--
http://mail.python.org/mailman/l
The Eternal Squire a écrit :
> Without copyright, how could one possibly earn a living writing a
> novel?
Without copyright, how could one possibly earn a living writing programs?-)
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] a écrit :
> I think I have an answer to my own question. In the
> WindowsComponents/__init__.py file, I have the following, that feels
> like a better answer for the problem. Is there a better answer than
> this?
>
> import os, sys
> sys.path.append(os.path.join(os.getcwd(), 'C
Steve a écrit :
> We are building a web app and the our backend is currently using python
> with php front end. We would like to do everything in python but php
> for our front end is so easy to use. We would like to use zope on our
> front end(no experience with it) can anyone provide any experi
Shi Mu a écrit :
> On 11/17/05, Carl J. Van Arsdall <[EMAIL PROTECTED]> wrote:
>
(Carl's top-post corrrected. Carl, please do not top-post)
>>
>>
>>Ben Bush wrote:
>>
>>>I wrote the following code to test the use of "try...exception",
>>>and I want n to be printed out. However, the following code'
[EMAIL PROTECTED] a écrit :
> Is there a function/class/module/whatever I can use to
> look at objects? I want something that will print the object's
> value (if any) in pretty-printed form, and list all it's attributes
> and their values. And do all that recursively.
> I want to be able to find
KvS a écrit :
> Ok, makes sense but didn't seem "natural" to me,
It will seem more natural if you understand that modules should be
modulars (ie: low coupling, high cohesion). A module should *never*
bother about no rely upon other modules being imported by the module it
imports itself. Err, n
Tony a écrit :
> If I'd like to learn Python for web-development, what are the options
> available?
There are too many *good* options for web developpement in Python.
> Thanks. tony
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Zachmann a écrit :
> Is it correct to say that the typical ownership problem, which
> frequently arises in C++, does not occur normally in Python?
What is this "typical ownership problem" ?
--
http://mail.python.org/mailman/listinfo/python-list
Raymond Hettinger a écrit :
> Gustav Hållberg wrote:
>
>>I tried finding a discussion around adding the possibility to have
>>optional underscores inside numbers in Python. This is a popular option
>>available in several "competing" scripting langauges, that I would love
>>to see in Python.
>>
>>E
Thomas a écrit :
> Hello,
>
> I am new to web programming but have some experience in technical
> programming in Python and other languages. I need to build a networked
> program which I would like to first deploy on an intranet and later on the
> web which provides access to a few technical a
[EMAIL PROTECTED] a écrit :
>
> I'm off to study the code. (Hmm.. how does python parse ("green",
> "red")[(i * 8 + j) % 2] command ...
("green", "red")[0] == "green"
("green", "red")[1] == "red"
(i * 8 + j) is somewhat trivial (just take care of precedence order),
and will return an integer
[EMAIL PROTECTED] a écrit :
Scott A. McIntyre wrote:
I looked around but didn't see any LDIF tools for perl or python...
Any assistance or advice is appreciated!!
Scott
Hello Scott,
Did you ever get this issue resolved? I have a similar need to merge
two LDIF files. I did find a program called m
BJörn Lindqvist a écrit :
I think it would be cool if you could refer to instance variables
without prefixing with "self." I know noone else thinks like me so
Python will never be changed, but maybe you can already do it with
Python today?
(snip code)
It works! exec(magic()) does the needed hi = se
worzel a écrit :
I get what the difference is between a tuple and a list, but why would I
ever care about the tuple's immuutability?
Because, from a purely pratical POV, only an immutable object can be
used as kay in a dict. So you can use tuples for 'composed key'.
Bruno
--
http://mail.python.o
Antoon Pardon a écrit :
Op 2005-01-08, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>:
worzel a écrit :
I get what the difference is between a tuple and a list, but why would I
ever care about the tuple's immuutability?
Because, from a purely pratical POV, only an immutable object c
Nomak a écrit :
Hello,
does python have an equivalent to Java: int Object.hashCode() ?
id(object) -> integer
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
hash(obj) -> integer
Return a hash valu
[EMAIL PROTECTED] a écrit :
In a file there can be several dictionaries like this
(snip)
I need to read only the the first and the last dictionaries.What is a
best solution?
Depends on your definition of 'best solution'.
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Bickett a écrit :
This is certainly a worthy topic. There are several IDEs for Python
(one I like very much being Komodo) that have plenty of fancy
debugging features and advanced operations, however I have yet to
encounter (elsewhere) the convenience that comes with being able to
press F5 a
Pierre Barbier de Reuille a écrit :
Fuzzyman a écrit :
If you use IPython for your interactive mode stuff, you'll have a nice
history...
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
Best event : if your "EDITOR" system variable in "vim", using the "ed"
command in ipython will brin
jordan2856977 a écrit :
hellow everybody! I'm from china. I'm a beginner of python. in china,
python is not a fashionable language, so it's difficult to find some
books about python. finally,I find a book named "python how to
program" wrote by H.M.Deitel . who can tell me where can I find some
inte
[EMAIL PROTECTED] a écrit :
I want to know which compiler I can use ... thank you
To compile what ? Python code ? The compiler is in the standard lib.
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden a écrit :
(snip)
So, for example, your program might look like this:
base_price = int(raw_input(...))
tax_rate = int(raw_input(...)
tax_amount = base_price * ((100+tax_amount)/...)
s/(100+tax_amount)/(100 + tax_rate)/, I guess ?
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Bickett a écrit :
I was reading the "Pickling and inheritance are making me hurt"
thread, and the latest suggestion (as of this posting) was to do with
the __setstate__ and __getstate__ methods. They caught my attention
because I hadn't encountered them before, and it reminded me that in
the
Fuzzyman a écrit :
> Hello,
>
> To create a classic (old style) class, I write :
>
> class foo:
> pass
>
> To do the equivalent as a new style class, I write :
>
> class foo(object):
> pass
>
> *Should* I in fact write :
>
> class foo(object):
> def __init__(self, *args, **kwargs)
Nick Mountford a écrit :
> Hi,
>
> Complete newb to Python and programming, looking for an open source
> IDE to download. Any suggestions?
Use something simple. Start with Idle (it comes with Python, and has all
the basic features you may need to learn Python). When you'll have learn
the bases,
MooMaster a écrit :
(snip)
> I'd like to write a program that I can pass a path to
> (say: My Pictures) and at a timer interval will pick a picture from it
> and set my wallpaper to that" So I started reading about os, threads,
> and the path for the special folders
What's a "special folder" ???
Tom Anderson a écrit :
> Comrades,
>
> During our current discussion of the fate of functional constructs in
> python, someone brought up Guido's bull on the matter:
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=98196
>
> He says he's going to dispose of map, filter, reduce and lambda.
Stian Søiland a écrit :
>
(snip)
> Hey, I know!
>
> t = python.util.ImmutableArrayList.fromCollection(L.getAbstractCollection())
>
> python.util.functional.applyFunctionOnCollection(
> (class implements python.util.functional.AnonymousFunction:
> def anonymousFunction(x):
>
[EMAIL PROTECTED] a écrit :
> My shot would be to test it like this on your platform like this:
>
> #!/usr/bin/env python
> import datetime, time
Why not use the timeit module instead ?
> t1 = datetime.datetime.now()
> for i in [str(x) for x in range(100)]:
A bigger range (at least 10/100x mor
Grant Edwards a écrit :
> On 2005-07-09, Brian <[EMAIL PROTECTED]> wrote:
>
>
>>>folks as an easily acquired extra skill.
>>
>>I agree 100% with your statement above. Python may not be sufficient
>>for being the only programming language that one needs to know -- yet,
>>it does come in VERY ha
Jorey Bump a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
>
>
>>Grant Edwards a écrit :
>>
>>>On 2005-07-09, Brian <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>
>>>>>f
rh0dium a écrit :
> Hi all,
>
> I believe I am having a fundamental problem with my class and I can't
> seem to figure out what I am doing wrong. Basically I want a class
> which can do several specific ldap queries. So in my code I would have
> multiple searches. But I can't figure out how to
rh0dium a écrit :
> Hi
>
> I really like your approach but when do you actually get connected??
> You never call the method connect?
oops :(
(snip whole code)
>>if __name__ == '__main__':
>> truc = NSCLdap()
truc.connect() # was missing
>> truc.search()
>
BTW, you'd better let
Unknown a écrit :
> Python 2.4
> Linux kernel 2.6.12
>
> Hi,
>
> 1. How do I make the following statement to search for all Strings I
> input from console?
>
> for example, with the code below I need to enter %hello world% (yeah,
> including the % symbols) to find all entries for hello world on
[EMAIL PROTECTED] a écrit :
> Hey,
>
> I am trying to write a function that takes an arbitrary number of
> arguments and does one of two things. If the variable is a key in a
> dictionary, it prints the key and its value. Otherwise, if any of the
> variables isn't in the dictionary, the function
Ric Deez a écrit :
> Hi there,
>
> I have a list:
> L1 = [1,1,1,2,2,3]
>
> How can I easily turn this into a list of tuples where the first element
> is the list element and the second is the number of times it occurs in
> the list (I think that this is referred to as a histogram):
>
> i.e.:
>
Tzanko Tzanev a écrit :
> hi :)
> I need some help for this script
> I have
please take care of indentation when posting code.
>
> cursor = conn.cursor()
> cursor.execute("select * from playlist limit 5")
> result = cursor.fetchall()
> # iterate through resultset
> playlist_t
Thanos Tsouanas a écrit :
> Hello.
>
> I would like to have a quick way to create dicts from object, so that a
> call to foo['bar'] would return obj.bar.
>
> The following works, but I would prefer to use a built-in way if one
> exists. Is there one?
>
> Thanks in advance.
>
> class dictobj(di
Rob Cowie a écrit :
> Hi,
>
> I need to create a planner/calendar system using python cgi scripts. It
> is my first CGI app (beyond a few tutorial examples).
>
(snip)
You may want to have a look at the cgi_app mini-framework:
-> http://thraxil.org/code/cgi_app/
It's a port of a Perl framework,
Thanos Tsouanas a écrit :
> On Sat, Jul 23, 2005 at 12:06:57PM +0200, Paolino wrote:
>
>>use getattr(self.obj,key) possibly, as __getattribute__ gets total
>>control on attribute access
>
>
> Thanks, but what do you mean by 'total control'?
__getattribute__ is really some kind of an evil blac
Luis P. Mendes a écrit :
(snip)
> I need to build it from the server and also client side.
>
> For the client side I'll be using Python.
>
> But for the server side, I would like to hear some opinions. Is it worth
> learning Php?
I dont think so - unless you have no other choice !-)
More ser
[EMAIL PROTECTED] a écrit :
> Hi all,
> is it possible to enter an interactive session and automatically
> do some initialization?
> I explain better:
> I want that when I start interactive Python on a console (I use Linux)
> two command lines be executed automatically:
[EMAIL PROTECTED] bruno $ p
Thanos Tsouanas a écrit :
> On Sun, Jul 24, 2005 at 01:43:43PM +1000, Steven D'Aprano wrote:
(snip)
>
>>Why jump through all those hoops to get attributes when Python already
>>provides indexing and attribute grabbing machinery that work well? Why do
>>you bother to subclass dict, only to mangle
Bruno Desthuilliers a écrit :
(snip)
> class Wrapper(object):
> def __init__(self, obj):
> self._obj = obj
> def __getitem__(self, name):
> return getattr(self._obj, name)
If you want the Wrapper to be more like a Decorator (ie still can use
the Wrapper
Steven D'Aprano a écrit :
> On Sun, 24 Jul 2005 02:09:54 +0300, Thanos Tsouanas wrote:
>
>
(snip)
>
> Are you telling me that the ONLY thing you use dictobj objects for is to
> print them?
>
> I don't think so. I do know how to print an object, amazingly.
>
> Perhaps you would like to explain
Thanos Tsouanas a écrit :
>>On Sat, 23 Jul 2005 11:48:27 +0300, Thanos Tsouanas wrote:
>>
>>>Hello.
>>>
>>>I would like to have a quick way to create dicts from object, so that a
>>>call to foo['bar'] would return obj.bar.
>>
(snip)
> print foo %do
>
> where do is a dictobj object...
I gave you
Steven D'Aprano a écrit :
> On Sun, 24 Jul 2005 12:03:47 +0300, Thanos Tsouanas wrote:
>>
>>Please, tell me, how would you print it in my case?
>
> If I have understood you, you have some object like such:
>
> obj.foo = 1
> obj.bar = 2
> obj.spam = 'a'
> obj.eggs = 'b'
>
> say.
>
> You want to
Steven D'Aprano a écrit :
> On Sun, 24 Jul 2005 12:07:02 +0300, Thanos Tsouanas wrote:
>>
>>>Thanos Tsouanas wrote:
>>>
(snip)
>>I didn't know about it, but I knew about object.__dict__ which is, as I
>>see equivalent with vars(object). But it doesn't do the job for me,
>>since it fails to grab al
*Grandmaster* Steven Bethard a écrit :
>
> How about something like:
> dict((name, getattr(obj, name)) for name in dir(obj))
>
...
voiceless-ly'rs
--
http://mail.python.org/mailman/listinfo/python-list
David a écrit :
> I've looked all over the place for an answer, and the only one I can
> find doesn't mean anything to me. The end of line issue with writting
> it in Windows and then uploading it doesn't help me since I'm doing
> this all from Linux. I've been trying to get python cgi scripts to
>
Caleb Hattingh a écrit :
> Peter
>
> To my mind, this kind of setup (interface class, or abstact class
are two different things.
>) is
> more usually used in static languages
True.
>to benefit polymorphism
This is a good reason to use an interface in Java. C++ has no notion of
'interfac
Michael Rybak a écrit :
(snip)
>
> Is there a way of profiling other than manual (debug output with
> measurements and all)? Some tools?
http://docs.python.org/lib/profile.html
HTH
--
http://mail.python.org/mailman/listinfo/python-list
Szabolcs Nagy a écrit :
> you cannot use | with two dict (dict has no .__or__ method)
>
> what are you trying to do?
>
read the post: "need help with python syntax"...
(posted one hour sooner)
--
http://mail.python.org/mailman/listinfo/python-list
yaffa a écrit :
> hey folks i get this error: Python interpreter error: unsupported
> operand type(s) for |:
>
> when i run this line of code:
>
> for incident in bs('tr', {'bgcolor' : '#ee'} | {'bgcolor' :
> 'white'} ):
>
> any idea what i'm doing wrong here?
yes: trying to do a bitwis
yaffa a écrit :
> dear python gurus,
One effectively needs to have some guru-powers to answer you question...
> quick question on syntax.
>
> i have a line of code like this
>
> for incident in bs('tr', {'bgcolor' : '#ee'}):
>
>
> what i want it to do is look
Where ?
> for 'bgcolor' :
John Machin a écrit :
> bruno modulix wrote:
>
(snip)
>>
>> Nope. But since you're running this on a very peculiar OS, I just can
>> guess that this very peculiar OS consider all args to be one same
>> string...
>
>
> NOT SO:
Your cap key got stuck ?
(snip)
> For *any* OS: More than one CLI
could ildg a écrit :
> Thank you.
> But what should I do if there are more than one hello and I only want
> to extract what's before the first "hello".
Read The Fine Manual ?-)
> For example, the raw
> string is "hi, how are you? hello I'm fine, thank you hello. that's it
> hello", I want to ex
Talin a écrit :
(snip)
> 2) Is there an easy way to determine if a given object has a callable
> method named "unify"?
if callable(getattr(obj, 'unify', None)):
# obj.unify exists and is callable
Br
--
http://mail.python.org/mailman/listinfo/python-list
Mike C. Fletcher a écrit :
> bruno modulix wrote:
>
>> Mike C. Fletcher wrote:
>> (snip)
>>
>>
>>> Though the don't go into extreme detail on decorators (they are
>>> basically syntactic sugar for a particular type of descriptor).
>>>
>>>
>>
>> Err... Could you elaborate on this ? Decorators
km a écrit :
> Hi all,
>
> ya i am sorry i tried with an empty loop first and then one which emits a
> value as the snippet. I have tested it on my machine and now ...
>
> 1) perl (v 5.8) does the job in 0.005 seconds
> 2) but python (v 2.4.1) is horribly slow its 0.61 seconds.
> and using ran
DENG a écrit :
> hi all,
>
> i use SGMLParser to process HTML files, in order to do some
> optimizations,
>
> something like this:
>
> TEXT1TEXT2
>
> optimise to
>
> TEXT1TEXT2
Doesn't Tidy do this already ?
>
> at the very beginning, i was thinking of analysing each text-block, to
> know t
Kevin Little a écrit :
Oops, sorry, forgot to answer
> '''
> I want to dynamically add or replace bound methods in a class.
(snip)
> Is there a more pythonic way that's as straight forward?
What's wrong with:
class Foo:
pass
def method(self):
print "%s" % self
f = Foo()
Foo.method = me
BBands a écrit :
(snip)
> class master:
> def __init__(self, list):
Don't use 'list' as an identifier, it will shadow the builtin list type.
--
http://mail.python.org/mailman/listinfo/python-list
Ksenia Marasanova a écrit :
> 2005/9/8, Sokolov Yura <[EMAIL PROTECTED]>:
>
>>Django Model is wonderfull. But SQLObject more flexible (and powerfull,
>>as i think, and has already more db interfaces).
>>But Django Model is tied with Django, and using Django with another OO
>>mapping is not comfort
Stefano Masini a écrit :
(snip)
> If such a "quick and dirty" section existed, I think it would also
> become a natural randevouz point for innovators.
s/randevouz/rendez-vous/ !-)
pardon-my-french-ly y'rs
--
http://mail.python.org/mailman/listinfo/python-list
Frank Millman a écrit :
> bruno modulix wrote:
>
>>Frank Millman wrote:
>>
>>>Hi all
>>>
>>>I am writing a multi-user accounting/business system. Data is stored in
>>>a database (PostgreSQL on Linux, SQL Server on Windows). I have written
>>>a Python program to run on the client, which uses wxPyth
Jerzy Karczmarczuk a écrit :
> Gurus,
No guru answered, so you'll have to bear with me...
> before I am tempted to signal this as a bug, perhaps
> you might convince me that it should be so. If I type
>
> l=range(4)
> l.extend([1,2])
>
> l gives [0,1,2,3,1,2], what else...
>
> On the other h
Laszlo Zsolt Nagy a écrit :
>
>> is the doc writer, trying to write the doc with some austereness, but
>> is confused about the behavior of split, or confused about expressing
>> it? Did his pretension fucked him up?
>>
>>
> Dear Xah Lee,
>
> The Python community is very sorry because we have a
beza1e1 a écrit :
> I see myself shifting more and more over to the functional kind of
> coding. Could be related to the Haskell, we had to learn in CS. Now i
> was wondering, how other people use Python?
>
> With functional i mean my files mostly consist of functions
which is not enough to make
chand a écrit :
> Hi.,
>
> In my api.py file 'g_opt_list' is defined globally
> g_opt_list =[[],[],[],[],[],[],[]]
>
> when I run the py file, I am getting the Following Error
>
> SyntaxWarning: name 'g_opt_list' is used prior to global declaration
> SyntaxWarning: name 'layers' is used prior to
York a écrit :
(snip)
> I love python. However, as a biologist, I like some high-levels
> functions in R. I don't want to spend my time on parse a data file.
http://www.python.org/doc/current/lib/module-csv.html
> Then
> in my python script, I call R to read data file and write them into an
>
Jim a écrit :
Where did this type of structure come from:
mat = ['a' for i in range(3)]?
This will produce a list of three elements but
I don't see reference for it in any of the books.
Now everyone told you *what* is it, I'll (very very dumbly) answer the
question : this syntax comes from Has
administrata a écrit :
Hi! it's been about a week learning python!
I've read 'python programming for the absolute begginer'
I don't understand about % like...
107 % 4 = 3
7 % 3 = 1
it's the modulo operator (if you don't remember, the modulo is the
remaining of the integer division, ie 5 % 2 = 1)
Duncan Booth a écrit :
BOOGIEMAN wrote:
(snip)
Secondly, how do I clear screen (cls) from text and other
content ?
That depends on your computer, and how you are running your program.
One way which *might* work is:
import os
os.system("cls")
*might* work... !-)
[EMAIL PROTECTED] modulix $ cl
Grant Edwards a écrit :
On 2005-02-10, BOOGIEMAN <[EMAIL PROTECTED]> wrote:
First of all, what's Python command equivalent to QBasic's "goto" ?
There isn't one.
One defines functions and calls them. One uses for and while
loops. One uses list comprehensions. One uses if/elif/else.
and even s
jfj a écrit :
bruno modulix wrote:
Ilias Lazaridis wrote:
I'm a newcomer to python:
[EVALUATION] - E01: The Java Failure - May Python Helps?
http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553
My trollometer's beeping...
When person 'A' calls person 'B' a troll, these are t
Stephen Kellett a écrit :
In message <[EMAIL PROTECTED]>, Simon
Brunning <[EMAIL PROTECTED]> writes
On Mon, 14 Feb 2005 14:12:57 +0100, bruno modulix <[EMAIL PROTECTED]> wrote:
Why do you hate Perl and Ruby community that much ?
Oh, I don't. But fair's fair - we've carried our share of the burden,
Kenneth McDonald a écrit :
In article <[EMAIL PROTECTED]>, aurora <[EMAIL PROTECTED]> wrote:
What are the win 32 modules? Searching "OS X win 32" on Google gave me a bit
too much...
I guess Aurora did not took time to read your whole post. Win32 modules
are for Windows, of course...
--
http://mail
snacktime a écrit :
The primary question is how do I perform a match when the regular
expression contains string variables? For example, in the following
code I want to match a line that starts with STX, then has any number
of characters, then ends with STX.
Example 2 I'm pretty sure works as I ex
1 - 100 of 3705 matches
Mail list logo