Right. If you want to get the same results with your Python script
that you did with Firefox, you can modify the browser headers in your
code.
Here's an example with urllib2:
http://vsbabu.org/mt/archives/2003/05/27/urllib2_setting_http_headers.html
By the way, if you're doing non-trivial web scr
If you're concerned about specific individual functions, you can use:
from package1 import some_function as f1
form package2 import some_function as f2
--
http://mail.python.org/mailman/listinfo/python-list
ere that
I don't know what to use.
What tool should I use?
Thanks,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
, I might try modifying some similar Perl code a friend
sent me that logs into lexis.com.
Thanks so much,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 3, 10:17 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> Rex wrote:
> > Hello,
>
> > I am working on an academic research project where I need to log in to
> > a website (www.lexis.com) over HTTPS and execute a bunch of queries to
> > gather a data set. I
I am writing a script that executes a bunch of queries through a form
on a website and reads the results. I am only interested in the
section in the of each web page. Currently, each page
the server returns is about 100kb and contains a bunch of HTML and
Javascript, all of which I don't need; I d
I have to set my load-path
to my python interpreter?
Thanks,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
Hi Skip and Philippe. I added the path for Python to PATH, but I still
get the same message (when I try executing the current buffer, I get
the message: "The system cannot find the path specified."
Philippe, I have the above lines of code in my .emacs file.
As for my environment, I'm running Emac
I have the following in my .emacs:
(add-to-list 'load-path "C:\Program Files\Python24")
Is that enough? I didn't see anything similar to that in your .emacs
file, so I'm wondering if I'm supposed to add the path to my PATH
elsewhere.
Thanks,
Rex
--
http://ma
put python.exe explicitly somewhere; could someone refer me to a
place where I can read about these things?
Thanks!
Rex
--
http://mail.python.org/mailman/listinfo/python-list
GUD, PDB, and others. Which ones do I need?
Thanks,
Rex Eastbourne
--
http://mail.python.org/mailman/listinfo/python-list
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
One thing: is it possible to go through the code within emacs? Doing it
on the command line is useful, but it would be very helpful if I could
have a little marker within the emacs buffer that showed me where I am.
Rex
--
http://mail.python.org/mailman/listinfo/python-list
Also, when I try running pdb in my Emacs shell, I get very weird
behavior: for instance, I'll hit 'h' and enter twenty times with no
output. Then, all of a sudden, twenty output messages will pop up.
--
http://mail.python.org/mailman/listinfo/python-list
Yes! Thank you so much! (For some reason, by the way, I had to copy
python.exe to my c:/ directory, since the computer could never find the
path in program files/python24. But when I did that, and used
setq-py-python-command, it worked. I now have python.exe in two
locations.)
--
http://mail.pyth
Yes, I knew that copying it to my root was a kludge. But between that
and not having it work, I chose the former. (As you might be able to
tell from my posts, I tried multiple things and was frustrated.) I
tried putting quotes around "c:\program files\python24". It still
didn't work.
I chose to in
re the function was first called?
Thanks,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
I'm
dealing with global variables, which is very rarely).
Any way around this?
Rex
--
http://mail.python.org/mailman/listinfo/python-list
hame this project is not active; it seems like such a great
idea.
Rex
--
http://mail.python.org/mailman/listinfo/python-list
hame this project is not active; it seems like such a great
idea.
Rex
--
http://mail.python.org/mailman/listinfo/python-list
I'm new to Python with a new windows 8 machine (64-bit OS). Learning
programming mainly for fun. Naturally I downloaded Python 3.3 (who doesn't
want the latest and greatest). What I want involves functions related to the
normal distribution. Based on my google research, it appears that SCIPY
ebruary 10, 2013 1:10:32 PM UTC-5, Mark Lawrence wrote:
> On 10/02/2013 17:35, Rex Macey wrote:
>
> > I'm new to Python with a new windows 8 machine (64-bit OS). Learning
> > programming mainly for fun. Naturally I downloaded Python 3.3 (who doesn't
> > want the
I should have added that the setup gives an error window "Cannot install"
"Python version 3.3 required, which was not found in the registry."
On Sunday, February 10, 2013 5:11:20 PM UTC-5, Rex Macey wrote:
> The setup of numpy-1.7.0 leads to a Setup window with a mes
I am sure I have python installed. I have been running it. in command line the
window title is c:\python33\python.exe. The first line begins Python 3.3.0.
Later in the line is the string "64 bit ] on Win32".
Thus it appears I am trying to run a 32bit numpy with a 64bit python. (Seems
like a
I'm new to Python and only a hobbyist programmer. A long time ago I used
Microsoft's Visual Basic which had a nice (graphical) facility for creating
GUIs which was part of the development environment. I'm wondering if there's a
utility for Python to build GUIs. I see that there is TKinter, wh
Here is one general and one specific question about creating GUIs using tkinter
from a newbie. I have created a class in which to hold some data. I want to
create a GUI to get the data from the user and store it in the object.
Browsing the web I see that a lot of examples on GUIs have the for
I have a listbox with two strings "Fixed" and "Random". It is bound by the
following statement:
lbLengthtype.bind('',set_lengthtype)
Here's the beginning of the set_lengthtype code:
def set_lengthtype(event=None):
s=lbLengthtype.get(tk.ACTIVE)
print(s)
.
The print(s) statement
rch 5, 2013 8:26:12 PM UTC-5, Rick Johnson wrote:
> On Tuesday, March 5, 2013 6:54:45 PM UTC-6, Rex Macey wrote:
>
> > I have a listbox with two strings "Fixed" and "Random".
>
> > [...] Here's the beginning of the set_lengthtype code:
>
&g
ear! to the declaration at the beginning. Just went through a
long bug search due to a similar behaviour. Terrible. I try to view
the body of a loop as if it were a separate function/method. If it
makes sense from that point of view, it will make sense in 3 months. I
mean, why would you want ot initialize something when you're done with it?
Cheers,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
se
import os
os.spawnl(os.P_WAIT, pathToExe, pathToExe, parm1, parm2, parm3, )
Remember that pathToExe must also be the first parameter.
There are many other flavors of os.spawn, check documentation!
Good luck,
Rex
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano :
> On Thu, 24 May 2007 06:59:32 +, Tim Roberts wrote:
>
>> As a general rule, I've found code like "if x == False" to be a bad idea in
>> ANY language.
>
>
> Surely that should be written as "if (x == False) == True"?
>
>
Why compare to False?
" if not x : ... "
It reall
y thing I could find that may be helpful to you:
>
> http://sourceforge.net/projects/tomoe/
>
> This includes a "stroke editor" and an engine which may suit your
> needs. Hope this helps..
>
> Good luck!
>
We use a neural net. Can't say much as I didn
Hi, I have a text file like this;
1 -33.453579
2 -148.487125
3 -195.067172
4 -115.958374
5 -100.597841
6 -121.566441
7 -121.025381
8 -132.103507
9 -108.939327
10 -97.046703
11 -52.866534
12 -48.432623
13 -112.790419
14 -98.516975
15 -98.724436
So I want to write a program in python that reads eac
in python, when I want to use arrays, I follow this way;
DATA = [0] * nint
and when I want to use I do;
DATA[i] =
do you know how to do similar but in two dimensions ?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need to write a program which reads an external text file. Each time
it reads, then it needs to delete some lines, for instance from second
line to 55th line. The file is really big, so what do you think is the
fastest method to delete specific lines in a text file ?
Thanks
--
http://mail
and regardless of the speed, what do you think would be the best
method to do this ?
Michael Bentley wrote:
> On Dec 17, 2007, at 5:34 AM, Horacius ReX wrote:
>
> > I need to write a program which reads an external text file. Each time
> > it reads, then it needs to dele
Hi, sorry but after looking for information, I still did not get how,
when reading a text file in python, can one jump to a concrete line
and then read the different data (separated by spaces). In each line
there is different number of columns so sometimes i get kind of "index
out" error. Is there
Hi,
I have to read some data from a file, and on each block it always
appears the followng string; xyz.vs.1-81_1 . It appears a lot of time
with different numbers like;
xyz.vs.1-81_1
xyz.vs.1-1234_1
xyz.vs.1-56431_1
and so on
My problem is that I need to extract from this string the number. For
Hi,
I have a C program split into different source files. I am trying a
new compiler and for some reason it only accepts a single source file.
So I need to "mix" all my different C source files into a single one.
Do you know about some type of python script able to do this kind of
task ?
Thanks
Hi,
I have to search for a string on a big file. Once this string is
found, I would need to get the number of the line in which the string
is located on the file. Do you know how if this is possible to do in
python ?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Hi, thanks for the help. Then I got running the following code;
#!/usr/bin/env python
import os, sys, re, string, array, linecache, math
nlach = 12532
lach_list = sys.argv[1]
lach_list_file = open(lach_list,"r")
lach_mol2 = sys.argv[2] # name of the lachand mol2 file
lach_mol2_file = open(lach_
Hi,
I have a file with a lot of the following ocurrences:
denmark.handa.1-10
denmark.handa.1-12344
denmark.handa.1-4
denmark.handa.1-56
...
distributed randomly in a file. I need to convert each of this
ocurrences to:
denmark.handa.1-10_1
denmark.handa.1-12344_1
denmark.handa.1-4_1
denmark.han
Hi,
I have a file with a lot of the following ocurrences:
denmark.handa.1-10
denmark.handa.1-12344
denmark.handa.1-4
denmark.handa.1-56
...
distributed randomly in a file. I need to convert each of this
ocurrences to:
denmark.handa.1-10_1
denmark.handa.1-12344_1
denmark.handa.1-4_1
denmark.han
Hi,
I'm executing a python script as a cron job. When I run it myself from
the command line it works, but when cron executes it I get an EOFError:
File "/home/rex/cronscript.py", line 6, in ?
level = int(raw_input("hello?"))
EOFError: EOF when reading a line
It
= raw_input('Prompt: ')
#
What I want to do is execute a scheduled task that prompts me for
something and allows me to enter it and have it stored somewhere. I'm
on Ubuntu Linux.
Thanks in advance!
Steven D'Aprano wrote:
> On Sat, 08 Apr 2006 23:07:54 -0700, Rex Eastbour
45 matches
Mail list logo