On Tue, Nov 25, 2008 at 6:16 PM, Gilbert <[EMAIL PROTECTED]> wrote:
> Hi People,
>
> I tried to look for some answers but I see only same data format
> processing ( *.txt to *.txt ) in python.
> my question is how to convert a text file ( e.g. *.log, *.dlg ) to excel
> *.csv using python progra
On 26/11/2008, Alan Gauld <[EMAIL PROTECTED]> wrote:
> You could use eval to evaluate the string but that would be dangerous since
> the striong could be a malicious piece of code. But you can make it a lot
> safer by wrapping it in a function with known effect, thus:
>
> s = "[2.5,2.8]" # your
On Tue, Nov 25, 2008 at 3:14 PM, Lie Ryan <[EMAIL PROTECTED]> wrote:
> Instead, in python 2.6, you may use ast.literal_eval(). Which restrict
> the eval to literal syntax only, and prohibit any function calling.
That's very cool, thanks!
> Alternatively, for previous versions of python, or for m
"tchomby" <[EMAIL PROTECTED]> wrote
It's a simple text-based program, the interaction would work
perfectly in a
terminal with the computer printing out lines of text to the user,
and the user
typing in lines of text and pressing return, and this is the kind of
interaction I want to enable on
"Bryan Fodness" <[EMAIL PROTECTED]> wrote
I have a list in a text file that is in the python format.,
Positions = [2.5,2.8]
When you say "in the Python format" do you mean it
is real Python codfe or just that it happens to look
like Python?
If the latter what format is it really? If
I have an idea for a python program I want to write. I want to make this
program accessible over the web for people to play with. And that's where I'm
stuck -- I don't know what module, framework, protocol, or whatever to use to
webify it.
It's a simple text-based program, the interaction would
Hi Serdar,
I will check on this. thanks a lot.
best regards,
Gilbert
On Wed, Nov 26, 2008 at 7:40 AM, Serdar Tumgoren <[EMAIL PROTECTED]>wrote:
> Hey Gilbert,
> The below link leads to a very basic script I put together with some
> assistance from several of the tutors on this list. It might
Hey Gilbert,
The below link leads to a very basic script I put together with some
assistance from several of the tutors on this list. It might give you a
basic idea on how to use the csv module.
http://forjournalists.com/cookbook/index.php?title=Itemizer
___
Hi Serdar,
ok thanks for your quick reply. I'll try to check this module.
Hi people & serdar,
in case you have some websites or books you can recoomend that have some
sample python codes for converting text files ( e.g. *.dlg, *.log ) to
*.csv, kindly share.
best regards,
Gilbert
On Wed,
Hi Gilbert,
Check out the csv module in python's standard library.
It can convert from .txt into Excel and vice versa
http://www.python.org/doc/2.5.2/lib/module-csv.html
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tut
Hi People,
I tried to look for some answers but I see only same data format
processing ( *.txt to *.txt ) in python.
my question is how to convert a text file ( e.g. *.log, *.dlg ) to excel
*.csv using python programming.
any suggestion and where I can get this information for further
lea
Please always reply all so a copy goes to the tutor list. We all
participate and learn.
Jason DeBord wrote:
Bob,
Thanks for the reply.
When I said I don't understand the above, that was just to give you
guys a reference for where I am at.
At my current job I rarely touch the web server. I
Python interpreters running in separate processes have no affect on each
other. This is the easiest way to get around the limitations of the GIL.
The GIL generally has limited effect on multithreaded applications on a
single-core machine. It can be a serious bottleneck on multicore machines,
You might also want to look at Pylons...its another excellent web framework
built for Python. The community around it, I feel, is better than Django.
People are pretty willing to answer any and all questions you have. It
gives more control to the developer as oppiosed to Django. I just switched
Hi all,
I wish to find out what the Global Interpreter Lock is and its relevance
regarding the serving of high traffic Python sites. My understanding from
what i read is that its a state whereby only one interpreter can be invoked
on a physical machine. How does this impact performance of web apps
On Tue, 25 Nov 2008 06:59:13 -0800, Mark Tolonen wrote:
> "Bryan Fodness" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> I have a list in a text file that is in the python format.,
>>
>> Positions = [2.5,2.8]
>>
>> and would like to grab the values.
>>
>> for line in file
On Tue, Nov 25, 2008 at 12:45 PM, Daniel J Kramer
<[EMAIL PROTECTED]> wrote:
> Hi Kent
>
> got it! Is it because Python must recognize the answer as lower case?
It's because you change the user input to lower case, so you have to
compare it against a lower case answer. Maybe this helps:
In [1]: s
Hi Kent
got it! Is it because Python must recognize the answer as lower case?
sorry if that might seem like a dumb question, but I am looking to
understand this program.
cheers
Daniel
On Tue, Nov 25, 2008 at 12:38 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Tue, Nov 25, 2008 at 11:52 AM,
On Tue, Nov 25, 2008 at 11:52 AM, Daniel J Kramer
<[EMAIL PROTECTED]> wrote:
> Hi Kent
>
> I have been playing with the ,lower command and am not having much luck. It
> seems like a simple task, but it is not working for me. Here is the code
>
> def main():
> score = 0
> print"Welcome
On Mon, Nov 24, 2008 at 4:19 PM, Mike Meisner <[EMAIL PROTECTED]> wrote:
> I'd like to get away from using Microsoft Access. I have a number of
> Access databases to convert.
>
There's an open source package out there called "mdbtools", specifically for
working with Access databases. The Python
Bryan Fodness wrote:
I have a list in a text file that is in the python format.,
Positions = [2.5,2.8]
Why do you use Python format for storing data?
(Python format is for storing programs, usually)
and would like to grab the values.
for line in file('list.txt'):
if line ==
"Bryan Fodness" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have a list in a text file that is in the python format.,
Positions = [2.5,2.8]
and would like to grab the values.
for line in file('list.txt'):
if line == Positions:
x1,x2=Positions
I kn
I have a list in a text file that is in the python format.,
Positions = [2.5,2.8]
and would like to grab the values.
for line in file('list.txt'):
if line == Positions:
x1,x2=Positions
I know this does not work. Is there a direct way to get my x1 and x2
values.
Tha
On Tue, Nov 25, 2008 at 6:43 AM, Jason DeBord <[EMAIL PROTECTED]> wrote:
>
> The following for example:
>
> from mod_python import apache
>
> def handler(req):
> req.write("Hello World!")
> return apache.OK
>
> Frankly, I don't understand what is going on in the above. This is a bit
> diff
On Tue, Nov 25, 2008 at 7:43 AM, Jason DeBord <[EMAIL PROTECTED]> wrote:
> The following for example:
>
> from mod_python import apache
>
> def handler(req):
> req.write("Hello World!")
> return apache.OK
>
> Frankly, I don't understand what is going on in the above. This is a bit
> differ
Jason DeBord wrote:
Hello All,
This is my first message on the mailing list. I am excited to get
started developing content / backend for the web with Python.
I have a background in PHP, but am convinced that Python is a better,
more powerful language.
I am on a Windows XP machine and I ha
On Tue, 25 Nov 2008 13:04:35 +0100
spir <[EMAIL PROTECTED]> wrote:
> Hello Peter,
>
> Your program's structure is rather well designed... with words and
> whitespace. You just need to export each consistent part of your
> main() into a specialised section: module, object, function. I would
> sugg
On Mon, Nov 24, 2008 at 2:21 PM, Peter van der Does
<[EMAIL PROTECTED]> wrote:
> On Mon, 24 Nov 2008 11:00:59 -0500
> Peter van der Does <[EMAIL PROTECTED]> wrote:
>
>> I wrote my 1st Python program and it works as I want it to work but
>> ,IMHO, it looks horrible.
> OK, I put the code here:
>
> h
Oops, I meant to say that django "has EXCELLENT documentation"
Take care,
Don
On 11/25/08, Don Jennings <[EMAIL PROTECTED]> wrote:
> Welcome! I suggest you take a look at django [1]. You'll find that it
> has documentation [2] and an active developer community [3]. Of
> course, for your questions
Welcome! I suggest you take a look at django [1]. You'll find that it
has documentation [2] and an active developer community [3]. Of
course, for your questions about learning python, you've already found
a very helpful community : >)
Take care,
Don
[1] http://www.djangoproject.com/
[2] http://d
Hello All,
This is my first message on the mailing list. I am excited to get started
developing content / backend for the web with Python.
I have a background in PHP, but am convinced that Python is a better, more
powerful language.
I am on a Windows XP machine and I have been using XAMPP for se
Hello Peter,
Your program's structure is rather well designed... with words and whitespace.
You just need to export each consistent part of your main() into a specialised
section: module, object, function. I would suggest (use the names that make
sense for you, not mine):
* "Config" class that c
On Mon, Nov 24, 2008 at 7:19 PM, Mike Meisner <[EMAIL PROTECTED]> wrote:
> 3. A good GUI front end for creating the database, creating forms for user
> data input, queries, reports, etc.
For this you might look at Dabo:
http://dabodev.com/
I haven't worked with it myself but some people like it
"Mike Meisner" <[EMAIL PROTECTED]> wrote
I'd like to get away from using Microsoft Access.
I have a number of Access databases to convert.
The obvious choice would be the OpenOffice DB.
I believe it can read Access format - although I've never tried...
1. A relational database management s
34 matches
Mail list logo