Antoon Pardon wrote:
On 2006-08-28, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Antoon Pardon wrote:
There seem to be enough problems that work with ints but not with
floats. In such a case enforcing that the number you work with
is indeed an int seems fully appropiate.
I've _never_
groves wrote:
Can anybody give me an example of how to import a function of module X
in module y. And please if yu can use classes(Object oriented approach)
would be great.
The problem is that I have created a text on canvas, and now I want
that whenever a user right clicks on it, the option
ishtar2020 wrote:
Hi everyone
I'm sure this question is kinda stupid and has been answered a few
times before... but I need your help!
I'm writing a small application where the user can analyze some text
based on a set of changing conditions , and right now I'm stuck on a
point where I'd
rdrink wrote:
n.n.h. (noob needs help)
Ok, I've been beating my head against this for a day... time to ask
others.
To explain things as simply as possible:
I am trying to use eval() to evaluate some simple equations, such as--
pow(AB,2)
pow(AB,2)+A
pow(A+B,2)
pow(A+B,2)+A
and so forth...
pycraze wrote:
I would like to ask a question. How do one handle the exception due to
Segmentation fault due to Python ? Our bit operations and arithmetic
manipulations are written in C and to some of our testcases we
experiance Segmentation fault from the python libraries.
If i know how to
Paul Rubin wrote:
EP [EMAIL PROTECTED] writes:
Given that I am looking for matches of all files against all other
files (of similar length) is there a better bet than using re.search?
The initial application concerns files in the 1,000's, and I could use
a good solution for a number of
groves wrote:
hi
I am trying to get a roll over effect on my canvas.(this is a virtual
program which will eventually fit into my final program)
Exactly i have a text on my screen and I want to have a brief
discription across it whenever the user takes the mouse on it n hence
giving
Anastasios Hatzis wrote:
Hi folks,
how can I prevent Python from adding or using *.pyc files if executing a
Python module? I have the strong feeling that the interpreter uses
out-dated pyc file instead more recent py files. At least I already had
some cases where application behaviour
groves wrote:
Simon Forman wrote:
groves wrote:
hi
I am trying to get a roll over effect on my canvas.(this is a virtual
program which will eventually fit into my final program)
Exactly i have a text on my screen and I want to have a brief
discription across it whenever
groves wrote:
Sorry, as I am new to python so couldn't understand what yu were
asking.
Now the problem is that i annot use pmw in my project..is thre anyother
alternative by which I can have a rollover mouse effect on the canvas.
thanks
Not a problem. Although IDE and GUI are terms that are
SuperHik wrote:
groves wrote:
Simon Forman wrote:
groves wrote:
Sorry, as I am new to python so couldn't understand what yu were
asking.
Now the problem is that i annot use pmw in my project..is thre anyother
alternative by which I can have a rollover mouse effect on the canvas
Fred C. Dobbs wrote:
I feel like an idiot. I'm going thru Dive Into Python and running the
first program - odbchelper.py
My output is pwd=secret;database=master;uid=sa;server=mpilgrim which
has all the substrings reversed from the output documented in the book.
I've run the downloaded code
[EMAIL PROTECTED] wrote:
Gabriel Genellina wrote:
At Friday 25/8/2006 00:36, [EMAIL PROTECTED] wrote:
# This is what I have in mind:
class Item(object):
def __add__(self, other):
return Add(self, other)
And this works fine... why make thinks complicated?
Yes, I agree
[EMAIL PROTECTED] wrote:
Simon Forman wrote:
Item.__add__ = Add is a very strange thing to do, I'm not surprised
it didn't work.
Yes it is strange.
I also tried this even stranger thing:
class Item(object):
class __add__(object):
def __init__(self, a, b=None):
print
asincero wrote:
Would it be considered good form to begin every method or function with
a bunch of asserts checking to see if the parameters are of the correct
type (in addition to seeing if they meet other kinds of precondition
constraints)? Like:
def foo(a, b, c, d):
assert
[EMAIL PROTECTED] wrote:
lets say you want a generic numerical algorithom like sum
Ruby
def sum lst
lst.inject(0){|total,current| total*current}
end
Java // i dont know if there is a numeric super class for numbers
class Sum{
public static int sum(int[] lst){
int total = 0;
Bucco wrote:
Simon Forman wrote:
1) Don't use dir, file, and list as variable names, those are
already python built in objects (the dir() function, list type, and
file type, respectively.)
Thanks. My own stupidity on this one.
2) 'r' is the default for open(), omit it. self.flist
Hendrik van Rooyen wrote:
Simon Forman [EMAIL PROTECTED] wrote:
8-
| BTW, speaking of strictness, more stricter is invalid English,
| just stricter is the correct form. ;-)
or alternatively the construct more strict is also
[EMAIL PROTECTED] wrote:
What was i thinkinng repace * with + i was'nt thinking i origanaly
thaught of sum of squares so i put a * insted of a +
But again, what's your question?
--
http://mail.python.org/mailman/listinfo/python-list
unexpected wrote:
I have a program where based on a specific value from a dictionary, I
call a different function. Currently, I've implemented a bunch of
if..elsif statements to do this, but it's gotten to be over 30 right
now and has gotten rather tedious. Is there a more efficient way to do
Chaz Ginger wrote:
I was writing some code that used someone else class as a subclass. He
wrote me to tell me that using his class as a subclass was incorrect. I
am wondering under what conditions, if ever, does a class using a
subclass not work.
Here is an example. For instance the original
Jason Jiang wrote:
Hi,
Could someone recommend a good Python editor? Thanks.
Jason
There have just been one or two long-ish threads on exactly this
question. Search the google groups version of this group for them.
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
# This is what I have in mind:
class Item(object):
def __add__(self, other):
return Add(self, other)
class Add(Item):
def __init__(self, a, b):
self.a = a
self.b = b
a = Item()
b = Item()
c = a+b
# Now, I am going absolutely crazy with this
Roman wrote:
I am trying to filter a column in a list of all html tags.
What?
To do that, I have setup the following statement.
row[0] = re.sub(r'.*?', '', row[0])
The results I get are sporatic. Sometimes two tags are removed.
Sometimes 1 tag is removed. Sometimes no tags are removed.
Will McGugan wrote:
Hi folks,
I'm forced to use C++ and STL at work, and consequently miss the ease
of use of Python. I was wondering if there was a C++ library that
implemented the fundamental objects of Python as close as possible,
perhaps using STL underneath the hood.
Too clarify, Im
MooMaster wrote:
I'm trying to develop a little script that does some string
manipulation. I have some few hundred strings that currently look like
this:
cond(a,b,c)
and I want them to look like this:
cond(c,a,b)
but it gets a little more complicated because the conds themselves may
Jason Jiang wrote:
Hi,
I have two modules: a.py and b.py. In a.py, I have a function called
aFunc(). I'm calling aFunc() from b.py (of course I import module a first).
The question is how to directly set a breakpoint in aFunc().
The way I'm doing now is to set a breakpoint in b.py at the
Jason Jiang wrote:
Simon Forman [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Jason Jiang wrote:
Hi,
I have two modules: a.py and b.py. In a.py, I have a function called
aFunc(). I'm calling aFunc() from b.py (of course I import module a
first).
The question is how
KraftDiner wrote:
What is the range of a variable of type int()
eg:
i = int()
print i.max() # 0x
print i.min() # 0x
is it a signed 16 bit or 32 bit or is it unsigned 16 or 32...
I've noticed that it can be incremented into a new class of type
long...
| import sys
|
Tim wrote:
I ran into a problem with a script i was playing with to check code
indents and need some direction. It seems to depend on if tabsize is
set to 4 in editor and spaces and tabs indents are mixed on consecutive
lines. Works fine when editors tabsize was 8 regardless if indents are
Larry Bates wrote:
Jason Jiang wrote:
Hi,
How to get the name of the running .py file like the macro _FILE_ in C?
Thanks.
Jason
import os
import sys
print sys.argv[0]
or if you just want the script and not the full path
print os.path.basename(sys.argv[0])
-Larry Bates
Jason Jiang wrote:
Great! It's working now. Thank you so much.
Jason
You're welcome, it's a pleasure! :-D
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
Jiang Nutao wrote:
Hi,
I simplify my problem like below
To convert list
aa = [0x12, 0x34, 0x56, 0x78]
into
[0x34, 0x12, 0x78, 0x56]
How to do it fast? My real list is huge.
Thanks a lot.
Jason
Here's simple and probably fast enough way (but it won't work right on
odd length
Or you can use the has_key() and test it first. For example
if foo.has_key('bar'):
print 'we have it'
else :
print 'we don't have bar.'
Nowadays you can also say:
if 'bar' in foo:
# do something
--
http://mail.python.org/mailman/listinfo/python-list
eltower wrote:
Hey all,
I'm trying to write a program in Python for learning purposes which is
meant to:
Generate a random number from 0 to 6
Insert this random number to the end of a list unless the number is
already there
finish with a len(list) = 7
so far, I have this:
import
[EMAIL PROTECTED] wrote:
The python tutorial says
When the script name is given as '-' (meaning standard input),
sys.argv[0] is set to '-'. When -c command is used, sys.argv[0] is
set to '-c'. but when we use a command say 'python -c command'
where can we access sys.argv (are there some
Bucco wrote:
I am trying to compare a list of items to the list of files generated
by os.listdir. I am having trouble getting this to work and think I
may be going down the wrong path. Please let me know if hter is a
better way to do this. THis is what I have for my class so far:
import
OriginalBrownster wrote:
Hi there:
I just had a quick thought of something that might be useful to me when
creating my web app and I wanted some help on the idea; since this
group has been helpful in the past.
in my app I have a few html forms that require the user to enter in
data, in
John Salerno wrote:
Ok, I know it's been asked a million times, but I have a more specific
question so hopefully this won't be just the same old post. I've tried a
few different editors, and I really like UltraEdit, but it's
Windows-only and I'm working more on Linux nowadays.
Here are my
Paul Rubin wrote:
Simon Forman [EMAIL PROTECTED] writes:
Have you tried IDLE? It ships with python, meets your 5 criteria(*),
can be customized (highlighting colors and command keys and more), and
includes a usable GUI debugger. It's got some warts, but I like it a
lot, it's pretty much
Fuzzydave wrote:
I have been using a round command in a few places to round
a value to zero decimal places using the following format,
round('+value+', 0)
but this consistantly returns the rounded result of the value
to one decimal place with a zero
EG:
4.97 is returned as 5.0 when i
Pradeep wrote:
Hi friends,
We are changing the python application from Unix to Windows. The source
code of Python application should work well in windows. How to make
changed to windows environment.
In Python code we have login module, ftp, socket programming.
Please help in changing the
Pupeno wrote:
Hello,
I am experiencing a weird behavior that is driving me crazy. I have module
called Sensors containing, among other things:
class Manager:
def getStatus(self):
print getStatus(self=%s) % self
return {a: b, c: d}
and then I have another module called
Sybren Stuvel wrote:
Dan Bishop enlightened us with:
a = b = 1e1000 / 1e1000
a is b
True
a == b
False
If a is b then they refer to the same object, hence a == b. It
cannot be otherwise, unless Python starts to defy logic. I copied your
code and got the expected result:
a = b =
Alexandre Guimond wrote:
thx for all the help simon. good ideas i can work with.
thx again.
alex.
You're very welcome, a pleasure. ;-)
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
Simon Forman wrote:
| class f:
... def __init__(self):
... del self
Of course nothing happens. Args are local variables. 'self' is is a
vanilla arg of a vanilla function.
I know.
...
| e = f()
| e
__main__.f instance at 0xb7dd91ec
Hitesh wrote:
Hi,
In python doc -- 4.1.4 Deprecated string functions -- I read that The
following list of functions are also defined as methods of string and
Unicode objects; see ``String Methods'' (section 2.3.6) for more
information on those. You should consider these functions as
KraftDiner wrote:
Fredrik Lundh wrote:
KraftDiner wrote:
This is not working the way I think it should
it would appear that fromfile and getName are calling the baseClass
methods which are
simple passes What have I done wrong?
class baseClass:
def __init__(self,
Jason Nordwick wrote:
I'm using MySQLdb and can connect and issue queries that return result sets,
but I how do I get the column names for those result sets?
c = MySQLdb.connect(*creds)
k = c.cursor()
k.execute(select * from account)
3L
k.fetchall()
((1L, 'test', -1L), (2L, 'Test',
fuzzylollipop wrote:
I want to do email address format validations, without turning to ANTLR
or pyparsing, anyone know of a regex that is COMPLIANT with RFC 821.
Most of the ones I have found from google searches are not really as
robust as I need them to be.
Would email.Utils.parseaddr() fit
Zeph wrote:
Python
Pros: Free. Open source. Deep. Flexible. Rich community and third party
stuff. Well documented.
Cons: Interpreted.
Unknown: Secure (meaning not easily reverse engineered) code? Performance?
Very recent thread on this subject:
Alexandre Guimond wrote:
Hi all,
i'm trying to deepcopy a slice object but i get the following error.
Does anyone know a workaround?
ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on
Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)]
on win32
Type help,
going to 3D and 4D grid, and its somewhat annoying
to carry so many indices in my class definition.
Simon Forman wrote:
Alexandre Guimond wrote:
Hi all,
i'm trying to deepcopy a slice object but i get the following error.
Does anyone know a workaround?
ActivePython 2.4.3
Duncan Booth wrote:
Simon Forman wrote:
Why would you want to [deep]copy a slice object?
I would guess the original poster actually wanted to copy a data structure
which includes a slice object somewhere within it. That is a perfectly
reasonable albeit somewhat unusual thing to want
cga2000 wrote:
On Tue, Aug 08, 2006 at 12:22:42PM EDT, Simon Forman wrote:
John Salerno wrote:
[EMAIL PROTECTED] wrote:
John Aside from the normal commands you can use, I was wondering if
John it's possible to use Python from the terminal instead of the
John normal
[EMAIL PROTECTED] wrote:
| would use a recursive approach for this - given that you have a sort
of recursive datastructure:
py def SetNewDataParam2(Data, NewData):
... if type(Data[Data.keys()[0]]) == type(dict()):
Note:
| type(dict()) is dict
True
dict *is* a type...
--
tobiah wrote:
I should have made it more clear that Foo is a class:
class Foo:
def __init__(self, *args):
for arg in args:
if is_fruit(arg):
del(self)
tobiah wrote:
Suppose I do:
myfoo = Foo('grapes',
Kairo Matthias wrote:
How can i encode with yEnc?
What's yEnc? :-)
Seriously though, did you try googling for yEnc python?
Peace,
~Simon
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Some basic syntax such as
print hello world
is going away to make print look like a function. IMO, fixing what is
not broken because of the aesthetic tastes of the BDFL is a bad idea.
His reasoning is at
unexpected wrote:
If have a list from 1 to 100, what's the easiest, most elegant way to
print them out, so that there are only n elements per line.
So if n=5, the printed list would look like:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
etc.
My search through the previous posts yields methods
John Machin wrote:
Steven D'Aprano wrote:
I think it's possible to
hack it up using while loops and some ugly slicing, but hopefully I'm
missing something
I don't see why you think that's an ugly hack.
def printitems(sequence, count=5):
Print count items of sequence per
John Salerno wrote:
Yu-Xi Lim wrote:
I assume you're using a Debian-based distro with aptitude as the front
end. In which case, all dpkg operations should be logged in
/var/log/dpkg.log
Yes, I'm using Ubuntu. But I checked this log file and I'm a bit
confused. It has a lot of listings
John Salerno wrote:
Simon Forman wrote:
It's simple, short, and to-the-point. The equivalent python script
would be much longer, for no appreciable gain. I write most of my tiny
little helper scripts in python, but in this case, bash is the clear
winnar. (And on *nix. man pages
Yi Xing wrote:
On a related question: how do I initialize a list or an array with a
pre-specified number of elements, something like
int p[100] in C? I can do append() for 100 times but this looks silly...
Thanks.
Yi Xing
You seldom need to do that in python, but it's easy enough:
AndrewTK wrote:
Simon Forman wrote:
So I'm guessing it's something wrong in your java server.
Thanks then. I'll keep testing then... Although I don't seem to have
netcat on my unit...
I'm using a uni computer so I can't install stuff... but I'm guessing
what I wrote is something like
MaaSTaaR wrote:
Hello ...
firstly , sorry for my bad English .
i have problem with open() function when i use it with file which name
in Arabic , the open() will not find the file , and i am sure the file
is exist .
so how i can solve this problem ?
On this page
mike_wilson1333 wrote:
I would like to generate every unique combination of numbers 1-5 in a 5
digit number and follow each combo with a newline. So i'm looking at
generating combinations such as: (12345) , (12235), (4) and so on.
What would be the best way to do this? So, basically i'm
Stargaming wrote:
Stargaming schrieb:
mike_wilson1333 schrieb:
I would like to generate every unique combination of numbers 1-5 in a 5
digit number and follow each combo with a newline. So i'm looking at
generating combinations such as: (12345) , (12235), (4) and so on.
What
[EMAIL PROTECTED] wrote:
I was looking for a simple way to load a simple python program from
another python program.
I tried
os.system(cabel)
The file name is cabel.py a csound instrument editor..
The error I am getting is
Traceback (most recent call last):
File
[EMAIL PROTECTED] wrote:
Dustan wrote:
To see the full traceback, assuming you're using windows, you need to
run it on the Command prompt.
Hi Dustan:
Here's the traceback:
C:\docs\PythonSylloSolver.py
File C:\docs\Python\SylloSolver.py, line
^
IndentationError:
alf wrote:
Simon Forman wrote:
| I = ([n] for n in i)
This is nice but I am iterating thru hude objects (like MBs) so you know ...
No, I don't know... :-)
potentially my source lists are huge - so wanted to avoid unnecessary
memory allocation
My friend, I think you've
AndrewTK wrote:
I'm assuming that your server waits to receive the word 'hello' before
replying with the three strings (first, second, and third)? So once your
Nope - actually it's a threaded server, with the main thread simply
dumping network input to the console and command line input
f pemberton wrote:
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], f pemberton
wrote:
I've tried using replace but its not working for me.
xdata.replace('abcdef', 'highway')
xdata.replace('defgef', 'news')
xdata.replace('effwer', 'monitor')
`replace()` does not work in
Anton81 wrote:
Hi!
it seems that
class Obj:
def __init__(self):
f=file(obj.dat)
self=pickle.load(f)
...
doesn't work. Can an object load itself with pickle from a file somehow?
What's an easy solution?
Anton
Why are you trying to do this?
Simon Forman wrote:
f pemberton wrote:
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED], f pemberton
wrote:
I've tried using replace but its not working for me.
xdata.replace('abcdef', 'highway')
xdata.replace('defgef', 'news')
xdata.replace('effwer', 'monitor
| platform.platform()
'Linux-2.6.15-26-386-i686-with-debian-testing-unstable'
| platform.uname()
('Linux', 'garbage', '2.6.15-26-386', '#1 PREEMPT Thu Aug 3 02:52:00
UTC 2006', 'i686', '')
Ubuntu 6.06 LTS - the Dapper Drake - released in June 2006.
[EMAIL PROTECTED]:~ $ cat /proc/cpuinfo
John Machin wrote:
alf wrote:
Hi,
I have a following task: let's say I do have an iterator returning the
some objects:
i=iterator
i.next()
1
i.next()
'abgfdgdfg'
i.next()
some object
For some reason I need to wrap thos objects with a list. I thought I
could
alf wrote:
Simon Forman wrote:
class LW(object): # ListWrapper
... def __init__(self, i):
... self.theiter = i
... def next(self):
... return [self.theiter.next()]
I hoped one lamda would take care of it but looks like it is a simplest
choice.
| I = ([n] for n
Michiel Sikma wrote:
Op 10-aug-2006, om 13:00 heeft Tim Golden het volgende geschreven:
Michiel Sikma wrote:
Hello everybody,
I was thinking about making a really insignificant addition to an
online system that I'm making using Python: namely, I would like it
to print the platform
OriginalBrownster wrote:
Hi there:
I was wondering if its at all possible to search through a string for a
specific character.
I want to search through a string backwords and find the last
period/comma, then take everything after that period/comma
Example
If i had a list:bread,
AndrewTK wrote:
Hello,
I'm trying to read data from a socket and I'm not seeing what I'm
expecting it seems to skip the first line of data. I am new to
Python and just trying to test what I can do with it... and it's not
looking pretty.
I have some Python code:
zxo102 wrote:
Hi everyone,
I have tried two days to figure out how to draw the image in
wx.BufferedDC on the page created by AddPage of wx.Notebook but still
got no clue.
The attached example works fine. If I click the menu Draw -- New
Drawing. The image with
bruce wrote:
hi...
i'm playing with a test sample. i have somethhing like:
dog = mysql_get(.)
.
.
.
such that 'dog' will be an 'AxB' array of data from the tbls
What's an 'AxB' array, do you mean a list of lists? If not, what
kind of object do you mean and what methods does it
GHUM wrote:
I have found a make a icon in traybar skript, and it loads its Icon
from a file
hinst = win32gui.GetModuleHandle(None)
iconPathName= c:/myapp/myapp.ico
icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE
hicon = win32gui.LoadImage(hinst, str(iconPathName),
John Salerno wrote:
Simon Forman wrote:
What about the version I gave you 8 days ago? ;-)
http://groups.google.ca/group/comp.lang.python/msg/a80fcd8932b0733a
It's clean, does the job, and doesn't have any extra nesting.
Peace,
~Simon
I remember that version, but I found
Chris wrote:
I want to handle errors for a program i'm building in a specific way,
but I don't want to use try/except/finally because it requires forming
new blocks of code. I want to be able things like this:
a = [2, 423, brownie, 234.34]
try: a[890]
except IndexError: # I don't use
Slawomir Nowaczyk wrote:
On Thu, 10 Aug 2006 11:39:41 -0700
f pemberton [EMAIL PROTECTED] wrote:
# I have kind of an interesting string, it looks like a couple hundred
# letters bunched together with no spaces. Anyway, i'm trying to put a
# ? and a (\n) newline after every 100th character
Bayazee wrote:
hi
in compiled languages when we compile a code to an executable file it
convert to a machine code so now we cant access to source ...
It can still be disassembled and reverse engineered.
but in python we easily open the program executable(ascii) file and
read source
i
Yannick wrote:
Thank you all for the detailled answers.
What I would like to achieve is something like:
# main loop
while True:
for robot in robots:
robot.start()
robot.join(0.2) # wait 200ms
if robot.is_active():
robot.stop()
# run all the
John Salerno wrote:
I'm starting out with this:
try:
if int(text) 0:
return True
else:
self.error_message()
return False
except ValueError:
self.error_message()
return False
I rewrote it as this:
try:
int(text)
except
Chris Lambacher wrote:
On Wed, Aug 09, 2006 at 11:51:19AM -0400, Brendon Towle wrote:
On 9 Aug 2006, at 11:04 AM, Chris Lambacher wrote:
How is your data stored? (site was not loading for me).
In the original source HTML, it's like this (I've deleted all but the
godavemon wrote:
I'm using python's struct and binascii modules to write some values
from my parser to binary floats. This works great for all of my binary
files except one. For some reason this file is saving to 836 (stated
by my command shell) bytes instead of 832 like it should. It
John Salerno wrote:
[EMAIL PROTECTED] wrote:
John Aside from the normal commands you can use, I was wondering if
John it's possible to use Python from the terminal instead of the
John normal bash commands (e.g. print instead of echo).
Take a look at ipython
donkeyboy wrote:
This is probably a really basic question, but anyway ...
I'm new to both Python and OO programming. From looking at a number of
code examples, the word self is used a lot when referring to classes.
As such, what does self mean and/or do? I've read things that say
it's a
Anoop wrote:
Hi All
Hope u all might have come across the string deprecation thought of in
Python 3.0.
For example : string.lower(str) needs to be some thing like
str.lower().
Can some one help me out whether such a change in the common python
would require
string.digits to be changed.
[EMAIL PROTECTED] wrote:
Simon Forman:
It's unlikely to
be deprecated since it doesn't make much sense to make it an attribute
of the str type.
Why?
Thank you,
bearophile
Let me toss the question back at you: Does it make sense to you that
str should have this attribute? Why?
I'm
ds4ff1z wrote:
Hello, i'm looking to find and replace multiple characters in a text
file (test1). I have a bunch of random numbers and i want to replace
each number with a letter (such as replace a 7 with an f and 6 with a
d). I would like a suggestion on an a way to do this. Thanks
[EMAIL PROTECTED] wrote:
hiaips wrote:
[EMAIL PROTECTED] wrote:
I'm new at Python and I need a little advice. Part of the script I'm
trying to write needs to be aware of all the files of a certain
extension in the script's path and all sub-directories. Can someone
set me on
Kevin M wrote:
Figures. I'll try to complicate it sufficiently ;)
[edit] I was going to try to sum up what goes on, but I realized that I
was retyping what I already programmed in an effort to better
illustrate exactly what I'm doing. Pastebin it is. Don't fear, it's
only around 200 lines
Noah wrote:
I have a list of tuples
[('a', 1.0), ('b', 2.0), ('c', 3.0)]
I want to reverse the order of the elements inside the tuples.
[(1.0,'a'), (2.0, 'b'), (3.0, 'c')]
I know I could do this long-form:
q = []
y = [('a', 1.0), ('b', 2.0), ('c', 3.0)]
for i in y:
201 - 300 of 460 matches
Mail list logo