2010/4/29 sanam singh :
> hi,
> i am am facing problem in installing python 2.6 on ubuntu 9.04. When i sudo
> make i get following error :
You need to install the necessary development
headers/libraries required to build Python from source.
eg:
$ sudo apt-get install gdbm-dev
[ snip ]
cheers
J
Steven D'Aprano wrote:
> Be aware though, that sys._getframe is marked as a private function (the
> leading underscore), which means that:
>
> (1) It only exists in some Python implementations (CPython and possible
> nothing else?); and
$ jython
Jython 2.2.1 on java1.6.0_0
Type "copyright", "cre
Hello,
i want to add functions to an instance of a class at runtime. The added
function should contain a default parameter value. The function name and
function default paramter values should be set dynamical.
Kind Regards,
Richi
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj wrote:
>
> Hello,
>
> i want to add functions to an instance of a class at runtime. The added
> function should contain a default parameter value. The function name and
> function default paramter values should be set dynamical.
>
> Kind Regards,
>
>
Hello,
I'm using the MySQLdb library in python to interface with a mysql
database I've created. I have written a command line app which runs from
the command line. I have 10 fields and hence, have found that each
record spreads over one line. What is the best way to print a table of a
database lik
On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj
wrote:
> i want to add functions to an instance of a class at runtime. The added
> function should contain a default parameter value. The function name and
> function default paramter values should be set dynamical.
The normal way of doing this by b
Richard Lamboj wrote:
> i want to add functions to an instance of a class at runtime. The added
> function should contain a default parameter value. The function name and
> function default paramter values should be set dynamical.
>>> class A(object):
... def __init__(self, x):
...
Am Thursday 29 April 2010 09:59:22 schrieb Xavier Ho:
> On Thu, Apr 29, 2010 at 5:55 PM, Richard Lamboj
wrote:
> > Hello,
> >
> > i want to add functions to an instance of a class at runtime. The added
> > function should contain a default parameter value. The function name and
> > function defau
Kushal Kumaran wrote:
> On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
>> Hi,
>>
>> I'm making first attempts to modify a few cells of an openoffice
>> spreadsheet.
>>
>
> Try the xlrd and xlwt modules, and the documentation at
> http://www.python-excel.org/
Thanks Kumar,
I installed xlrd, x
2010/4/29 sanam singh :
> hi,
> it is saying
> sa...@ubuntu:~/Desktop/Python-2.6.5$ sudo apt-get install gdbm-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Couldn't find package gdbm-dev
I'm sorry, but I don't actively use Debian/ubuntu bas
News123 wrote:
>
> Kushal Kumaran wrote:
>> On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
>>> Hi,
>>>
>>> I'm making first attempts to modify a few cells of an openoffice
>>> spreadsheet.
>>>
>> Try the xlrd and xlwt modules, and the documentation at
>> http://www.python-excel.org/
> I install
On Thu, Apr 29, 2010 at 6:03 PM, Daniel Dalton wrote:
> Hello,
Hi,
> Any examples of how to do this would be great, as I'm blind and it's a
> bit difficult to check the spacing.
You're welcome to adapt some of my old code
written just for this very purpose. I even have a
tool called 'pysqlplus'
Daniel Dalton wrote:
> Hello,
>
> I'm using the MySQLdb library in python to interface with a mysql
> database I've created. I have written a command line app which runs from
> the command line. I have 10 fields and hence, have found that each
> record spreads over one line. What is the best way
Peter Otten wrote:
> Richard Lamboj wrote:
>
>> i want to add functions to an instance of a class at runtime. The added
>> function should contain a default parameter value. The function name and
>> function default paramter values should be set dynamical.
>
class A(object):
> ... def __
Am Thursday 29 April 2010 10:13:01 schrieb Peter Otten:
> Richard Lamboj wrote:
> > i want to add functions to an instance of a class at runtime. The added
> > function should contain a default parameter value. The function name and
> > function default paramter values should be set dynamical.
> >
News123 wrote:
> Peter Otten wrote:
>> Richard Lamboj wrote:
>>
>>> i want to add functions to an instance of a class at runtime. The added
>>> function should contain a default parameter value. The function name and
>>> function default paramter values should be set dynamical.
>>
> class A(
hi,
i have tried
sa...@ubuntu:~/Desktop/Python-2.6.5$ sudo apt-get build-dep python
but still the problem persists . when i make the package i get :
Failed to find the necessary bits to build these modules:
_bsddb _curses_curses_panel
_sqlite3 bsddb185
GZ wrote:
Hi All,
I am looking at the following code:
def fn():
def inner(x):
return tbl[x]
tbl={1:'A', 2:'B'}
f1 = inner # I want to make a frozen copy of the values of tbl
in f1
tbl={1:'C', 2:'D'}
f2 = inner
return (f1,f2)
f1,f2 = fn()
f1(1) # output C
f2
Peter Otten wrote:
> News123 wrote:
>>>
>> The drawback would be, that
>> b = A(123)
>> b.f()
>> would still be called with a as bound object.
>
> There is no b.f until you explicitly assign it with
>
> b.f = f
you are sooo right.
My fault.
--
http://mail.python.org/mailman/listinfo/python-lis
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and what you haven't but as a first trial
> | you might want to
> |
> |
> |
> | f = open( 'new
James Mills wrote:
> 2010/4/29 sanam singh :
>> hi,
>> it is saying
>> sa...@ubuntu:~/Desktop/Python-2.6.5$ sudo apt-get install gdbm-dev
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> E: Couldn't find package gdbm-dev
>
> I'm sorry, but I don
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that finding things in a set and a di
Karin Lagesen wrote:
> I have approx 83 million strings, all 14 characters long. I need to be
> able to take another string and find out whether this one is present
> within the 83 million strings.
>
> Now, I have tried storing these strings as a list, a set and a dictionary.
> I know that findin
I realise I could roll my own here, but I wondered if there was an
inbuilt version of this?
>.
def default_if_none(*args):
for arg in args:
if arg:
return arg
return None
x = None
y = 5
z = 6
print default_if_none(x,y,z)
>> 5
>
Karin Lagesen, 29.04.2010 11:38:
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that findi
On Thu, Apr 29, 2010 at 3:16 AM, Astley Le Jasper
wrote:
> I realise I could roll my own here, but I wondered if there was an
> inbuilt version of this?
>
>>.
> def default_if_none(*args):
> for arg in args:
> if arg:
> return arg
> r
Lie Ryan wrote:
No, the implicit concatenation is there because Python didn't always
have triple quoted string. Nowadays it's an artifact and triple quoted
string is much preferred.
I don't agree. I often use implicit concatenation when I'm
writing a format string that won't fit on one source l
Le 29/04/2010 01:45, Antoine Pitrou a écrit :
Le Wed, 28 Apr 2010 23:54:07 +0200, Dodo a écrit :
Help! this is driving me crazy lol
I want to print raw binary data to display an image file BUT
python3 outputs b'' instead of so the
browser can't read the image!!
f = open("/some/path/%s"
Hi,
I have Lighttpd web server running on port 80.
and i have a xmlrpc web server running on port 8085
How i can send all my request/response to xmlrpc server through lighttpd
server running on port 80?
Thanks and regards,
Gopal
--
http://mail.python.org/mailman/listinfo/python-list
"Karin Lagesen" wrote in message
news:416f727c6f5b0edb932b425db9579808.squir...@webmail.uio.no...
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have trie
... oh ... that simple. Now I feel dumb.
Thanks!
ALJ
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 29, 5:31 am, Cameron Simpson wrote:
> On 28Apr2010 22:03, Daniel Fetchinson wrote:
> | > Any idea how I can replace words in a html file? Meaning only the
> | > content will get replace while the html tags, javascript, & css are
> | > remain untouch.
> |
> | I'm not sure what you tried and
On 28-Apr-10 23:18 PM, Kushal Kumaran wrote:
On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
Hi,
I'm making first attempts to modify a few cells of an openoffice
spreadsheet.
Try the xlrd and xlwt modules, and the documentation at
http://www.python-excel.org/
The tutorial here is beautiful
On Apr 29, 6:37 am, Wolfgang Strobl wrote:
> Look at it from the point of view of people walking by, trying to decide
> whether they should invest some of their time into digging into yet
> another framework and library.
yes. _their_ time - not mine. the pyjamas project has always been
done on
On Apr 29, 10:38 am, Daniel Fetchinson
wrote:
> > | > Any idea how I can replace words in a html file? Meaning only the
> > | > content will get replace while the html tags, javascript, & css are
> > | > remain untouch.
> > |
> > | I'm not sure what you tried and what you haven't but as a first tr
Karin Lagesen wrote:
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
Now, I have tried storing these strings as a list, a set and a dictionary.
I know that finding t
MRAB wrote:
> Karin Lagesen wrote:
>> Hello.
>>
>> I have approx 83 million strings, all 14 characters long. I need to
>> be able to take another string and find out whether this one is
>> present within the 83 million strings.
>>
>> Now, I have tried storing these strings as a list, a set and
Hi,
I would like to add a method to the gtk.TextBuffer class to save a text
buffer to a file, but I get an error:
line 22, in
gtk.TextBuffer.save_to_file = gtk_TextBuffer_save_to_file
TypeError: can't set attributes of built-in/extension type 'gtk.TextBuffer'
Here is the code:
10 import gtk
On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
> I would like to add a method to the gtk.TextBuffer class to save a text
> buffer to a file, but I get an error:
I don't know gtk, but can you inherit from the TextBuffer class create
your own TexBuffer subclass with the save_to_file method?
--
On 29/04/2010 17:03, Joe Riopel wrote:
> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
>> I would like to add a method to the gtk.TextBuffer class to save a text
>> buffer to a file, but I get an error:
>
> I don't know gtk, but can you inherit from the TextBuffer class create
> your own Te
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
>
> @Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
> instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.stdout.buffer.write().
You'll also have to call sys.stdout.flush() before doing so.
Hello!
I want to get route tables from Cisco routers in the network. What i
have:
import re
from pysnmp.entity.rfc3413.oneliner import cmdgen
s = r'(%s)' % ('(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.)\
{3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)')
pattern = re.compile(s)
file = 'routers.txt
On 04/29/2010 10:03 AM, Wolfnoliir wrote:
> On 29/04/2010 17:03, Joe Riopel wrote:
>> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
>>> I would like to add a method to the gtk.TextBuffer class to save a text
>>> buffer to a file, but I get an error:
>>
>> I don't know gtk, but can you inheri
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that python26.dll could not be found.
On the host
>> > | > Any idea how I can replace words in a html file? Meaning only the
>> > | > content will get replace while the html tags, javascript, & css are
>> > | > remain untouch.
>> > |
>> > | I'm not sure what you tried and what you haven't but as a first trial
>> > | you might want to
>> > |
>> > |
Hello!
Is there a way to print a query for logging purpose as it was or will
be sent to database, if I don't escape values of query by myself?
cursor.execute(query, [id, somestring])
I could print query and values separate, but it would be great, if I
could see how query is constructed and can t
Hi,
I would like to represent graphs as cyclic dictionaries in Python.
The python code for the graphs is generated by some other program
(written in lisp) and I wonder what would be the best syntax for writing
the cycles in Python?
The following works:
>>> a = {}
>>> a['a'] = a
As can be seen
Le 29/04/2010 17:07, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
@Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.stdout.buffer.write().
You'll also have
On Apr 29, 2010, at 12:01 PM, someone wrote:
Hello!
Is there a way to print a query for logging purpose as it was or will
be sent to database, if I don't escape values of query by myself?
cursor.execute(query, [id, somestring])
I could print query and values separate, but it would be great,
On 4/29/10 11:23 AM, Dietrich Bollmann wrote:
Hi,
I would like to represent graphs as cyclic dictionaries in Python.
The python code for the graphs is generated by some other program
(written in lisp) and I wonder what would be the best syntax for writing
the cycles in Python?
You can impleme
On Thu, Apr 29, 2010 at 9:23 AM, Dietrich Bollmann wrote:
> Hi,
>
> I would like to represent graphs as cyclic dictionaries in Python.
>
> The python code for the graphs is generated by some other program
> (written in lisp) and I wonder what would be the best syntax for writing
> the cycles in Py
On Thu, 29 Apr 2010 15:51:26 +1000, James Mills
wrote:
>On Thu, Apr 29, 2010 at 1:12 PM, Mark Olbert
> wrote:
>> I'm getting an error message about make not being able to find the necessary
>> bits to build modules related to _dbm. Yet I have
>> libgdbm installed installed on my system. Suggest
Thank you to posters for help to my question. Seems I had trouble with
triple quotes strings in the PythonWin shell. But using the Idle shell
things work as expected. But this is probably another issue...any way,
w/Idle's shell I got the "action" regarding multiline strings I
expected.
--
http://m
> Is it possible to include python26.dll in the application folder or
tell
> python not to look in C:\windows\system32 for its library?
The needed DLLs should be in the PATH. The simplest way is to place
all
the required DLLs next to the python executable.
You can use http://www.dependencywalker.
> Is there a way to print a query for logging purpose as it was or will
> be sent to database, if I don't escape values of query by myself?
> ...
> Im using psycopg2, btw
http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-factories
HTH,
--
Miki
http://pythonwise.blogspot.com
--
ht
On Fri, Apr 30, 2010 at 3:00 AM, Mark Olbert
wrote:
> Okay. But I compiled & installed gdbm from source obtained from the gnu
> archive, so I presume the necessary files would be included
> (this is on a linux system).
Perhaps check where gdbm has installed it's development sources
and whether o
> I have approx 83 million strings, all 14 characters long. I need to be
> able to take another string and find out whether this one is present
> within the 83 million strings.
Have a look at the shelve module.
If you want to write the algorithm yourself, I suggest
http://en.wikipedia.org/wiki/Tr
Hey guys,
I am sorry if this is not the right list to post some questions. I have a
simple question please and would appreciate some answers as I am new to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this array in different arrays so each one will have what is
att
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
>>> import re
>>> p = re.compile('(ab*)(sss)')
>>> m = p.match( 'absss' )
>>> m.group(0)
'absss'
>>> m.group(1)
'ab'
>>> m.group(2)
'sss'
...
But two questions:
How can I operate a regex
Le 29/04/2010 20:00, goldtech a écrit :
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
m.group(0)
'absss'
m.group(1)
'ab'
m.group(2)
'sss'
...
But two questions:
Ho
Chris Rebert rebertia.com> writes:
...
> If you want a prettier print, you could try serializing it to YAML and
> printing the result out; YAML has syntax for "tags".
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
Works fairly well.
$ python
Python 2.6.4 (r264:75706, Mar 1 2010, 14:28:0
goldtech wrote:
Hi,
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
m.group(0)
'absss'
m.group(1)
'ab'
m.group(2)
'sss'
...
But two questions:
How can I operate a regex
Bill Jordan wrote:
Hey guys,
I am sorry if this is not the right list to post some questions. I have
a simple question please and would appreciate some answers as I am new
to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this array in different arrays so each on
On 04/29/2010 01:00 PM, goldtech wrote:
Trying to start out with simple things but apparently there's some
basics I need help with. This works OK:
import re
p = re.compile('(ab*)(sss)')
m = p.match( 'absss' )
f=r'abss'
f
'abss'
m = p.match( f )
m.group(0)
Traceback (most recent call last):
On Apr 29, 7:23 pm, Miki wrote:
> > Is there a way to print a query for logging purpose as it was or will
> > be sent to database, if I don't escape values of query by myself?
> > ...
> > Im using psycopg2, btw
>
> http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-fac...
>
> HTH,
>
Hi!
> print x or y or z
> If none of the potential values are considered boolean false
But :
a=None
b=False
c=None
print a or b or c
> None
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Re!
Look also :
>>> print False or None
None
>>> print None or False
False
--
MCI
--
http://mail.python.org/mailman/listinfo/python-list
On 4/29/2010 2:30 AM, mathan kumar wrote:
I m trying port pyfsevents coded in python2.6 to python3.1.
Specifying system and compiler/version might help responders.
--
http://mail.python.org/mailman/listinfo/python-list
On 04/29/10 20:40, Gregory Ewing wrote:
> Lie Ryan wrote:
>> No, the implicit concatenation is there because Python didn't always
>> have triple quoted string. Nowadays it's an artifact and triple quoted
>> string is much preferred.
>
> I don't agree. I often use implicit concatenation when I'm
>
How do you upload a plain text .py file as a source file?
I get
Error processing form
invalid distribution file
--
http://mail.python.org/mailman/listinfo/python-list
cjw wrote:
> On 28-Apr-10 23:18 PM, Kushal Kumaran wrote:
>> On Thu, Apr 29, 2010 at 5:46 AM, News123 wrote:
>>> Hi,
>>>
>>> I'm making first attempts to modify a few cells of an openoffice
>>> spreadsheet.
>>>
>>
>> Try the xlrd and xlwt modules, and the documentation at
>> http://www.python-exce
Hi there,
I want to send an email with an attachment using the following code
(running under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
msg = MIMEMultipart()
msg['From'] = from_addr
msg['To
On 04/29/10 16:34, Steven D'Aprano wrote:
> On Thu, 29 Apr 2010 02:16:46 +0100, MRAB wrote:
>
>> Steven D'Aprano wrote:
>>> On Thu, 29 Apr 2010 06:17:42 +1000, Lie Ryan wrote:
>>>
> Consider that the concatenation language feature probably is there
> because it's useful (e.g. it preserves
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit :
> Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't
> work.
> I just tested on my linux server, and it works
>
> So, let's modify the script
>
> sys.stdout.buffer.write( f.read() )
> sys.stdo
On 4/29/2010 5:38 AM, Karin Lagesen wrote:
Hello.
I have approx 83 million strings, all 14 characters long. I need to be
able to take another string and find out whether this one is present
within the 83 million strings.
If the 'other string' is also 14 chars, so that you are looking for
exac
On Thu, Apr 29, 2010 at 12:01 PM, Michel Claveau - MVP
wrote:
> Hi!
>
>> print x or y or z
>> If none of the potential values are considered boolean false
>
> But :
> a=None
> b=False
> c=None
> print a or b or c
> > None
Consider:
def read_default_from_config(cfg_file):
#pseudocode
Mumbling to myself, perhaps somebody else is interested.
News123 wrote:
> Hi,
>
>
> I wanted to know who can recommend a good module/library, that allows to
> modify an Open Office spreadsheet.
>
> One can assume, that Open Office is installed on the host.
>
>
Following url gives a small intr
On 4/29/2010 11:25 AM, Mirko Vogt wrote:
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that py
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
> Hi there,
>
> I want to send an email with an attachment using the following code (running
> under Python 3.1, greatly simplified to show example)
>
> from email.mime.multipart import MIMEMultipart
> from email.mime.text import MIMETex
On 29/04/2010 17:22, Michael Torrie wrote:
> On 04/29/2010 10:03 AM, Wolfnoliir wrote:
>> On 29/04/2010 17:03, Joe Riopel wrote:
>>> On Thu, Apr 29, 2010 at 11:43 AM, Wolfnoliir wrote:
I would like to add a method to the gtk.TextBuffer class to save a text
buffer to a file, but I get an
I have a bunch of 3rd party packages loaded in my site-packages
folder. Will these packages be affected if I upgrade my Python
(32-bit Windows) installation from 2.6.4 to 2.6.5?
Are there any gotchas I should watch out for when performing this
type of upgrade? Does it ever make sense (and is it ev
On Fri, Apr 30, 2010 at 5:53 AM, gert wrote:
> How do you upload a plain text .py file as a source file?
http://lmgtfy.com/?q=python+distutils+tutorial
--
http://mail.python.org/mailman/listinfo/python-list
On 29-Apr-10 14:46 PM, MRAB wrote:
Bill Jordan wrote:
Hey guys,
I am sorry if this is not the right list to post some questions. I
have a simple question please and would appreciate some answers as I
am new to Python.
I have 2 D array: test = [[A,1],[B,2],[A,3][B,4]]
I want to arrang this arra
News123 wrote:
Mumbling to myself, perhaps somebody else is interested.
Yes I am.
News123 wrote:
Hi,
I wanted to know who can recommend a good module/library, that allows to
modify an Open Office spreadsheet.
One can assume, that Open Office is installed on the host.
Following url give
Le 29/04/2010 22:21, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 18:33:08 +0200, Dodo a écrit :
Oh, I tested on my windows machine avec sys.stdout.buffer.write() didn't
work.
I just tested on my linux server, and it works
So, let's modify the script
sys.stdout.buffer.write
Le 29/04/2010 18:33, Dodo a écrit :
Le 29/04/2010 17:07, Antoine Pitrou a écrit :
Le Thu, 29 Apr 2010 12:53:53 +0200, Dodo a écrit :
@Antoine : It not sys.stdout.buffer.write but sys.stdout.write()
instead. But it still doesn't work, now I have empty content
Let me insist: please use sys.std
On Apr 29, 11:49 am, Tim Chase wrote:
> On 04/29/2010 01:00 PM, goldtech wrote:
>
> > Trying to start out with simple things but apparently there's some
> > basics I need help with. This works OK:
> import re
> p = re.compile('(ab*)(sss)')
> m = p.match( 'absss' )
>
> f=r'abss'
I have some ten thousand rows in a table. E.g.
columns = ["color","size","weight","value"]
rows = [
[ "Yellow", "Big", 2, 4 ],
[ "Blue", "Big", 3, -4 ],
[ "Blue", "Small", 10, 55 ],
...
]
Some columns are dimensions, others are measures. I want to convert this
to an indexed vers
Komodo Edit 5.1
I would very much like to stop code from expanding automatically.
Like when several consecutive lines of code have a plus sigh in the
left margin, meaning they are collapsed, when I go to copy or cut one
of those collapsed lines, the collapsed lines that follow that line
automa
On 29Apr2010 05:03, james_027 wrote:
| On Apr 29, 5:31 am, Cameron Simpson wrote:
| > On 28Apr2010 22:03, Daniel Fetchinson wrote:
| > | > Any idea how I can replace words in a html file? Meaning only the
| > | > content will get replace while the html tags, javascript, & css are
| > | > remain
Laszlo Nagy wrote:
I have some ten thousand rows in a table. E.g.
columns = ["color","size","weight","value"]
rows = [
[ "Yellow", "Big", 2, 4 ],
[ "Blue", "Big", 3, -4 ],
[ "Blue", "Small", 10, 55 ],
...
]
Some columns are dimensions, others are measures. I want to convert this
On Apr 29, 4:32 pm, Terry Reedy wrote:
>
> Try Movable Python - The Portable Python Distribution.
> www.voidspace.org.uk/python/movpy/
You could also try Portable Python, which is somewhat newer and has
2.5, 2.6, and 3.0:
http://www.portablepython.com/
John
--
http://mail.python.org/mailman/
On Apr 29, 5:21 pm, Laszlo Nagy wrote:
> I have some ten thousand rows in a table. E.g.
>
> columns = ["color","size","weight","value"]
> rows = [
> [ "Yellow", "Big", 2, 4 ],
> [ "Blue", "Big", 3, -4 ],
> [ "Blue", "Small", 10, 55 ],
> ...
> ]
>
> Some columns are dimensions,
Mirko Vogt wrote:
Hey,
is there a way to use python2.6 without having used the installation
routine?
When I install python2.6 and copy over the python-directory (C:\programs
\python2.6) to another windows host and trying to execute python.exe
there, I get an error that python26.dll could not be
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
> On 28.04.2010 18:54, * Lie Ryan:
> > Python have triple-quoted string when you want to include large amount
> > of text;
>
> Yes, that's been mentioned umpteen times in this thread, including the *very
> first* quoted sentence above.
>
> It's IMHO
Chris Rebert wrote:
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
Hi there,
I want to send an email with an attachment using the following code (running
under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text
You could use dictionary of lists
test = {
A: [1, 3],
B: [2, 4]
}
print test[A]
[1, 3]
test[A].append(5)
print test[A]
[1, 3, 5]
Cheers,
Fil
_
From: melbourne-pug-bounces+filipz=3g.nec.com...@python.org
[mailto:melbourne-pug-bounces+fil
Hi all,
I am stumped. The compiled version of my project works on my pc, but
when I put it on a thumb drive and try it on a laptop without python
installed I get this:
Traceback (most recent call last):
File "sw.pyw", line 3, in
File "modes\arm.pyc", line 4, in
File "dependencies\wmi1_3\wm
On 30.04.2010 01:29, * Carl Banks:
On Apr 28, 11:16 am, "Alf P. Steinbach" wrote:
On 28.04.2010 18:54, * Lie Ryan:
Python have triple-quoted string when you want to include large amount
of text;
Yes, that's been mentioned umpteen times in this thread, including the *very
first* quoted sent
Hi people,
I'm having a problem getting the info I need out of a file.
I've opened the file with f=open('myFile','r').
Next, I take out the first line with line=f.readline()
line looks like this:
'83927 300023_25_5_09_FL 9086 9134 F3LQ2BE01AQLXF 1 49 + 80
ZA8Z89HIB7M'
I then split it into par
1 - 100 of 115 matches
Mail list logo