Terry Reedy wrote:
> This should REALLY be on the doc page of the Python site.
Agreed.
> It is really time to stop pretending that the only Python users
> that count have a *nix on their desk.
I agree with this too, but if you're a programmer
on the Windows platform with possibility to install
s
[EMAIL PROTECTED] wrote:
> thanks for your input...
> well I just find out that modifying environment through ksh call is not
> possible (can't get the new evironment back to python).
I thought about this a few days ago. Can't you copy it like this:
import os
env_rows = os.popen('. some.script
rbt wrote:
> data = ['0', 'a', '1', 'b', '2', 'c',\
> '3', 'd', '4', 'e', '5', 'f',\
> '6', 'g', '7', 'h', '8', 'i',\
> '9', 'j', '~', '!', '@', '#',\
> '$', '%', '^', '&', '*', ';']
>
Note that the backsl
praba kar wrote:
> Dear All,
>
> I have one doubt. Is there python.ini
> file like php.ini in Php?
There is no such thing in Python. Python is a programming
language. It doesn't try to be an operating system or a web
server. There are a number of web application toolkits
written in Python,
John Abel wrote:
> Magnus Lycka wrote:
> As a programmer on Win32, and *nix platforms, I agree with needing
> better tools. however, I find cygwin a pita. For tools such as grep
> and find, try this http://unxutils.sourceforge.net/. No need for cygwin
> ( though that's
Paul Rubin wrote:
> Magnus Lycka <[EMAIL PROTECTED]> writes:
>
>>Of course, one might suggest that it's the task of the browser,
>>and not of the scripting language, to provide a safe sandbox
>>where scripts can mess around and without causing havoc on
&g
You might have spotted a fairly nasty bug there!
Christopher J. Bottaro wrote:
> Hi,
> Why is there no support for explicit transactions in the DB API? I mean
> like transaction() to start the trans and commit() and rollback() would end
> the trans or something.
To quote from Date & Darwen "A Gu
Maksim Kasimov wrote:
> hi all, sorry if i'm reposting
>
> why time.strptime and time.localtime returns tuple with different DST (9
> item of the tuple)?
I've been bitten by the quirks in the time modules so many times
that I would advice against using it for any date handling. It's
ok for time
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am writing a Python program that needs to read XML files and contruct
> a tree object from the XML file (using wxTree).
> The XML however is not an hiearchical XML file. It contains
> and tags. The tags link the elements
> together.
Are you sure that you ge
[EMAIL PROTECTED] wrote:
> Hello,
>
> I have two modules (file1.py and file2.py)
> Is that ok in python (without any weird implication) if my module
> import each other. I mean in module file1.py there exist command import
> file2 and in module file2.py there exist command import file1?
Even if i
I'm CC:ing this to D'Arcy J.M. Cain. (See comp.lang.python for prequel
D'Arcy.)
Christopher J. Bottaro wrote:
> Check this out...
>
>
> import pgdb
> import time
>
> print time.ctime()
> db = pgdb.connect(user='test', host='localhost', database='test')
> time.sleep(5)
> db.cursor().execute('ins
Greg Ewing wrote:
> Magnus Lycka wrote:
>
>> Due to the cycle, you can never use file1 without
>> file2 or vice versa. Why do you then want it to be
>> two different modules instead of one?
>
> Perhaps because it would then be too big and
> unwieldy to m
M1st0 wrote:
> Ops yes is BNF :P Bacus Normal Form if I am not wrong...
Backus Naur Form.
John Backus and Peter Naur first used it to describe ALGOL around 1960.
See e.g.
http://cui.unige.ch/db-research/Enseignement/analyseinfo/AboutBNF.html
--
http://mail.python.org/mailman/listinfo/python-lis
Philippe C. Martin wrote:
> I now need to generate the HTML wxHtmlEasyPrinting can print: I need to have
> a title followed by lines of text that do not look too ugly. If possible I
> would like to use an existing module.
How to do this really depends on what your data looks like, and how you
get
Andrew Dalke wrote:
> Andrea Griffini wrote:
>
>>This is investigating. Programming is more similar to building
>>instead (with a very few exceptions). CS is not like physics or
>>chemistry or biology where you're given a result (the world)
>>and you're looking for the unknown laws. In programming
Scott David Daniels wrote:
> Magnus Lycka wrote:
>
>> It seems to me that *real* computer scientists are very rare.
>
> I suspect the analysis of algorithms people are among that group.
> It is intriguing to me when you can determine a lower and upper
> bound on the time
Peter Maas wrote:
> Learning is investigating. By top-down I mean high level (cat,
> dog, table sun, sky) to low level (molecules, atoms, fields ...).
Aha. So you must learn cosmology first then. I don't think so. ;)
I don't know if you really think that you learn things top
down, but I doubt tha
huy wrote:
> Hi,
>
> I'm using cherrypy to provide a user interface for users to start a
> linux server program eg. os.system("nohup myserver.py &"). The problem
> is that if I stop cherrypy server and restart, I get the "Address
> Already In Use" problem until I stop myserver.py. Can someone s
Alex Martelli wrote:
> PL/1 is basically gone, but its legacy of "take what you need and leave
> the rest" is unfortunately alive in other languages that are blind to
> the enormous advantages of simplicity and uniformity.
Reminds me of RUP... No wonder Ivar Jacobson gave up and started all over.
Jarek Zgoda wrote:
> I am not a hacker, just a software developer, but I'd have no problems
> in either installing PyGTK on Ubuntu box (sudo apt-get install
> python-gtk2, but it's installed by default anyway) or on Windows XP
> machine (double click on installer icon). "Simple user" is not an idio
I'm looking for some library to parse XML code
much faster than the libs built into Python 2.4
(I'm stuck with 2.4 for quite a while) and I
also need XML Schema validation, and would
appreciate support for e.g. XPath and XInclude.
I also want an API which is more Pythonic than
e.g. a thin wrapper o
Larry Bates wrote:
> I don't know if it meets ALL of your requirements but this might
> help:
>
> http://www.reportlab.org/pyrxp.html
AFAIK, there is no XML Schema support in PyRXP.
This is really bad enough.
GPL is not an option for us, and a commercial
licence is less good than e.g. MIT or LGP
[EMAIL PROTECTED] wrote:
> Our (python-)macro uses massively nested loops which are unfortunately
> necessary. These loops perform complex calculations in this commercial
> tool. To give you a quick overview how long this macros runs:
>
> The outer loop takes 5-7 hours for one cycle. Each cycle cr
On July 23, NicolasG wrote:
> I want to be a professional python programmer...
> unfortunately sometimes to work as a programmer is really hard in this
> world, every employee requires professional experience and you can't
> really start as a beginner..
On July 24, NicolasG wrote:
> Python is
beginner wrote:
> Hi All,
>
> This is just a very simple question about a python trick.
>
> In perl, I can write __END__ in a file and the perl interpreter will
> ignore everything below that line. This is very handy when testing my
> program. Does python have something similar?
raise SystemExit
Neil Cerutti wrote:
> On 2007-08-01, Cameron Laird <[EMAIL PROTECTED]> wrote: .
>> I want to re-emphasize the "triple-quote it" tip mentioned
>> earlier in this thread. I think the original questioner
>> will find this quite satisfying, if I understand his situ-
>> ation at all.
>>
>> *I* ce
Lee Fleming wrote:
> Hello,
> I have a simple question. Say you have the following function:
>
> def f(x, y = []):
...
> But this, the code that "fixes" the list accumulation confounds me:
> def f(x, y=None):
> if y is None: y = []
...
> In other words, what's going on here? How is it that
Joe Goldthwaite wrote:
> I didn't know about the getattr function. I tried to search for that
> type of function but not knowing how to word the search request,
> I couldn't find it.
You should really read through chapter 2 (Built-in Objects) of the
library reference. All that stuff is core Pytho
neil wrote:
> I see python is not really there for 64 bit yet but most of the people
I think you mean "Windows is not really there for 64 bit yet".
Python works well on real 64 bit operating system. Blender
does too I presume.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I maintain old code... code written a long time ago, before unittest
> was popular. Getting unittest to work on that is difficult at best.
Writing unit tests for lots of old code is not the most
funny thing you can imagine...
For situations like that, it might be much b
NoName wrote:
> Perl:
> @char=("A".."Z","a".."z",0..9);
> do{print join("",@char[map{rand @char}(1..8)])}while(<>);
If you generate passwords like that to normal computer
users, you'll end up with a lot of "my password doesn't
work" tickets. You should skip the symbols that are
easy to mistake for
> <[EMAIL PROTECTED]> escribió:
>
>> I would like to use sqlite, But I also wanted a tutorial with the
>> basis of the sql and etc, I never dealed with dbs before
For practicing SQL on-line, I'd suggest sqlzoo.net.
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> I believe it is Guido's current view, perhaps Google's collective view, and
> a general *nix view that such increases can just as well come thru parallel
> processes. I believe one can run separate Python processes on separate
> cores just as well as one can run separate pr
Rich wrote:
> Anyway, my question is: what experience you people have with working
> with different languages at the same time?
I typically use Python, C++ and SQL. When there's been
lots of Python and little C++, I tend to forget to
terminate C++ statements with semicolon... Otherwise
I seem to k
[EMAIL PROTECTED] wrote:
> I'm all for using for the latest version of Python. I'm just now
> learning about Python classes, and it seems like there were some
> significant changes at 2.2.
I don't remember exactly what appeared when, but nothing you
learn with 2.1 will stop working in 2.2 (I think
Phoe6 wrote:
> beta.python.org evolved very nice and noticed today the new python.org
> website going live. There is a change in the look n feel, wherein it
> looks "more official" and maximum possible information about python is
> now directly accessible from the home page itself. Kudoes to the
Nicola Musatti wrote:
> The obviously perfect logo would be Kaa's face:
> http://disney.go.com/vault/archives/villains/kaa/kaa.html
The Soviet version is better, and I think most of the
Maugli movies are made before 1973, which means that
they aren't copyrighted outside the former Soviet Union.
(D
rtilley wrote:
> Steve Holden wrote:
>
>> Doug Bromley wrote:
>>
>>> I can see Ruby overtaking Python if we don't ALL do something about it.
>
>
> I think it's the name. Python. Let's change it to something nicer. Think
> about it... if you found a Ruby, you'd pick it up and put it in your
> p
I want an re that matches strings like "21MAR06 31APR06 1236",
where the last part is day numbers (1-7), i.e it can contain
the numbers 1-7, in order, only one of each, and at least one
digit. I want it as three groups. I was thinking of
r"(\d\d[A-Z]\d\d) (\d\d[A-Z]\d\d) (1?2?3?4?5?6?7?)"
but tha
Harro de Jong wrote:
> Thanks for the pointer. I was using time.time(), which I now see isn't
> very accurate on Windows.
time.clock() is more accurate on Windows (and much less so on
Linux, where it also measures something completely different.)
--
http://mail.python.org/mailman/listinfo/python
John Salerno wrote:
> Thanks guys! I had a feeling exceptions were nothing like in C languages
> (i.e. a pain to deal with). :)
Since when does C have exceptions? (You're not confusing C with C++
or C#?)
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> One of the things I learned with C# is that it's always better to handle
> any errors that might occur within the codes itself (i.e. using if
> statements, etc. to catch potential out of range indexing) rather than
> use too many try/catch statements, because there is some
Schüle Daniel wrote:
> >>> txt = "21MAR06 31APR06 1236"
>
> >>> m = '(?:JAN|FEB|MAR|APR|MAI|JUN|JUL|AUG|SEP|OCT|NOV|DEZ)'
> # non capturing group (:?)
>
> >>> p = re.compile(r"(\d\d%s\d\d) (\d\d%s\d\d)
> (?=[1234567])(1?2?3?4?5?6?7?)" % (m,m))
>
> >>> p.match(txt).group(1)
> '21MAR06'
>
>
Fredrik Lundh wrote:
> Magnus Lycka wrote:
> r"(\d\d[A-Z]{3}\d\d) (\d\d[A-Z]{3}\d\d) (?=[1234567])(1?2?3?4?5?6?7?)"
>
Thanks a lot. (I knew about {3} of course, I was in a hurry
when I posted since I was close to missing my train...)
--
http://mail.python.org/mailman/listinfo/python-list
ahart wrote:
> I thank you all for your help and suggestions. I wasn't aware that
> default values were considered class (static) values. That seems a
> little odd to me, but as long as I know that's the case, I'll be fine.
It's all very simple and regular: Things in the class scope
is shared betw
[EMAIL PROTECTED] wrote:
> I am a python newbie. I have writen some 500 lines of code. There are 4
> classes and in all 5 files.
>
> Now, I am trying to run the program. I am getting wrong values for the
> simulation results.
If you first write 500 lines of code, and *then* try to run it,
it seem
Mudcat wrote:
> I am trying to build a tool that analyzes stock data. Therefore I am
> going to download and store quite a vast amount of it. Just for a
> general number - assuming there are about 7000 listed stocks on the two
> major markets plus some extras, 255 tradying days a year for 20 years,
John Salerno wrote:
> But isn't Python sort of known for the opposite, i.e. 'one simple way',
> or something to that effect?
If we compare it with the "opposite" language--Perl, and think
of these languages as natural languages, rather than programming
languages, Perl's inventor Larry Wall, felt
Byte wrote:
> Now what do I do if Func1() has multiple outputs and Func2() requires
> them all to give its own output, as follows:
>
> import random
>
> def Func1():
> choice = ('A', 'B', 'C')
> output = random.choice(choice)
> output2 = random.choice(choice)
> return output
>
Rc wrote:
> But ,my question is when I start Python it is a Dos Window
> that opened.I think it is not possible on a XP computer?
The Windows NT family, including XP, is not based on MS DOS.
It still has a text more interface, and it is much better
than DOS ever was. You can start that by clicking
[EMAIL PROTECTED] wrote:
> Why not
>
> dt = datetime.datetime(*time.strptime(s, "%Y-%m-%dT%H:%M:%S")[0:6])
>
> ?
Maybe due to neglection of the 7th commandment?
Most of the other commandments can be ignored while
coding Python, but the 7th certainly applies here.
http://www.lysator.liu.se/c
Anand wrote:
> Suppose i have a big list and i want to take tke the first one and rest
> of the list like car/cdr in lisp.
> is there any easy way to do this in python?
It seems like overkill to me to make the syntax more
complex just to avoid writing a one-line function.
def first_rest(seq): ret
Dan wrote:
> Just starting to do some windows Client / Server programming. Which
> would you recommend? I need to create a server to fire events and
> communicate with clients over a lan. Thanks
There are plenty of Python solutions for this, most of them
work with Windows, but aren't locked to it.
Harlin Seritt wrote:
> I want to make a recommendation to a group of internal customers where
> I work concerning a Python web framework. They are seeking to build a
> portal that can handle around 5000 total users but probably no more
> than 100-200 simultaneous users. This is supposed to serve m
vj wrote:
> I've been given a project which requires writing scripts that need to
> be run on over 3000 servers. Only about 15% of them have python
> installed on them. While all/most of them will have perl.
>
> I'll try and do as much as possible in pexpect but am sure I'll have do
> some signifi
Steve Juranich wrote:
> [EMAIL PROTECTED] wrote:
>
>> As far as hosting, I also know
>> where Zope/Plone hosting from 7.95 a month - although the host doesn't
>> list it on their ads, they do use and host it.
>
> Which host would this be? I'm currently exploring some options for getting
> a Zope
Don Taylor wrote:
> Is there a free or low-cost version of Delphi for Windows available
> anywhere?
Sure.
If my memory serves me correctly, I have several CDs from various
computer magazines with previous versions of Delphi at home. I don't
know if such offers have been around recently, but you
momobear wrote:
> hi, is there a way to let python operate on sequence of int or short?
If you want to work with arrays of numbers, you might want to
look at NumArray etc.
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> Fuzzyman wrote:
>> In the ``win32api`` package there is a ``GetEnvironmentVariable``
>> function, but no ``SetEnvironmentVariable``. Any options ?
>
> No, your only option is to find a solution which doesn't involve changing
> another process's environment.
Surely there mus
momobear wrote:
> but what about buffer is not be declared in python program, it comes
> from a C function. and what about I want to treat a string as a short
> list?
Python is a high level language with much stronger typing than C.
If you want a list of integers, use a list of integers. Strings
a
Ivan Vinogradov wrote:
> I have not much clue about databases, except that they exist, somewhat
> complex, and often use proprietary formats for efficiency.
Prorietary storage format, but a standardized API...
> So any points on whether RDBM-based setup
> would be better would be greatly appreci
Gregor Horvath wrote:
> Scott David Daniels schrieb:
>
>> Using a relational DBMS is most definitely _not_ premature optimization.
>> A relational system provides a way to store data so that it is later
>
> I did not mean that using a relational DBMS is premature optimization
> but not using a OR
DurumDara wrote:
> I want to process many data with python, and want to store in database.
...
> So I want to use one database file - but I want to protect it.
> How to do it with SQLite ?
> I see that solutions:
> - 1. I use transactions.
> - 2. I create full copy of database after every bigger tr
Michele Simionato wrote:
> Roy Smith wrote:
>
>> That being said, you can indeed have private data in Python. Just prefix
>> your variable names with two underscores (i.e. __foo), and they effectively
>> become private. Yes, you can bypass this if you really want to, but then
>> again, you can b
401 - 464 of 464 matches
Mail list logo