frankie_85 wrote:
> Ok I'm really lost (I'm new to python) how to use the reverse function.
>
>
> I made a little program which basically the a, b, c, d, e which I have
> listed below and basically I want it th result to be printed reverse so
> instead doing "print e, d, c, b, a", I'd like to use t
On Oct 30, 12:42 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote:
> Sachin Punjabi wrote:
> > Hi,
>
> > I wanted to read a file encoded in utf-8 and and using the following
> > syntax in my source which throws me an error specifying Lookuperror :
> > unknown encoding : utf-8. Also I am working on Pyth
Sachin Punjabi wrote:
> The OS is Windows XP
then your installation is seriously broken. where did you get the
installation kit? have you removed stuff from the Lib directory ?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
What sizers do people use to
- contain the notebook control in a Frame and,
- contain the contents of a single page of the notebook.
At the moment Im using a GridBagSizer for both but this seems to be
overkill.
Is a BoxSizer a better option?
Thanks
Chris
--
http://mail.python.org/mailman/l
On Oct 30, 1:29 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Sachin Punjabi wrote:
> > The OS is Windows XPthen your installation is seriously broken. where did
> > you get the
> installation kit? have you removed stuff from the Lib directory ?
>
>
It was already installed on my PC and I h
Sachin Punjabi wrote:
> On Oct 30, 1:29 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> > Sachin Punjabi wrote:
> > > The OS is Windows XPthen your installation is seriously broken. where
> > > did you get the
> > installation kit? have you removed stuff from the Lib directory ?
> >
> >
>
> It
On 2006-10-29, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sun, 29 Oct 2006 00:31:23 -0700, Carl Banks wrote:
>
> That's why (for example) Python allows + to operate on lists, or strings,
> or floats
That was IMO a mistake. There are types for which concatenation as well as
addition are meanin
Fredrik Lundh wrote:
> thebjorn wrote:
>
> > I've got a database (ms sqlserver) that's (way) out of my control,
> > where someone has stored utf-8 encoded Unicode data in regular varchar
> > fields, so that e.g. the string 'Blåbærsyltetøy' is in the database
> > as 'Bl\xc3\xa5b\xc3\xa6rsyltet\xc3\x
> > > Last time I checked PIL was not able to apply
> > > lossless transformations to jpeg images so
> > > I've created Python bindings (or is it a
> > > wrapper? I never knew the difference :)) for
> > > the jpegtran utility of the Independent Jpeg
> > > Group.
>
>
> Why not use Tkinter for jpeg ?
Gerrit Holl wrote:
> Hei,
>
> On 2006-10-30 08:25:41 +0100, thebjorn wrote:
> > def unfk(s):
> > return eval(repr(s)[1:]).decode('utf-8')
> >
...
> > Is there a less hack'ish way to do this?
>
> Slightly lack hackish:
>
> return ''.join(chr(ord(c)) for c in s)
Much less hackish :-)
-- bjo
On Oct 30, 1:54 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote:
> Sachin Punjabi wrote:
> > On Oct 30, 1:29 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> > > Sachin Punjabi wrote:
> > > > The OS is Windows XPthen your installation is seriously broken. where
> > > > did you get the
> > > installati
Sachin Punjabi wrote:
> I installed it again but it makes no difference. It still throws me
> error for LookUp Error: unknown encoding : utf-8.
Most likely you're not using the new python, you're still running old
one.
-- Leo
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 30, 12:47 pm, "thebjorn" <[EMAIL PROTECTED]>
wrote:
> Sachin Punjabi wrote:
> > I wanted to read a file encoded in utf-8 and and using the following
> > syntax in my source which throws me an error specifying Lookuperror :
> > unknown encoding : utf-8. Also I am working on Python version 2
On Oct 30, 2:27 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote:
> Sachin Punjabi wrote:
> > I installed it again but it makes no difference. It still throws me
> > error for LookUp Error: unknown encoding : utf-8.Most likely you're not
> > using the new python, you're still running old
> one.
>
>
Sachin Punjabi wrote:
> I installed the newer version on D drive and it was previously
> installed on C drive. Also the command which bjorn asked me to execute
> on command line worked very much fine.
what happens if you *type* in the problematic statements at the command
line, e.g.
>>> import
I stumbled apon a paragraph in python-dev about "reducing the size of
Python" for an embedded device:
"""
In my experience, the biggest gain can be obtained by dropping the
rarely-used
CJK codecs (for Asian languages). That should sum up to almost 800K
(uncompressed), IIRC.
"""
So, my question is
[EMAIL PROTECTED] wrote:
> If I'm building a function to accept optional parameters, do I need to
> allow for the capture of both the positional arguments as well as the
> keyword arguments?
No.
> If it doesn't make sense to allow keyword arguments,
> can I just write:
>
> def myfunc(a, b, *tup)
MindClass wrote:
> Is possible import a library according to a condition?
>
> if Foo = True:
> import bar
>
Did you even try ? Would have been faster than posting here...
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in '[EMAIL PROTECTED]'
It seems to me that the indices() method for slices is could be
improved. Right now it gives back concrete indices for a range of
length n. That is, it does not return any None values. Using an example
from clpy about this the indices for a 'None, None, -2' slice for a
range of length 10 are given
CSUIDL PROGRAMMEr wrote:
> folks,
> I am new to python.
>
> I have a list made of elements
>
> ['amjad\n', 'kiki\n', 'jijiji\n']
> I am trying to get rid of '\n' after each name.
> to get list as
> ['amjad','kiki','jijiji']
>
> But list does not have a strip function as string does have.
Wha
Frederic Rentsch wrote in news:mailman.1428.1162113628.11739.python-
[EMAIL PROTECTED] in comp.lang.python:
>def increment_time (interval_ms):
> outer weeks, days, hours, minutes, seconds, mseconds # 'outer'
> akin to 'global'
> (...)
> mseconds = new_ms - s * 1000
Here is a brief simple introduction to Python I wrote for a computing course
for graduate astronomers. It assumes some programming experience. Although
it is not a complete guide, I believe this could be a useful document for
other groups to learn Python, so I'm making it available for others to
do
[EMAIL PROTECTED] wrote:
> Is there any reason not to change the behavior of the indices() method
> so it gives indices that can be used in range (to give indices
> corresponding to elements that would be extracted by a given slice)
> *and* used as arguments for slices so that the slice with the n
Ben Finney wrote:
> Alistair King <[EMAIL PROTECTED]> writes:
>
>
>> Ben Finney wrote:
>>
>>> Even better, work on a minimal program to do nothing but reproduce
>>> the unexpected behaviour. If you get to such a program and still
>>> don't understand, then post it here so others can run it
I want to do something very simple:
I want to read a palette image (256 color PNG or BMP for instance), and
then just to output the image data as numbers (palette indexes, I
guess). Makes sense? How do I do that?
/David
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I want to do something very simple:
>
> I want to read a palette image (256 color PNG or BMP for instance), and
> then just to output the image data as numbers (palette indexes, I
> guess).
it's explained in the documentation, of course:
http://effbot.org/imaging
Hi,
The shuf() function returns two values: x and foo.
The command
>>> x,foo,bar=shuf(1,2,3,4,5,6,7,8)
becomes
>>> x,foo,bar=x,foo
So, this command assigns 2 values (x and foo) to 3 variables (x, foo
and bar), which raises that exception. I'm not sure why python says
"need more than 2
values t
Alistair King wrote:
> Is there any other way of removing double and single quotes from a
> number, as a string, to give the float value again?
help(str) describes what you can do with a string (an object of type
'str', that is). among the methods listed, you'll find:
> | strip(...)
> |
walterbyrd wrote:
> I assume that wxWidgets can not be used if all you have is mod-python?
>
Correct. wxPython assumes access to some sort of screen-based interface,
with direct keyboard and mouse input.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd
On Oct 30, 2:27 pm, "Leo Kislov" <[EMAIL PROTECTED]> wrote:
> Sachin Punjabi wrote:
> > I installed it again but it makes no difference. It still throws me
> > error for LookUp Error: unknown encoding : utf-8.Most likely you're not
> > using the new python, you're still running old
> one.
>
>
Jia Lu wrote:
> Hi all
> I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
> , I got an error that there is no Bind.
>
> How can I fix it. thanx
>
Perhaps you could show us the code that's failing, with the traceback -
even better, use the knowledge you have already gained
Hieu Hoang wrote:
> So, this command assigns 2 values (x and foo) to 3 variables (x, foo
> and bar), which raises that exception. I'm not sure why python says
> "need more than 2 values to unpack" not "need 3 values" though.
probably because if you look at the call site
x,foo,bar=shuf(1,2
This is a maintenance release (mostly bug fixing) to prove that SPE is
alive and well! In case you are using wxPython2.7 you'll need to
upgrade to this release. Submitted patches will be reviewed and
included if approved for next release. Thanks for all your patient
support and continuing donations
Jia Lu schreef:
> Hi all
> I am using wxPy 2.6.3.2-2, But when run an application with self.Bind
> , I got an error that there is no Bind.
>
> How can I fix it. thanx
You can not bind an event to a wx application. You must bind an event
to a wx frame or control. You'll get more and better suppo
Chris Brat schreef:
> Hi,
>
> What sizers do people use to
> - contain the notebook control in a Frame and,
> - contain the contents of a single page of the notebook.
>
> At the moment Im using a GridBagSizer for both but this seems to be
> overkill.
> Is a BoxSizer a better option?
Yes, use box
Steve Holden のメッセージ:
> Perhaps you could show us the code that's failing,
the code is :
#!/usr/bin/python -tt
__author__ = "Jia Lu <[EMAIL PROTECTED]>"
__verstion__ = "1.0.0"
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "MyFrame", size=(300,3
Jia Lu wrote:
> Steve Holden のメッセージ:
> > Perhaps you could show us the code that's failing,
>
> the code is :
>
>
> #!/usr/bin/python -tt
>
> __author__ = "Jia Lu <[EMAIL PROTECTED]>"
> __verstion__ = "1.0.0"
>
> import wx
>
> class MyFrame(wx.Frame):
> def __init__(self):
> wx.Frame.__init
Hello all
I am using Python 2.3 and ZODB (without the rest of Zope) with the
following pattern:
* One process which writes stuff to a ZODB instance (call it test.db)
* Another process which reads stuff from the above ZODB instance
test.db
What I find is that when the first process writes, the se
Fredrik Lundh wrote:
>
> it's explained in the documentation, of course:
>
> http://effbot.org/imagingbook/image.htm#Image.getdata
>
But as I read it, this gives me pixel values, i.e. colors. I want
palette indexes instead (which is what is really stored in a palette
image). I guess I can mak
Hi,I have found a "MemoryError" exception in my program. How can i output Python interpreterlog or how can i find the root cause of this "MemoryError" exception ? Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Bugra Cakir wrote:
> I have found a "MemoryError" exception in my program. How can i output
> Python interpreter log or how can i find the root cause of this
> "MemoryError" exception ?
this means that you've run out of memory; the ordinary traceback
print-out should tell you where.
http
[Petra Chong]
> I am using Python 2.3 and ZODB (without the rest of Zope) with the
> following pattern:
>
> * One process which writes stuff to a ZODB instance (call it test.db)
> * Another process which reads stuff from the above ZODB instance
> test.db
>
> What I find is that when the first proce
kath wrote:
> Hi,
> i am facing some problems with opening an excel file. I am using XLRD
> module.
> I am getting
>
> XLRDError: Can't find workbook in OLE2 compound document
>
> and
>
> CompDocError: Not a whole number of sectors
>
> exceptions in seperate try on different files.
>
> 1.Does any
Frank Millman のメッセージ:
> This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
> Windows.
>
> What platform are you using?
Yes this works OK for me too on my FedoraCore 5, but cannot work on my
FedoraCore 6...
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Alistair King wrote:
>
>
>> Is there any other way of removing double and single quotes from a
>> number, as a string, to give the float value again?
>>
>
> help(str) describes what you can do with a string (an object of type
> 'str', that is). among the methods lis
Hello,
For Python 2.4, documentation was available in .chm format. For new
Python 2.5,
I am missing this format (download page:
http://docs.python.org/download.html).
Can anyone point me to new location of this version of manual,
or tell me why this format is no longer supported ... ?
thanks
--
Jia Lu wrote:
> Frank Millman のメッセージ:
> > This works perfectly for me, using wxPython 2.6.3.2, on both Linux and
> > Windows.
> >
> > What platform are you using?
> Yes this works OK for me too on my FedoraCore 5, but cannot work on my
> FedoraCore 6...
Then it is probably an installation problem
[EMAIL PROTECTED] wrote:
> For Python 2.4, documentation was available in .chm format. For new
> Python 2.5,
> I am missing this format (download page:
> http://docs.python.org/download.html).
> Can anyone point me to new location of this version of manual,
> or tell me why this format is no longe
Alistair King wrote:
> the code works great now. I know these things are quite simple to learn
> from books etc.. but i would be lost without this mailinglist, from lack
> of time. Hopefully soon i can give something more complicated.
> I ended up doing the dictionary formatting properly and the n
> > If I have a Python shell open and run the above two lines, if I run the
> > write process repeatedly, the above "data" object never contains any of
> > the newly added items. To pick them up I have to totally recreate the
> > "db" object.
>
> You say that like it's hard to do ;-)
>
It isn't,
Peter Otten wrote:
> Alistair King wrote:
>
>
>> the code works great now. I know these things are quite simple to learn
>> from books etc.. but i would be lost without this mailinglist, from lack
>> of time. Hopefully soon i can give something more complicated.
>> I ended up doing the dictionar
thanks Stani!
SPE - Stani's Python Editor wrote:
> This is a maintenance release (mostly bug fixing) to prove that SPE is
> alive and well! In case you are using wxPython2.7 you'll need to
> upgrade to this release. Submitted patches will be reviewed and
> included if approved for next release. Th
This is the answer
Linux
---
BOA constructor
Eric (the best for python I think it has cool subversion support better
than emacs for non f4cmd67-b jockies emacs sucks anyway you look at it
and lisp is a terrible terrible bad joke unless you are gondi)
oh and some other t
Hello everyone:
I use Firefox, but perhaps unwisely accepted the XP update to IE7 when
it came in. When I check under folder options, my htm and html files
are still associated with FireFox.
However, now when I attempt to use my nice site launcher that I wrote
in Python (which has worked fine for
I get python crashes and (in better cases) strange Python exceptions when (in
most cases) importing and using cookielib lazy on demand in a thread.
It is mainly with cookielib, but remember the problem also with other imports
(e.g. urllib2 etc.).
And again very often in all these cases where I
Hi all,
I have a script responsible for loading and executing scripts on a
daily basis. Something like this:
import time
t = time.gmtime()
filename = t[0] + '-' + t[1] + '-' + t[2] + '.py'
import filename
So, I have a module with an arbitrary file name and I want to load it,
and later access its
Hello,
I need to call GNU/make from within a Python script. This raised some
problems:
1. The script is not in the directory of the makefile, and changing the
locations of either is not an option. Consequently, the makefile fails,
since it can't find the targets/dependencies.
2. After sea
wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> Hi all,
>
> I have a script responsible for loading and executing scripts on a
> daily basis. Something like this:
>
> import time
> t = time.gmtime()
> filename = t[0] + '-' + t[1] + '-' + t[2] + '.py'
> import filename
>
> So, I have a
Efrat Regev wrote in news:[EMAIL PROTECTED] in comp.lang.python:
>Hello,
>
>I need to call GNU/make from within a Python script. This raised some
> problems:
> 1. The script is not in the directory of the makefile, and changing the
> locations of either is not an option. Consequently, t
Hi,
I am trying to compile py2.4.3/2.5 on a Solaris 10x86 machine, but
cannot get it to build an SSL enabled version. I have added the
relevant sfw directories into the path/crle, with no success. I've
even explicitly added ssl via the --with-libs directive, yet an import
_ssl still fails.
Has
Does anyone out there know of a utility that will allow you to backup
Mailman (including the subscribers and all messages)?
TIA
--
Karl Groves
www.karlcore.com
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your help. Actually my idea was that command1 and command2
would be defined within the program, not the module, as I would have
different choices in different programs. Should I pass them in as a
parameter too?
Greg
Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
> > Thanks, I got that
John Coleman wrote:
> Greetings,
>My copy of the second edition of Chun's "Core Python Programming"
> just arrived from Amazon on Friday.
Who would you say the book is aimed at? Advanced programmers? I thought
about getting it, but I'm not sure if it will be either 1) too much
repetition of
Efrat Regev wrote:
> 1. The script is not in the directory of the makefile, and changing the
> locations of either is not an option. Consequently, the makefile fails,
> since it can't find the targets/dependencies.
build_dir = "path/to/makefile"
cwd = os.getcwd() # get current directory
try:
Jia Lu wrote:
> Hi all.
> I'm using wxPython 2.6.3.2-2 on FC 6.
> I wrote a demo used 'self.Bind(xx)' but I got an error says:
>" MyFrame instance has no attribute 'Bind' "
>
> I did that when I used FC 5 and it worked.
>
> Is new wxPy changed about the Bind method??
>
> thanx
>
Pl
SPE - Stani's Python Editor wrote:
> Chris Brat schreef:
>
>> Hi,
>>
>> What sizers do people use to
>> - contain the notebook control in a Frame and,
>> - contain the contents of a single page of the notebook.
>>
>> At the moment Im using a GridBagSizer for both but this seems to be
>> overkill.
[EMAIL PROTECTED] wrote:
> I have a script responsible for loading and executing scripts on a
> daily basis. Something like this:
>
> import time
> t = time.gmtime()
> filename = t[0] + '-' + t[1] + '-' + t[2] + '.py'
> import filename
>
> So, I have a module with an arbitrary file name and I wa
GHUM wrote:
> I stumbled apon a paragraph in python-dev about "reducing the size of
> Python" for an embedded device:
>
> """
> In my experience, the biggest gain can be obtained by dropping the
> rarely-used
> CJK codecs (for Asian languages). That should sum up to almost 800K
> (uncompressed), I
Paul Watson wrote:
>> So, my question is: on Windows. where are those CJK codecs? Are they by
>> any chance included in the 1.867.776 bytes of python24.dll ?
>
> If your installation directory is C:\Python25, then look in
>
> C:\Python25\lib\encodings
that's only the glue code. the actual data
Fredrik> build_dir = "path/to/makefile"
Fredrik> cwd = os.getcwd() # get current directory
Fredrik> try:
Fredrik> os.chdir(build_dir)
Fredrik> os.system("make")
Fredrik> finally:
Fredrik> os.chdir(cwd)
Or even:
os.system("make -C %s" % build_dir)
John Salerno wrote:
> John Coleman wrote:
> > Greetings,
> >My copy of the second edition of Chun's "Core Python Programming"
> > just arrived from Amazon on Friday.
>
> Who would you say the book is aimed at? Advanced programmers? I thought
> about getting it, but I'm not sure if it will be e
John Coleman wrote:
> John Salerno wrote:
> > John Coleman wrote:
> > > Greetings,
> > >My copy of the second edition of Chun's "Core Python Programming"
> > > just arrived from Amazon on Friday.
> >
> > Who would you say the book is aimed at? Advanced programmers? I thought
> > about getting
Found fix for this at Mozilla:
http://kb.mozillazine.org/Default_browser
Apparently, even though it LOOKS and ACTS like Firefox is still your
default browser after an IE7 upgrade, it's not.
To fix, you must run:
firefox.exe -silent -nosplash -setDefaultBrowser
Which also fixes the webbrowser.
John Coleman wrote:
> John Coleman wrote:
>> John Salerno wrote:
>>> John Coleman wrote:
Greetings,
My copy of the second edition of Chun's "Core Python Programming"
just arrived from Amazon on Friday.
>>> Who would you say the book is aimed at? Advanced programmers? I thought
>>>
Is there a way to check if a SQLite connection and cursor object are
still open? I took a look at the docs and the DB API but didn't see
anything like this.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
is there a simple way of creating global variables within a function?
ive tried simply adding the variables in:
def function(atom, Xaa, Xab):
Xaa = onefunction(atom)
Xab = anotherfunction(atom)
if i can give something like:
function('C')#where atom = 'C' but not necessarly incl
BartlebyScrivener wrote:
> Found fix for this at Mozilla:
>
> http://kb.mozillazine.org/Default_browser
>
> Apparently, even though it LOOKS and ACTS like Firefox is still your
> default browser after an IE7 upgrade, it's not.
>
> To fix, you must run:
>
> firefox.exe -silent -nosplash -setDefaultB
Alistair King wrote:
> Hi,
>
> is there a simple way of creating global variables within a function?
>
>
Use the "global" statement within a function to bind a variable to a
global.
See http://docs.python.org/ref/global.html for details.
>>> def x():
... global g
... g = 12
Alistair King wrote:
> Hi,
>
> is there a simple way of creating global variables within a function?
>
#module global:
def f(atom):
global a
a=1
globals()[atom+'var']=2
def f():
a=b=1
globals().update(locals())
_global=sys.modules[__name__]
def f(atom):
_global.a = 1
Alistair King wrote:
> is there a simple way of creating global variables within a function?
def foo(name):
globals()[name] = "xxx"
globals()[name + 'aa'] = "yyy"
globals()[name + 'ab'] = "zzz"
--
http://mail.python.org/mailman/listinfo/python-list
Gary Herron wrote:
> Alistair King wrote:
>
>> Hi,
>>
>> is there a simple way of creating global variables within a function?
>>
>>
>>
> Use the "global" statement within a function to bind a variable to a
> global.
>
> See http://docs.python.org/ref/global.html for details.
>
>
>
>
Is there any simple way to solve this problem?
--
http://mail.python.org/mailman/listinfo/python-list
Ben Finney wrote:
>
> >>> def obstinate_economist_enumerate(items):
> ... enum_iter = iter((i+1, x) for (i, x) in enumerate(items))
> ... return enum_iter
iter is redundant here.
def natural_enumerate_improvement(items, start=0):
return ((i+start, x) for (i, x) in enumer
一首诗 wrote:
> Is there any simple way to solve this problem?
>>> myString = " "
>>> myString = myString.replace(" ", "")
--
http://mail.python.org/mailman/listinfo/python-list
Is this what you want?
py> s = 'This string contains two times - end'
py> print s.replace(' ', ' '*6)
This string containstwo times- end
see http://docs.python.org/lib/string-methods.html
On Oct 30, 6:26 pm, "一首诗" <[EMAIL PROTECTED]> wrote:
> Is there any simple way to solve
一首诗 wrote:
> Is there any simple way to solve this problem?
>
>
Yes, strings have a replace method:
>>> s = "abc def"
>>> s.replace(' ',' ')
'abc def'
Also various modules that are meant to deal with web and xml and such
have functions to do such operations.
Gary Herron
--
http://mail.py
I had to do something like this a while back for a modular IRC bot that
I wrote.
__import__() will do the trick, however to avoid getting a cache of the
module I recomend doing something like...
mod = reload( __import__("%s-%s-%s" % ( t[0], t[1], t[2] ) ) )
[EMAIL PROTECTED] wrote:
> Hi all,
>
>
Oh, I didn't make myself clear.
What I mean is how to convert a piece of html to plain text bu keep as
much format as possible.
Such as convert " " to blank space and convert to "\r\n"
Gary Herron wrote:
> 一首诗 wrote:
> > Is there any simple way to solve this problem?
> >
> >
> Yes, strings have
This is great! A excellent tutorial for somone who has prior experience
in programming and is starting out in python. My friend keeps wanting
me to teach him python, I think this would be the perfect link for him.
Thanks.
Jeremy Sanders wrote:
> Here is a brief simple introduction to Python I wro
Alistair King wrote:
> Hi,
>
> is there a simple way of creating global variables within a function?
>
> ive tried simply adding the variables in:
>
> def function(atom, Xaa, Xab):
> Xaa = onefunction(atom)
> Xab = anotherfunction(atom)
>
> if i can give something like:
>
> function('C
(warning: LONG reply)
thanks to those above for the kind remarks. tackling comments
and questions, not quite in chronological order. :-)
> Who would you say the book is aimed at? Advanced programmers?
this book is targeted towards technical professionals already
literate in another high-level
[EMAIL PROTECTED] wrote:
> This is great! A excellent tutorial for somone who has prior experience
> in programming and is starting out in python. My friend keeps wanting
> me to teach him python, I think this would be the perfect link for him.
I'm glad you think it is useful. It needs a bit of c
On Oct 30, 6:44 pm, "一首诗" <[EMAIL PROTECTED]> wrote:
> Oh, I didn't make myself clear.
>
> What I mean is how to convert a piece of html to plain text bu keep as
> much format as possible.
>
> Such as convert " " to blank space and convert to "\r\n"
>
Then you can explore the parser,
http://doc
一首诗 wrote:
> Is there any simple way to solve this problem?
corresponds to a non-breaking space, chr(160). if you're only
dealing with this specific XML/HTML entity, you can do
text = text.replace(" ", " ")
or
text = text.replace(" ", chr(160))
to handle arbitrary entities and c
Wojciech Muła wrote:
>> is there a simple way of creating global variables within a function?
>
> def foo(name):
> globals()[name] = "xxx"
> globals()[name + 'aa'] = "yyy"
> globals()[name + 'ab'] = "zzz"
that kind of coding is punishable by law in some jurisdictions.
--
ht
[EMAIL PROTECTED] wrote:
> Fredrik> build_dir = "path/to/makefile"
>
> Fredrik> cwd = os.getcwd() # get current directory
> Fredrik> try:
> Fredrik> os.chdir(build_dir)
> Fredrik> os.system("make")
> Fredrik> finally:
> Fredrik> os.chdir(cwd)
>
> Or even:
>
>
dakman> This is great! A excellent tutorial for somone who has prior
dakman> experience in programming and is starting out in python. My
dakman> friend keeps wanting me to teach him python, I think this would
dakman> be the perfect link for him.
I'm not trying to minimize Jeremy's
>> os.system("make -C %s" % build_dir)
>> OP specified GNU make, so that works fine, but make sure you're not
>> going to need to use it with another make before settling on that
>> alternative. Frederik's works with more versions of make.
Understood. That was the only reason I
Hi Stani,
Not able to reach Berlios. The SourceForge page does not have the
Windows installer. Any ideas when it will be available?
Thanks.
Chris
Bernard wrote:
> thanks Stani!
>
> SPE - Stani's Python Editor wrote:
> > This is a maintenance release (mostly bug fixing) to prove that SPE is
> >
I'm really worried that python may is doing some things I wasn't
expecting... but lets see...
if I pass a list to a function def fn(myList):
and in that function I modify an element in the list, then does the
callers list get modied as well.
def fn(list):
list[1] = 0
myList = [1, 2, 3]
print
1 - 100 of 176 matches
Mail list logo