With thanks to all who made suggestions, this was what I settled on
f = open('testfile')
#(testfile consisting of 2 columns of data, as per Kent's suggestion)
data = []
for line in f:
line_data = [int(x) for x in line.split()]
data.append(line_data)
data.sort(key=lambda x:x[0])
print "sort by f
Using freeze or another tool of its ilk is only going to make you an
executable for that platform. If you want an executable for a different
platform, you need to set up a native Python environment with all the
dependencies installed where Python can find them, and then use that platform's
to
There are two obvious "gotchas". One is binary extensions. If you are using
modules that are not "pure Python", you will have to find *nux versions for
your target.
The other problem is impossible to solve in general, but most of the time,
it's less trouble than the first problem. Python is
On 11/02/10 04:56, Grigor Kolev wrote:
Use cx_freeze but you cannot make exe in ubuntu must use Windows
OK, I have installed cx_freeze on my windows, but when I compile with
cx_freeze, it generate error :
---Begin
error
On 11/02/10 04:49, vince spicer wrote:
1. Ubuntu and linux in general don't use exe per say
2. Python can be compiled but not usually in the way you are thinking
3. you might check out http://pypi.python.org/pypi/bbfreeze/
Vince
1.Yupe, I know ubuntu don't use exe file. I have windows too, bu
On 11/02/10 04:47, Wayne Werner wrote:
Do you mean a windows executable? Not really. Why do you want an .exe
anyway? Python code is (usually) cross-platform.
-Wayne
Yupe,
Yupe, python is cross platform, but we need install python in every
computer we want to using the pyththon *.py .
Hary
Thanks for the information
> Date: Wed, 10 Feb 2010 21:50:53 -0500
> Subject: Re: [Tutor] running split and count + looping to check for numbers
> in same line
> From: ken...@tds.net
> To: fubarni...@hotmail.com
> CC: tutor@python.org
>
> On Wed, Feb 10, 2010 at 6:43 PM, jim serson wrote:
> >
On Wed, Feb 10, 2010 at 6:43 PM, jim serson wrote:
> I am getting an error when I try and run split and count I seem to get it to
> work with one or the other but not together. python wants a character buffer
> but I am not sure how to use it.
>
> I would also like to use readline to check and see
I have become a true Pythonaholic. My newest problem is
I have a rather large Python code (1.5yrs + developing!) currently running on
Windows machines that imports several modules, some from external libraries. It
allows the user to easily access MySQL databases and plot selected columns and
On Thu, Feb 11, 2010 at 5:26 AM, Grigor Kolev wrote:
> I apologize to my question is incorrectly set.
> We have a mail list and we want to do in site a list of all participants
> with their photos and names.
> List with people is saved in the txt file.
> I want to open this file. Take all mail add
I am getting an error when I try and run split and count I seem to get it to
work with one or the other but not together. python wants a character buffer
but I am not sure how to use it.
I would also like to use readline to check and see if several numbers are in
the same line but I think
On Thu, Feb 11, 2010 at 12:12 AM, invincible patriot
wrote:
> thanks
> let me clear you that what i am trying to do
> suppose we hav a input string and a dict
> our_dict={'a':'u', 't':'a', 'c':'g', 'g':'c'}
> input_string='atcg'
>
>
> now what i wana do is that where ever we are having 'a' i wana
thanks
let me clear you that what i am trying to do
suppose we hav a input string and a dict
our_dict={'a':'u', 't':'a', 'c':'g', 'g':'c'}
input_string='atcg'
now what i wana do is that where ever we are having 'a' i wana replace it with
'u', 't' with 'a' and so on
i tried using input_string.r
On Wed, Feb 10, 2010 at 10:27 PM, invincible patriot
wrote:
> hi
> i want to compare a string with a dictionary
> or u can say that i want to take user input A STRING, and want to compare
> each character of that string with the KEYS in the dictionary, and then i
> wana print the values for the c
On Wed, Feb 10, 2010 at 4:27 PM, invincible patriot
wrote:
> hi
> i want to compare a string with a dictionary
> or u can say that i want to take user input A STRING, and want to compare
> each character of that string with the KEYS in the dictionary, and then i
> wana print the values for the ch
On Wed, Feb 10, 2010 at 3:29 PM, invincible patriot <
invincible_patr...@hotmail.com> wrote:
> hi
> i hope every one knows about the needleman wunsch algo
>
Never heard of it
> i am trying to do the same task,
> can some one give me an outline as to how should i start after taking 2
> input st
hi
i hope every one knows about the needleman wunsch algo
i am trying to do the same task,
can some one give me an outline as to how should i start after taking 2 input
strings from the user..
___
hi
i want to compare a string with a dictionary
or u can say that i want to take user input A STRING, and want to compare each
character of that string with the KEYS in the dictionary, and then i wana
print the values for the characters that are present in that strinng that we
got as the input
В 15:02 -0500 на 10.02.2010 (ср), Kent Johnson написа:
> On Wed, Feb 10, 2010 at 2:54 PM, Grigor Kolev wrote:
> > В 14:39 -0500 на 10.02.2010 (ср), Kent Johnson написа:
> >> On Wed, Feb 10, 2010 at 2:30 PM, Grigor Kolev
> >> wrote:
> >> > Hi.
> >> > I want to make a list of E-mail, photos and so
On Wed, Feb 10, 2010 at 2:54 PM, Grigor Kolev wrote:
> В 14:39 -0500 на 10.02.2010 (ср), Kent Johnson написа:
>> On Wed, Feb 10, 2010 at 2:30 PM, Grigor Kolev wrote:
>> > Hi.
>> > I want to make a list of E-mail, photos and some additional data.
>> > But I want this list to be displayed in one si
В 04:40 +0900 на 11.02.2010 (чт), Harya Dananjaya написа:
> Can I compile my python source to exe in ubuntu?
> if I can do it, which compiler can do it?
>
> Thanks you,
>
> Harya Dananjaya
>
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe
On Wed, Feb 10, 2010 at 1:40 PM, Harya Dananjaya wrote:
> Can I compile my python source to exe in ubuntu?
> if I can do it, which compiler can do it?
>
> Thanks you,
>
> Harya Dananjaya
>
Do you mean a windows executable? Not really. Why do you want an .exe
anyway? Python code is (usually) cross
On Wed, Feb 10, 2010 at 1:40 PM, Harya Dananjaya wrote:
> Can I compile my python source to exe in ubuntu?
> if I can do it, which compiler can do it?
>
> Thanks you,
>
> Harya Dananjaya
>
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe or c
В 13:33 -0600 на 10.02.2010 (ср), vince spicer написа:
> On Wed, Feb 10, 2010 at 1:30 PM, Grigor Kolev
> wrote:
> Hi.
> I want to make a list of E-mail, photos and some additional
> data.
> But I want this list to be displayed in one site.
> How can I send d
On Wed, Feb 10, 2010 at 1:30 PM, Grigor Kolev wrote:
> Hi.
> I want to make a list of E-mail, photos and some additional data.
> But I want this list to be displayed in one site.
> How can I send data from a list of site page. Which module should I use
> --
> Grigor Kolev
>
>
Can I compile my python source to exe in ubuntu?
if I can do it, which compiler can do it?
Thanks you,
Harya Dananjaya
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Wed, Feb 10, 2010 at 2:30 PM, Grigor Kolev wrote:
> Hi.
> I want to make a list of E-mail, photos and some additional data.
> But I want this list to be displayed in one site.
> How can I send data from a list of site page. Which module should I use
I don't understand "send data from a list of
On Wed, Feb 10, 2010 at 1:30 PM, Grigor Kolev wrote:
> Hi.
> I want to make a list of E-mail, photos and some additional data.
> But I want this list to be displayed in one site.
> How can I send data from a list of site page. Which module should I use
> --
> Grigor Kolev
>
>
Hi.
I want to make a list of E-mail, photos and some additional data.
But I want this list to be displayed in one site.
How can I send data from a list of site page. Which module should I use
--
Grigor Kolev
___
Tutor maillist - Tutor@python.org
To
If you mean the external shell (say, "bash" under Linux or the DOS
command line in Windows, or similar) then you can only input strings --
everything is a string in such shells.
Yes, I meant capturing data from bash
There are two ways to conv
Owain Clarke, 10.02.2010 14:32:
>> You may want to add a little bit about your use case. Is that really
>> the input you
>> have to deal with? Where does it come from? Can you control the
>> format? What do
>> you want to do with the list you extract from the string?
>>
>> All of that may have an i
On Wednesday February 10 2010 14:32:52 Owain Clarke wrote:
> My son was doing a statistics project in which he had to sort some data by
> either one of two sets of numbers, representing armspan and height of a
> group of children - a boring and painstaking job. I came across this
> piece of cod
On Wed, Feb 10, 2010 at 8:32 AM, Owain Clarke wrote:
> My son was doing a statistics project in which he had to sort some data by
> either one of two sets of numbers, representing armspan and height of a
> group of children - a boring and painstaking job. I came across this piece
> of code:-
>
>
On Thu, 11 Feb 2010 12:32:52 am Owain Clarke wrote:
> My son was doing a statistics project in which he had to sort some
> data by either one of two sets of numbers, representing armspan and
> height of a group of children - a boring and painstaking job. I came
> across this piece of code:-
>
> l
David wrote:
Hello
Wesley,
thanks for your reply. I was surprised about the limited information
too. Sadly (?), I can't reproduce the error any more...
David
On 10/02/10 11:13, wesley chun wrote:
I just wrote this message, but after restarting ipython all worked
fine.
How is it to be exp
Owain Clarke wrote:
Please excuse the obviousness of my question (if it is), but I have
searched the documentation for how to generate a list e.g. [(1,2),
(3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
me in the right direction.
Many thanks
Owain Clarke
Th
On Wed, Feb 10, 2010 at 6:26 AM, Owain Clarke wrote:
> Please excuse the obviousness of my question (if it is), but I have searched
> the documentation for how to generate a list e.g. [(1,2), (3,4)] from a
> string "[(1,2), (3,4)]". I wonder if someone could point me in the right
> direction.
Pyt
Owain Clarke, 10.02.2010 13:34:
> I have solved it myself - must search more before posting!
>
> If anyone at my kind of level is interested:-
>
mystring = "[(1,2), (3,4)]"
mylist = eval(mystring)
mylist
> [(1,2), (3,4)]
type(mylist)
>
As others have pointed out, this may or
On Wed, Feb 10, 2010 at 6:47 AM, nikunj badjatya
wrote:
> I commented out the "raise Exception" statement in Row.py library
> module.
> Here's the (line no. 150 ) of Row.py which i have edited:
>
> def insert_cell(self, col_index, cell_obj):
> if col_index in self.__cells:
>
On Tue, Feb 9, 2010 at 10:00 PM, David wrote:
> Hi guys,
>
> I just wrote this message, but after restarting ipython all worked fine.
> How is it to be explained that I first had a namespace error which, after a
> restart (and not merely a new "run Sande_celsius-main.py"), went away? I
> mean, sur
I have solved it myself - must search more before posting!
If anyone at my kind of level is interested:-
>>> mystring = "[(1,2), (3,4)]"
>>> mylist = eval(mystring)
>>> mylist
[(1,2), (3,4)]
>>> type(mylist)
Thanks
Owain Clarke wrote:
Please excuse the obviousness of my question (if it is), b
Owain Clarke, 10.02.2010 12:26:
> Please excuse the obviousness of my question (if it is), but I have
> searched the documentation for how to generate a list e.g. [(1,2),
> (3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
> me in the right direction.
You may want to add a lit
On Wednesday 10 February 2010 11:26:25 am Owain Clarke wrote:
> Please excuse the obviousness of my question (if it is), but I have
> searched the documentation for how to generate a list e.g. [(1,2),
> (3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
> me in the right directi
Owain Clarke wrote:
Please excuse the obviousness of my question (if it is), but I have
searched the documentation for how to generate a list e.g. [(1,2),
(3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
me in the right direction.
Many thanks
Owain Clarke
_
On Wed, 10 Feb 2010 11:26:25 +
Owain Clarke wrote:
> Please excuse the obviousness of my question (if it is), but I have
> searched the documentation for how to generate a list e.g. [(1,2),
> (3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
> me in the right direction
Please excuse the obviousness of my question (if it is), but I have
searched the documentation for how to generate a list e.g. [(1,2),
(3,4)] from a string "[(1,2), (3,4)]". I wonder if someone could point
me in the right direction.
Many thanks
Owain Clarke
__
Hi,
I am using xlwt 0.7.2 and Python 2.6.
I come across a situation wherein one of the "rows" of the excel sheet
created was being overwritten. And it was flagging the following
error.
File "/usr/local/lib/python2.6/site-packages/xlwt/Row.py", line 150,
in insert_cell
raise Exception(msg)
Exc
"sudhir prasad" wrote
how to clear contents of a file with out actually deleting it,
reopening it for write will, clear the contents.
However
basically wat im trying to do is copy a source file into a common file
,run
the common file,after that i need to copy another source file in
48 matches
Mail list logo