I want to intigrate the PyGame module with my Python exe,
means i DONT want to generate .PYD files separtely rather than that
want to put PyGame "c" src with Python workspace of VC project
workspace.
I am unable to import the sub modules( display, rect etc) of pygame,
its raising errors,
am giving
Timothy Smith wrote:
>>> locale.setlocale(locale.LC_NUMERIC, 'us')
the exact same thing works under windows xp.
do i have to compile it with locale support?
No. You have to choose a locale name that is supported by your
operating system (which appears to be FreeBSD). Read your OS
documentation for
Gary Nutbeam wrote:
needing to learn Ruby.
But why wouldn't you just use Rails and learn Ruby in the process? The
"effort" required to learn Ruby pales in comparisson to the advantages
using Ruby on Rails might give you, imho.
Ruby is an excellent language, not much different from Python with it
David M. Cooke wrote:
> Simon Wittber <[EMAIL PROTECTED]> writes:
>
>>> You mean like 'import'? :)
>>
>> That's how I would do it. It's the simplest thing, that works.
>>
>> exec("import %s as plugin" % pluginName)
>> plugin.someMethod()
>>
>> where pluginName is the name of the python file, minus
Fred wrote:
That was exactely what I was searching for. I needed a program, that
chopped up a string into its words and then saves them into a list. I
think I got this done...
There's a function for that: text.split().
You should really have a look at the Python docs. Also,
http://diveintopython.o
OK, i forgot to mention this.
The speed is a critical issue because there will be a competition and
whosever solution is faster wins the prize.
Hence will a python solution be as fast as a C++ solution??
aprameya
On 4 Mar 2005, John Machin wrote:
>
> I.V. Aprameya Rao wrote:
> > Hi
> >
> > I
Why do relative imports cause warnings in PyLint?
A warning like this:
ID:W0403 Relative import 'myPythonFileInTheSameFolder'
When the import is like:
from myPythonFileInTheSameFolder import MyClass
--
http://mail.python.org/mailman/listinfo/python-list
I.V. Aprameya Rao wrote:
The speed is a critical issue because there will be a competition and
whosever solution is faster wins the prize.
Hence will a python solution be as fast as a C++ solution??
It depends how good you are at programming in each language. If you
are an expert C++ programmer y
pythonnewbie wrote:
where I should find the correct "io.h" in this linux environment?
Should be in /usr/include/sys/io.h
You are probably missing some RPM that has various system header files.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Chris wrote:
Why do relative imports cause warnings in PyLint?
http://www.python.org/peps/pep-0328.html#rationale-for-absolute-imports
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
From the "Evil Coder's Guide to Fast Code":
>
> [...]
>
$ py24 -m timeit -s "floats = map(float, range(1000))" -s"from itertools
import starmap, izip" "ints = list(starmap(int, izip(floats)))"
1000 loops, best of 3: 343 usec per loop
Truly evil. Why is that faster than "ints = li
M.N.A.Smadi wrote:
does python support a C-like enum statement where one can define a
variable with prespesified range of values?
Not built in, but there are various solutions available, some simpler
than others. See the Infrequently Asked Questions:
http://www.norvig.com/python-iaq.html
--
Ste
Hello NG,
probably because I still have Python 2.3.4, these are the results I'm
getting:
C:\Python23\Lib>python timeit.py -s "floats = map(float, range(1000))" "ints
= m
ap(int, floats)"
1000 loops, best of 3: 398 usec per loop
C:\Python23\Lib>python timeit.py -s "floats = map(float, range(
Sheesh... I didn't actually pull the type(None) comparison out of my
code. I was simply throwing together a possible situation. Had I
thought about it for more than a second I would have remembered how I
would actually use it.
Thanks for clearing up the confusion. I wasn't previously aware that
Hello NG,
sorry to bother you again with this question... I never used the "timeit"
function, and I would like to ask you if the call I am doing is correct:
C:\Python23\Lib>python timeit.py -n 1000 -s "from Numeric import ones" -s
"floa
ts=ones((1000,1),'f')" -s "ints = floats.astype(int)"
1
Thanks for e-mailing GUI Guy. Please note the following:
If your e-mail was a request for technical support, it will be ignored. Please
use the support forums available online here:
http://guiguy.wminds.com/forums/
Due to large amounts of spam and recent increased virus activity, I am no
lon
[EMAIL PROTECTED] wrote:
Hello NG,
sorry to bother you again with this question... I never used the "timeit"
function, and I would like to ask you if the call I am doing is correct:
C:\Python23\Lib>python timeit.py -n 1000 -s "from Numeric import ones" -s
"floa
ts=ones((1000,1),'f')" -s "ints
On 3 Mar 2005 11:15:28 -0800, "Lonnie Princehouse"
<[EMAIL PROTECTED]> wrote:
>No. I don't think it's possible to read the parse tree used by the
>interpreter, especially as it is being created. Here are a couple of
>kludgy ideas that might come close, though:
Is this a 'limitation' of the curre
On Fri, 04 Mar 2005 12:10:00 +0100, Daniel Frickemeier
<[EMAIL PROTECTED]> wrote:
> I´m developing a small python-program wiht the mysql-python-module.
> The program should run on a server without any mysql-installation.
> Is there any posibility to "kompile" a python with static libaries?
Sure, h
Steve Holden <[EMAIL PROTECTED]> writes:
> Warren Postma wrote:
[...]
> > gloat. Are there any really evil glitches LEFT in Python? Now go
> > look at Perl and come back and say
> > "Thank-deity-of-my-choice-I'm-using-Python".
> >
> Remaining warts that won't disappear:
>
> print >> file, stuff
Michael Hoffman wrote:
Chris wrote:
Why do relative imports cause warnings in PyLint?
http://www.python.org/peps/pep-0328.html#rationale-for-absolute-imports
I notice that this section says that
from __future__ import absolute_import
will be a feature of Python 2.4. Apparently it didn't make the
[EMAIL PROTECTED] wrote:
I want to intigrate the PyGame module with my Python exe,
means i DONT want to generate .PYD files separtely rather than that
want to put PyGame "c" src with Python workspace of VC project
workspace.
I am unable to import the sub modules( display, rect etc) of pygame,
its r
Manlio Perillo wrote:
Anyway, here is an example of what I would like to do:
#begin
def foo(**kwargs): print kwargs
foo(a = 1, b = 2, c = 3)
#end
In the current implementation kwargs is a dict, but I need to have the
keyword argument sorted.
Unfortunately subclassing fron dict and installing the cl
You might also want to take a peek at the getattr() function:
http://docs.python.org/lib/built-in-funcs.html#l2h-31
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
>Dave Zhu wrote:
>> Hello All,
>>
>> Is there any survey on scripting languages? I would
>> like to get information on several scripting languages
>> including Python, Perl, Ruby, Tcl, etc.
>
>What kind of information? ...
P
Please include "goto" command in future python realeses
I know that proffesional programers doesn't like to use it,
but for me as newbie it's too hard to get used replacing it
with "while", "def" or other commands
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Dave Ekhaus <[EMAIL PROTECTED]> wrote:
> hi
>
> i'd like to call a python function programmatically - when all i have
> is the functions name as a string. i.e.
>
>
> fnames = ['foo', 'bar']
>
> for func in fnames:
>
> #
> # how do i c
BOOGIEMAN wrote:
Please include "goto" command in future python realeses
As has been said before, you can only use goto in Python if
you are using Python with line numbers:
http://groups-beta.google.com/group/comp.lang.python/msg/98264a0daa007c46
> I know that proffesional programers doesn't like t
BOOGIEMAN wrote:
Please include "goto" command in future python realeses
I know that proffesional programers doesn't like to use it,
but for me as newbie it's too hard to get used replacing it
with "while", "def" or other commands
Technically, as a newbie you shouldn't know about GOTO at all. So
Doug Schwarz wrote:
> Dave,
>
> I think eval might be what you're looking for:
>
> f = eval('len')
> length = f([1,2,3])
But only if the string given to eval is checked thorougly for allowed
contents. Better use getattr.
Reinhold
--
http://mail.python.org/mailman/listinfo/python-list
HallÃchen!
BOOGIEMAN <[EMAIL PROTECTED]> writes:
> Please include "goto" command in future python realeses I know
> that proffesional programers doesn't like to use it, but for me as
> newbie it's too hard to get used replacing it with "while", "def"
> or other commands
Accordings to Stroustrup'
On Saturday 05 March 2005 09:34, Thomas Rösner aka TRauMa wrote:
> BOOGIEMAN wrote:
> > Please include "goto" command in future python realeses
> > I know that proffesional programers doesn't like to use it,
> > but for me as newbie it's too hard to get used replacing it
> > with "while", "def" o
In article <[EMAIL PROTECTED]>,
Michael Livingston <[EMAIL PROTECTED]> wrote:
>Hi all,
>
>I'm currently working on a project to develop an online simulation model of
>the juvenile justice system in Queensland. We've developed the simulation
>model using the python module simPy and currently we're
After reading that link I tried to change my imports like this:
" from .myPythonFileInTheSameFolder import MyClass"
Well, this caused an error in PyLint:
Encountered "." at line 1, column 6. Was expecting one of: "or" ...
"and" ... "not" ... "is" ... "in" ... "lambda" ...
M.N.A.Smadi wrote:
does python support a C-like enum statement where one can define a
variable with prespesified range of values?
thanks
m.smadi
>>> BLUE, RED, GREEN = 1,5,8
>>> BLUE
1
>>> RED
5
>>> GREEN
8
--
http://mail.python.org/mailman/listinfo/python-list
I recently installed python 2.4, and many installed software packages
stopped working. Some things got working after I copied some files and
directories from /usr/lib/python2.3/site-packages to
/usr/lib/python2.4/site-packages, but I also had to install a newer
PyXml package, as some of the files t
Chris wrote:
After reading that link I tried to change my imports like this:
" from .myPythonFileInTheSameFolder import MyClass"
This style of import is not yet implemented.
I'm getting more and more confused...
How can I correctly do a relative import ?
I think your choices are
- keep doing what y
HallÃchen!
Dave Reed <[EMAIL PROTECTED]> writes:
> On Saturday 05 March 2005 09:34, Thomas RÃsner aka TRauMa wrote:
>
>> [...]
>>
>> Technically, as a newbie you shouldn't know about GOTO at all. So
>> you're more a "Tainted by previous spaghetti code practices"-guy
>> than newbie.
>
> Or more l
Torsten Bronger wrote:
> Accordings to Stroustrup's C++ book, the only good reason for goto
> statements in a language is to have it in computer-generated code.
I've needed goto statements when translating old code written
with gotos.
> Most gotos are disguised function calls, so
> just copy the
Torsten Bronger wrote:
> Hallöchen!
>
> BOOGIEMAN <[EMAIL PROTECTED]> writes:
>
> > Please include "goto" command in future python realeses I know
> > that proffesional programers doesn't like to use it, but for me as
> > newbie it's too hard to get used replacing it with "while", "def"
> > or othe
I am puzzled by the Windows XP usage below:
C:\Python23\Lib\site-packages\PyMatrix>c:python23\python
The system cannot find the path specified.
C:\Python23\Lib\site-packages\PyMatrix>c:python23\python.exe
The system cannot find the path specified.
C:\Python23\Lib\site-packages\PyMatr
It's me wrote:
> If I have:
>
> a = (1,2,3)
>
> how do I ended up with:
>
> res=[(1), (2), (3), (4), (5)]
>
> without doing:
>
> res=[(a[0]), (a[1]), (a[2]), (4), (5)]
>
> ???
>
> ps: This is just a nobrainer example of what my real code is trying
to do.
> "a" might have many many eleme
On 2005-03-05, BOOGIEMAN <[EMAIL PROTECTED]> wrote:
> Please include "goto" command in future python realeses
> I know that proffesional programers doesn't like to use it,
> but for me as newbie it's too hard to get used replacing it
> with "while", "def" or other commands
Troll.
--
Grant Edwa
Dave Zhu wrote:
> Hello All,
>
> Is there any survey on scripting languages? I would
> like to get information on several scripting languages
> including Python, Perl, Ruby, Tcl, etc.
The Language Shootout at http://shootout.alioth.debian.org/ has code
samples in many languages, both interpreted a
In article <[EMAIL PROTECTED]>,
Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote:
> Doug Schwarz wrote:
>
> > Dave,
> >
> > I think eval might be what you're looking for:
> >
> > f = eval('len')
> > length = f([1,2,3])
>
> But only if the string given to eval is checked thorougly for allowed
> c
Colin J. Williams wrote:
C:\XXX is required, C:XXX is not acceptable.
C:XXX is acceptable, it just means something entirely different from
C:\XXX. There is a current working directory on each drive. C:XXX is
file XXX in the current directory on drive C:.
How should os.path.join('C:', 'ugh') be tre
Dave Reed wrote:
Or more likely a troll. Google for:
Boogieman yahoo troll
and you'll see this isn't the only place he/she does this sort of thing.
I'm not convinced.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
hi...
i have a linux redhat8 server. i'm trying to get python andmod_python to
play nicely, meaning that i have the right mod_python for the python that
i've installed.
it appears that the box has multiple versions of python.
when i'm 'root' the python version is 2.2.1
when i'm a user 'test', th
Alex Martelli wrote:
> import win32net
> win32net.NetUseAdd(None,1,{'remote':r'\\server\share','local':'K:'})
>
> is an example (not all that easy to fathom from the docs, but I
> found it out with a little help from the docs, a little from MSDN,
> and a little experimentation).
I looked through
Lucas Machado wrote:
> Alex Martelli wrote:
>
> > import win32net
> >
win32net.NetUseAdd(None,1,{'remote':r'\\server\share','local':'K:'})
> >
> > is an example (not all that easy to fathom from the docs, but I
> > found it out with a little help from the docs, a little from MSDN,
> > and a little
Doug Schwarz wrote:
>> > Dave,
>> >
>> > I think eval might be what you're looking for:
>> >
>> > f = eval('len')
>> > length = f([1,2,3])
>>
>> But only if the string given to eval is checked thorougly for allowed
>> contents. Better use getattr.
>
> Actually, upon reading Peter Hansen's repl
beliavsky wrote:
> Goto is useful in breaking out of a nested loop and when there is a
> clean-up section of a function that should be executed for various
> error conditions.
But much less useful in languages like Python which have exception
handling.
At rare times I've needed something like
fo
I have already seen the "net help use" and i know how to manage samba
shares from a command prompt. What i need help with is using the win32
api for python to manage shares
--Lucas
--
http://mail.python.org/mailman/listinfo/python-list
Manlio Perillo wrote:
On 3 Mar 2005 11:15:28 -0800, "Lonnie Princehouse"
<[EMAIL PROTECTED]> wrote:
No. I don't think it's possible to read the parse tree used by the
interpreter, especially as it is being created. Here are a couple of
kludgy ideas that might come close, though:
Is this a 'limit
Thanks, got it.
"M.E.Farmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's me wrote:
> > If I have:
> >
> > a = (1,2,3)
> >
> > how do I ended up with:
> >
> > res=[(1), (2), (3), (4), (5)]
> >
> > without doing:
> >
> > res=[(a[0]), (a[1]), (a[2]), (4), (5)]
> >
M.N.A.Smadi wrote:
> does python support a C-like enum statement where one can define a
> variable with prespesified range of values?
The thing is, variables don't have types; objects do. A variable can
be bound to an object of any type, so there's no way to prespecify a
range of values for a va
I'm using the win32 api to map samba shares, and I'm having trouble
handling some exceptions. In my script there are 2 possible exceptions
when the script attempts to map a share:
>>> win32net.NetUseAdd(None, 1, {'remote':r'\\foo\bar','local':'X
Traceback (most recent call last):
File "", line
Doug Schwarz wrote:
> I don't see how getattr solves the original problem. What, exactly,
is
> the first argument to getattr?
mod = __import__(__this__)
f = getattr(mod,"foo")
I tend to prefer this over globals() because it seems a little less
magical to me, especially when setting a global.
You could use win32api.GetLogicalDriveStrings to list
the drive letters currently in use, and find the next free
letter. net use * probably does something like that under
the covers.
hth
Roger
"Lucas Machado" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Alex Ma
At the risk of beating this into the Pythonic ground, here is a
generator version which collapses the original nested loop into a
single loop, so that break works just fine:
.def getCombinations(*args):
.if len(args) > 1:
.for a0 in args[0]:
.for remainder in ge
You can capture the extra exception data like this.
try:
...win32net.NetUseAdd(None, 1, {'remote':r'\\foo\bar','local':'X
except pywintypes.error,details:
...err_code=details[0]
...
Roger
"Lucas Machado" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using the win32 ap
Roger Upole wrote:
> You could use win32api.GetLogicalDriveStrings to list
> the drive letters currently in use, and find the next free
> letter. net use * probably does something like that under
> the covers.
I went and took your advice and this is where I am now:
>>> import win32api
>>> a = wi
[EMAIL PROTECTED] wrote:
Goto is useful [...] when there is a clean-up section of a function
that should be executed for various error conditions.
Like this?
def foo():
f = open('foo.txt')
try:
# do stuff with f
finally:
f.close()
--
http://mail.python.org/mailman/listin
The split should work fine if you remove the r
(raw string) prefix.
>>> win32api.GetLogicalDriveStrings().split('\\\x00')
['A:', 'C:', 'D:', 'E:', 'F:', 'G:', 'H:', 'J:', 'K:', 'Y:', 'Z:', '']
Roger
"Lucas Machado" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Roger Upol
b = a.strip(r'\\\x00')
b
> 'A:\\\x00C:\\\x00D:\\\x00E:\\\x00Z:\\\x00'
b = a.split(r'\\\x00')
b
> ['A:\\\x00C:\\\x00D:\\\x00E:\\\x00Z:\\\x00']
>
> I'm a bit of a novice at python (even more so of the win32 api), but
> I've used the split and strip functions before (for example t
Hi, I've been busy with an experimental script, and I can't seem to
see what is wrong with it, can somebody tell me?
Here it is:
a = 0
b = 1
mainloop = 1
print "Welcome to pyFibo"
print "For more information type \'help\'"
while mainloop==1:
limit = input("Until what number do you want to
"R.Meijer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi, I've been busy with an experimental script, and I can't seem to
> see what is wrong with it, can somebody tell me?
>
> Here it is:
>
> a = 0
> b = 1
> mainloop = 1
>
> print "Welcome to pyFibo"
> print "For more informatio
Why doesn't this statement execute in Python:
1 == not 0
I get a syntax error, but I don't know why.
Thanks,
Adam Roan
--
http://mail.python.org/mailman/listinfo/python-list
italy wrote:
Why doesn't this statement execute in Python:
1 == not 0
I get a syntax error, but I don't know why.
Because == has higher precedence than 'not', so you are asking for
(1 == not) 0
Try
>>> 1 == (not 0)
True
Kent
Thanks,
Adam Roan
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Fackrell gmail.com> writes:
>
> You need to close the () for input here. After doing that, if you run it
> you will notice that you get an exception for most inputs, including "yes".
> IIRC, input() is scheduled for removal in some future version of Python
> because it doesn't do what yo
> Why doesn't this statement execute in Python:
>
> 1 == not 0
>
> I get a syntax error, but I don't know why.
This does: 1 == (not 0)
I presume Python treats it like
1 (== not) 0
Which is a SyntaxError
greets,
Marek
--
http://mail.python.org/mailman/listinfo/python-list
"not" has a lower priority than non-Boolean operators, so not a == b is
interpreted as not (a == b), and a == not b is a syntax error.
http://docs.python.org/lib/boolean.html
--
http://mail.python.org/mailman/listinfo/python-list
Using Python (Command line version, not IDLE, nor pythonwin)
With Linux, print "\033[33mHello" prints a brown hello. Fine!
With Windows, the VT100 sequence seems to be unknown?
Why? and how can I correct that?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
R.Meijer wrote:
Hi, I've been busy with an experimental script, and I can't seem to
see what is wrong with it, can somebody tell me?
For future notice, it's useful to
(1) explain what it is you want your script to do, and
(2) explain what it currently does (including an exception traceback if
one
hi,
im a newbie to VIM(gVIM under WINXP), i want to execute python in vim
like press F5 in SciTE.
i try to search in google and config as follows in my _vimrc:
---
map :D:\python24\python.exe %
if has("autocmd")
autocmd FileType python
Hi friends,
I am creating a jabber client and a separate class for
dialog is created,So when the roster name is clicked this dialog open
and can continue chat.What I need is I am calling the same class when
reciving the message so that the application goes not responding.People
told m
[EMAIL PROTECTED] wrote:
I recently installed python 2.4, and many installed software packages
stopped working. Some things got working after I copied some files and
directories from /usr/lib/python2.3/site-packages to
/usr/lib/python2.4/site-packages, but I also had to install a newer
PyXml packag
i change the path
autocmd FileType python setlocal makeprg=\"d:\\Python24\\python.exe\"\
autocmd BufNewFile,BufRead test*.py setlocal
makeprg=\"d:\\Python24\\python.exe\"\ %
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 05 Mar 2005 08:52:38 -0500, Kent Johnson <[EMAIL PROTECTED]>
wrote:
>Manlio Perillo wrote:
>> Anyway, here is an example of what I would like to do:
>>
>> #begin
>> def foo(**kwargs): print kwargs
>>
>> foo(a = 1, b = 2, c = 3)
>> #end
>>
>>
>> In the current implementation kwargs is a
Thanks for e-mailing GUI Guy. Please note the following:
If your e-mail was a request for technical support, it will be ignored. Please
use the support forums available online here:
http://guiguy.wminds.com/forums/
Due to large amounts of spam and recent increased virus activity, I am no
lon
hi...
i have a situation with a linux rh8 server. i can't seem to get
python/mod_python/apache working as one...
i can't seem to import mod_python from the python interpreter to work, and
i'm not sure as to why. i'm fairly convinced that it's a conflict issue of
some type, but i'm not sure as to
Dennis Lee Bieber wrote:
On 5 Mar 2005 08:00:23 -0800, [EMAIL PROTECTED] declaimed the following
in comp.lang.python:
"explicit GOTO"'. Goto's are less dangerous when they are in the
forward direction, to code appearing later.
UGH... That is the one direction I always avoid (in FORTRAN 77).
Typica
bruce wrote:
> hi...
>
> i have a situation with a linux rh8 server. i can't seem to get
> python/mod_python/apache working as one...
>
> i can't seem to import mod_python from the python interpreter to
work, and
> i'm not sure as to why. i'm fairly convinced that it's a conflict
issue of
> some t
In <[EMAIL PROTECTED]>, italy wrote:
> Why doesn't this statement execute in Python:
>
> 1 == not 0
>
> I get a syntax error, but I don't know why.
`==` has a higher precedence than `not` so Python interprets it as::
(1 == not) 0
This works::
>>> 1 == (not 0)
True
Ciao,
Marc
italy wrote:
> Why doesn't this statement execute in Python:
>
> 1 == not 0
>
> I get a syntax error, but I don't know why.
>
> Thanks,
> Adam Roan
Of course, you would normally want to use != to see if something is not
equal to something else.
1 != 0
True
--
http://mail.python.org/mailman/lis
We apologize if this is a duplicate email.
International Conference on Computational Intelligence and
Multimedia Applications, (ICCIMA) August 16-18, 2005
University of Nevada, Las Vegas, USA
(www.iccima.org)
F I N A LC A L L F O R P A P E R S
The International Conference on Compu
We apologize if this is a duplicate email.
EIGHTEENTH INTERNATIONAL CONFERENCE ON SYSTEMS ENGINEERING (ICSEng05)
LAS VEGAS, USA,
AUGUST 16-18, 2005
(http://www.icseng.info)
This series of International Conferences is jointly organized on a
rotational basis among three institutions, University of
So I wrote a quick python program (my first ever) that needs to
download pages off the web.
I'm using urlopen, and it works fine. But I'd like to be able to
change my browser string from "Python-urllib/1.15" to instead
impersonate Internet Explorer.
I know this can be done very easily with Perl,
ok
i find it
map :!d:\python24\python.exe %
but it comes with a new pop-up windowsdame~
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> So I wrote a quick python program (my first ever) that needs to
> download pages off the web.
>
> I'm using urlopen, and it works fine. But I'd like to be able to
> change my browser string from "Python-urllib/1.15" to instead
> impersonate Internet Explorer.
>
> I kn
DENG wrote:
> ok
>
> i find it
>
> map :!d:\python24\python.exe %
>
>
> but it comes with a new pop-up windowsdame~
I'm no windows expert - but maybe pythonw.exe helps here?
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
sboyle> I'm using urlopen, and it works fine. But I'd like to be able
sboyle> to change my browser string from "Python-urllib/1.15" to instead
sboyle> impersonate Internet Explorer.
sboyle> I know this can be done very easily with Perl, so I'm assuming
sboyle> it's also easy
Carl Banks wrote:
> Doug Schwarz wrote:
> > I don't see how getattr solves the original problem. What,
exactly,
> is
> > the first argument to getattr?
>
>
> mod = __import__(__this__)
That should be __import__(__name__)
Silly me.
--
CARL BANKS
--
http://mail.python.org/mailman/listinfo/py
"R.Meijer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thank you very much for the help and the tips :-) This is my very first
python
> script, and I knew it would have some stupid mistakes; but it's doing
something
> weird right now...I did all the stuff you told, me, and now it'
On Sat, 5 Mar 2005 22:10:38 +0100, rumours say that "Dominique Bouré"
<[EMAIL PROTECTED]> might have written:
>Using Python (Command line version, not IDLE, nor pythonwin)
>
>With Linux, print "\033[33mHello" prints a brown hello. Fine!
>With Windows, the VT100 sequence seems to be unknown?
>
>
>W
Martin v. Löwis wrote:
Timothy Smith wrote:
>>> locale.setlocale(locale.LC_NUMERIC, 'us')
the exact same thing works under windows xp.
do i have to compile it with locale support?
No. You have to choose a locale name that is supported by your
operating system (which appears to be FreeBSD). Read y
> "Paul" == Paul Moore <[EMAIL PROTECTED]> writes:
Paul> You can work around the need for something like yield_all,
Paul> or explicit loops, by defining an "iflatten" generator,
Paul> which yields every element of its (iterable) argument,
Paul> unless the element is a generator
Timothy Smith wrote:
something strange is happening, no matter what i try nothing is a
supported locale and yes it's freebsd 4.10
Sounds like a problem with your operating system. AFAICT, you ought
to have a directory /usr/share/locale on your disk. What is its
contents?
Regards,
Martin
--
http://
Skip Montanaro <[EMAIL PROTECTED]> wrote
> It doesn't look any easier to do this using urllib2. Seems like a
> semi-obvious oversight for both modules. That suggests few people have
> ever
> desired this capability.
my $.02:
I have trouble believing few people have not desired this for two r
At long last I've upgraded to Python 2.4 on my Windows
development host, and as a direct result I have released
a WConio 1.5 binary installer for Python 2.4.
WConio is my Windows CONsole I/O for Python module. It
emulates the conio.h functionality of Turbo C 2.0. This
module is based heavily on
1 - 100 of 114 matches
Mail list logo