thing I find annoying about an editor set to expand
tabs to spaces is that it takes one keypress to indent but four (or whatever) to unindent.
--
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
/listinfo/python-list
4', 'cyta.gr')
How should i write the cursor.execute in order to be parsed properly?
As i have it now %s does not get substituted.
You don't get the substitution because you're missing a %.
Change:
... LIKE "%s"''', (pID, ...
To:
... LIKE "%s"''' % (pID, ...
--
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
Can anyone explain please.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
I tried the following codes:
import urllib2response =
urllib2.urlopen('http://cordis.europa.eu/search/result_en?q=uk&format=csv')myCSV
= response.read()
myFile = pd.read_csv(myCSV)
but, it did not work well.
Can any one help?
Regards.
David
--
https://mail.python.org/mailman/l
there a way to capture the file?
Regards.
David
On Wednesday, 5 April 2017, 17:19, Skip Montanaro
wrote:
I'm not positive, but try passing response to read_csv() instead of reading
the bytes yourself.
Skip
On Apr 5, 2017 10:38 AM, "David Shi via Python-list"
wrote:
I was using IPython notebooks. All the sudden, it asks for password or token.
I did not set any password or token.
How do I get back to use my IPython notebooks?
Looking forward to hearing from you.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Is there a Python solution for turning a web page into Pandas DataFrame table?
Looking forward to hearing from you.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
encode character u'\xa3' in position 0:
ordinal not in range(128)
Can anyone help?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
What is the best way to convert XML document into a pandas dataframe?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Have a look at this example.
http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text
How to pd.read_csv into a DataFrame with multiple seperators?
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Dear All,
Can anyone help to read a text file into a Pandas DataFrame Table?
Please see the link below.
http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text
Regards.
David
--
https://mail.python.org/mailman/listinf
be made?
Looking forward to hearing from you.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
13.1. csv — CSV File Reading and Writing — Python 2.7.13 documentation
|
| |
13.1. csv — CSV File Reading and Writing — Python 2.7.13 documentation
| |
|
I am trying to parse this text file into a table.
How to use consecutive 3 spaces to work as delimiter with csv.reader?
Looking
Which VCF reader has been well tested and proven to be robust?
Looking forward to hearing from you.
Regards.
David
--
https://mail.python.org/mailman/listinfo/python-list
Any way to do that?
The link to a sample dataset is as follows:
http://www.ebi.ac.uk/ena/data/warehouse/search?query=%22geo_circ(-0.587,-90.5713,170)%22&result=sequence_release&display=text
Looking forward to hearing from you.
Regards.
David
--
https://mail.python.org/mailman/listinf
/listinfo/python-list
t.right(180)
turtle.bye()
Thank you, Harshi
--
https://mail.python.org/mailman/listinfo/python-list
n Saturday, April 22, 2017 3:56 AM, Peter Otten <[email protected]> wrote:
Harshika Varadhan via Python-list wrote:
> I am creating a game where the user inputs a coordinate to place their
> piece on a chess board. My code then draws the chess board with a turtle
> and fills in
On Monday, May 1, 2017 at 9:47:10 PM UTC+1, [email protected] wrote:
> On Monday, May 1, 2017 at 11:27:01 AM UTC-7, Robert L. wrote:
> [no Python]
>
> Do you ever plan to ask any questions about Python? Or are you just using a
> few lines of code as a fig leaf for the race baitin
Hello,
I have downloaded python-3.6.1-amd64.exe and it is fine to install it through
GUI. However, I want to write a batch file to install it via command line.
Since the installation process is interactive, it seems that the auto-install
batch file is difficult. What I want to do is:
set
or in scoring URLs for preferences.
* Removed Python 2.6 from the support list.
A more detailed change log is available at [2].
Please try it out, and if you find any problems or have any suggestions for
improvements, please give some feedback using the issue tracker! [3]
Regards,
Vinay Sajip
[1]
Hi,
I have simple piece of code which uses two libraries (numpy and openpyxl). The
script is called from another application. Currently, if someone wants to run
my program, he has to first install the python completely via its installer.
Is there any way to pack my .py with all required
OK. I did that but it fails! Please see the stack
D:\ThinkPad\Documents\NetBeansProjects\ExcelTest>pyinstaller exread.py
96 INFO: PyInstaller: 3.2.1
96 INFO: Python: 3.6.1
98 INFO: Platform: Windows-10-10.0.14393-SP0
103 INFO: wrote D:\ThinkPad\Documents\NetBeansProjects\ExcelTest\exread.s
] for j in p.rows])
How can I fix that? I have stuck at this problem. For medium sized files (16K
rows and 50 columns) it is fine.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
, May 10, 2017 7:25 PM, Peter Otten <[email protected]> wrote:
Mahmood Naderan via Python-list wrote:
> Hello,
>
> The following code which uses openpyxl and numpy, fails to read large
> Excel (xlsx) files. The file si 20Mb which contains 100K rows and 50
> colu
rows. Mine is
about 100k. Currently, the task manager shows about 4GB of ram usage while
working with numpy.
Regards,
Mahmood
On Wed, 5/10/17, Peter Otten <[email protected]> wrote:
Subject: Re: Out of memory while reading excel file
To: pytho
On Wed, 5/10/17, Peter Otten <[email protected]> wrote:
Subject: Re: Out of memory while reading excel file
To: [email protected]
Date: Wednesday, May 10, 2017, 6:30 PM
Mahmood Naderan via Python-list wrote:
> Well actually cells are treated as
strings and not integer
Hi,
I am confused with that. If you say that numpy is not suitable for my case and
may have large overhead, what is the alternative then? Do you mean that numpy
is a good choice here while we can reduce its overhead?
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
--
https://mail.python.org/mailman/listinfo/python-list
, column=c)
arr[r, c] = d.value
However, the operation is very slow. I printed row number to see how things are
going. It took 2 minutes to add 200 rows and about 10 minutes to add the next
200 rows.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
the number of columns in my excel
file (p.max_column)
The excel file looks like
CHR1 11,202,100 NM_198576.3 PASS 3.08932G|B|C -.
. .
Note that in each row, some cells are '-' or '.' only. I want to read all cells
as string. Then I will write the matrix in a file and my main code (java) will
process that. I chose openpyxl for reading excel files, because Apache POI (a
java package for manipulating excel files) consumes huge memory even for medium
files.
So my python script only transforms an xlsx file to a txt file keeping the cell
positions and formats.
Any suggestion?
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
The ? is indeed for variable substitution, but AFAIK only for field values, not
for table names, which is why your first example doesn't work and your second
and third examples do work.
--
https://mail.python.org/mailman/listinfo/python-list
0][1] = 11,232,445
And both are strings. Is that possible?
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
second line is empty ("\n") and the third line is the
second row of the excel file.
Any thought?
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
Thanks a lot for suggestions. It is now solved.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
may reduce
confusion, it won't actually help someone who wants to install a Python
package that needs a C compiler.
Of course, the error message could give a link to the appropriate
compiler. And then the user (who presumably isn't a Windows compiler
expert) will if they're really
could parse 16
pages at a time. That change would require a bit more work but it would
fix some problems that's been nagging me for a while about the parser class.
Thank you,
Chris Reimer
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
There are some text files ending with _chunk_i where 'i' is an integer. For
example,
XXX_chunk_0
XXX_chunk_1
...
I want to concatenate them in order. Thing is that the total number of files
may be variable. Therefore, I can not specify the number in my python script.
It has to b
ould possibly need.
>xxx_chunk_01 sorts less than xxx_chunk_10.
So, if I write
import glob;
for f in glob.glob('*chunk*'):
print(f)
it will print in order. Is that really sorted or it is not guaranteed?
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
hen writing them to the output until there are no
more files. Or, if a list of matching files is obtained, the length of
the list will also give you the last filename.
(But this won't work if there are gaps in the sequence or the numeric
format is variable.)
--
bartc
--
https://
ith('chunk') and right.isdigit():
filenames[int(right)] = filename
sorted_filenames = [ filenames[k] for k in sorted(filenames.keys()) ]
It seems that 'filename' should be 'right'.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
. So 'right' is just the numeric suffix - you need 'name' for the
open() call.
Cheers,
Cameron Simpson
--
https://mail.python.org/mailman/listinfo/python-list
html
--
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
How it is possible to embed a package in my project? I mean, in my python
script I have written
import openpyxl
So, the user may not have installed that package and doesn't understand what is
pip!
Please let me know the instructions or any document regarding that.
Regards,
Ma
No idea?...
Regards,
Mahmood
On Tuesday, May 30, 2017 1:06 AM, Mahmood Naderan via Python-list
wrote:
Hello,
How it is possible to embed a package in my project? I mean, in my python
script I have written
import openpyxl
So, the user may not have installed that package and doesn
Hello,
Although I have installed a package via pip on a centos-6.6, python interpreter
still says there is no such package!
Please see the output below
$ python exread2.py input.xlsx tmp/output
Traceback (most recent call last):
File "/home/mahmood/excetest/exread2.py", line 1
AM, Mahmood Naderan via Python-list
> wrote:
>
>
>
> Hello,
>
> How it is possible to embed a package in my project? I mean, in my python
> script I have written
>
>
> import openpyxl
>
>
> So, the user may not have installed that packag
Well, on rocks there exist multiple pythons. But by default the active is 2.6.6
$ python -V
Python 2.6.6
I have to say that the script doesn't modify sys.path. I only use sys.argv[]
there
I can put all dependent modules in my project folder but that will be dirty.
Regards,
Mahmood
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named openpyxl
But
$ find /opt -name openpyxl
/opt/rocks/lib/python2.6/site-packages/openpyxl
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
Consider this output
[root@cluster ~]# pip --version
pip 9.0.1 from /opt/rocks/lib/python2.6/site-packages/pip-9.0.1-py2.6.egg
(python 2.6)
[root@cluster ~]# easy_install --version
distribute 0.6.10
[root@cluster ~]# find /opt -name python
/opt/rocks/lib/graphviz/python
/opt/rocks/bin/python
How to make sure the result of Pandas.to_csv does not have non-ASCII code?
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
oint out that a 'character' is NOT a data type in
Python, in the same sense as it is in other languages.
--
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
ps://mail.python.org/mailman/listinfo/python-list
ps://mail.python.org/mailman/listinfo/python-list
Maybe... But specifically in my case, the excel file is exported from a web
page. I think there should be a way to read the content as a pure text.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
to formatting.
Regards,
Mahmood
--
https://mail.python.org/mailman/listinfo/python-list
OK thank you very much. As you said, it seems that it is too late for my python
script.
Regards,
Mahmood
On Monday, June 5, 2017 10:41 PM, Dennis Lee Bieber
wrote:
On Mon, 5 Jun 2017 14:46:18 + (UTC), Mahmood Naderan via Python-list
declaimed the following:
>>if the cell
Sent from Yahoo Mail on Android
I have python 3.5.2 installed and recently I installed python 3.6 and after
installing the problem seems to occur.
Whenever I start IDLE it shows an error message like "IDLE can't create a sub
process or windows firewall might be blocking it"
dule is useful, personally, I've
switched to using APSW which I've found to be extremely reliable and gives much
more access to SQLite functionality: https://rogerbinns.github.io/apsw/
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, June 15, 2017 at 1:47:00 PM UTC+1, [email protected] wrote:
> I am trying to use sqlite
>
> $ python2.7
> Python 2.7.10 (default, Feb 22 2016, 12:13:36)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2
> Type "help", "copyright", "
Hi all,
Is there on line course in Python? I am looking for a level between beginner
and intermediate. I would appreciate if you could suggest me?
Thank you.
--
https://mail.python.org/mailman/listinfo/python-list
Sorry for this newbie question:
I installed Python v3.6.1 on win 7. Afterwards I tried to execute the following
simple python script from webpage
http://www.pythonforbeginners.com/code-s...me-script/:
Python Code:
from datetime import datetime
now = datetime.now()
mm = str(now.month)
dd
As I observed v3.6.1 installs (on Windows 7) in addition to the core python
engine a second program "Python Launcher".
As far as I read this component seems to be not necessary since it only aims to
facilitate the handling with *.py scripts on Windows.
When I always call Python s
Can I somehow check from inside a Python script if the executing Python engine
is major version v2 or v3?
I am thinking about a code similar to
if (os.python-majorversion<3)
print hello
else
print (hello)
Additional question:
Is there a way to execute a python script with v3 python eng
A new version of the Python module which wraps GnuPG has been released.
What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.
See the project website [1] for more information.
Brief summary:
* Updated message handling logic to no
I have never used it personally. It always looked interesting, but I never ran
into a need to generate the source for it.
-Original Message-
From: Python-list [mailto:[email protected]] On
Behalf Of Steve D'Aprano
Sent: Monday, July 17, 2017 9:58
o the built-in ordering for
strings."
--
https://mail.python.org/mailman/listinfo/python-list
Hi, I am new to Python and though I have been able to download the 3.6 version
on my laptop , I still have issues with the syntax. While writing a program to
execute, it will display syntax error with different shades of color usually
green or yellow.
What can I do about this? How do I know
Good Day,
I have decided to learn more about programming so I picked up the book
Beginning Programming by Matt Telles. After following the directions verbatim
and going to the Python site to download the latest version 3, which is what
the book recommended, I keep getting the following
Can anyone help with the python code that can add 101, 102, 103...2033 please?
As I said before, I'm new to python and need assistance in this regard.
Thanks for always assisting.
Sent from my iPhone
--
https://mail.python.org/mailman/listinfo/python-list
some ascii graphics.
(Well, not ascii, but utf-8 box-drawing characters — I hope they come through
ok.
And, of curse, it won't display properly with a proportional font.)
The left side is the program lines, and the right side tries to show the way Python implements
the name binding to th
s the program lines, and the right side tries to show the way Python implements
the name binding to the data in memory. (But I abbreviated the long assignment line,
alist[0],alist[1],alist[2]=3,6,9 to )
Program line Variable bound to memory
=== Initial assignment ===
tremely clear-cut in comparison to Python, isn't it? Anyway, while
any new user of a programming language certainly can be expected to
take good efforts to learn a lot of new stuffs, I suppose it's good
for any practical programming language to minimize the cases of
surprises for those th
confusion, Chris.
--
-=- Larry -=-
--
https://mail.python.org/mailman/listinfo/python-list
Greetings,
I have Python 3.6 script on Windows to scrape comment history from a
website. It's currently set up this way:
Requestor (threads) -> list -> Parser (threads) -> queue -> CVSWriter
(single thread)
It takes 15 minutes to process ~11,000 comments.
When I replace
BeautifulSoup may not be thread-safe. I've never
had a problem with threads storing the output into a queue. Using a
queue (random order) instead of a list (sequential order) to feed pages
for the input is making it wonky.
Chris R.
--
https://mail.python.org/mailman/listinfo/python-list
in at different times for the parser worker threads to get for
processing.
Similar situation with a list but I sort the list before giving it to
the parser, so all the items are in sequential order and fed to the
parser one at time.
Chris R.
--
https://mail.python.org/mailman/listinfo/python-list
20 read_threads requesting and putting pages into the output
queue that is the input_queue for the parser. My soup_threads can get
items from the queue, but BeautifulSoup doesn't do anything after that.
Chris R.
--
https://mail.python.org/mailman/listinfo/python-list
list, I'm using a for loop to input items into the parser.
If I'm using a queue, I'm using worker threads to put or get items.
The item is still the same whether in a list or a queue.
Chris R.
--
https://mail.python.org/mailman/listinfo/python-list
ris R.
--
https://mail.python.org/mailman/listinfo/python-list
Is there tested Python code for parsing N-Triples?
Looking forward to hearing from you.
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
I am running a master degree programme and very new to programming including
python. I have been given a project to write a python program on exponential
smoothing of some selected stocks. The program should user the user to input
alpha, display the graph of the original data and "smo
How best to use rdflib to parse N-Triples files and turn them into Pandas
tables?
Looking forward to hearing from you.
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
thing like "Baginton
E04009817".
Then, put the name and code into corresponding cells in 2 columns.
Maybe, the solution is to find ways to select those lines having
rdf-schema#label
Is there a good example?
Regards,
David
--
https://mail.python.org/mailman/listinfo/python-list
ecksums and
signatures (by default): so, if the package being installed was
updated w/o version update, to pip it's going to be the same package.
Not just that, for some packages pip has to resort to building them
from source, in which case nobody can guarantee the end result.
Insecurity
Am Tue, Oct 08, 2024 at 08:07:04PM +0100 schrieb MRAB via Python-list:
> >unwanted_tex = '\sout{'
> >if unwanted_tex not in line: do_something_with_libreoffice()
> >
> That should be:
>
> unwanted_tex = r'\sout{'
Hm.
Python 3.11.2 (mai
Karsten Hilbert writes:
Python 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more
information.
>>> tex = '\sout{'
>>>
those things, and instead do:
from pathlib import Path
path = Path(r'C:\Windows\example')
since in a Path the trailing '\' or '/' is unnecessary. Which leaves
very few remaining uses for a raw-string with a trailing '\'...
--
https://mail.python.org/mailman/listinfo/python-list
Am Mon, Oct 07, 2024 at 08:35:32AM -0500 schrieb Michael F. Stemper via
Python-list:
> I'm trying to discard lines that include the string "\sout{" (which is TeX,
> for
> those who are curious. I have tried:
> if not re.search("\sout{", line):
> if no
Just a final brief note.
I am leaving the python community so don't worry that anything happened to me.
I have a disagreement with the direction some people are taking with the python
community that is my issue and it that probably will not bother most people.
I have lots of other inte
.
-Original Message-
From: Python-list On
Behalf Of Peter J. Holzer via Python-list
Sent: Saturday, October 12, 2024 7:00 AM
To: [email protected]
Subject: Re: Correct syntax for pathological re.search()
On 2024-10-11 17:13:07 -0400, AVI GROSS via Python-list wrote:
> Is there some util
On 10/11/2024 8:37 PM, MRAB via Python-list wrote:
On 2024-10-11 22:13, AVI GROSS via Python-list wrote:
Is there some utility function out there that can be called to show
what the
regular expression you typed in will look like by the time it is ready
to be
used?
Obviously, life is not that
On 10/12/2024 6:59 AM, Peter J. Holzer via Python-list wrote:
On 2024-10-11 17:13:07 -0400, AVI GROSS via Python-list wrote:
Is there some utility function out there that can be called to show what the
regular expression you typed in will look like by the time it is ready to be
used?
I assume
Am Tue, Oct 08, 2024 at 04:59:48PM -0400 schrieb Alan Bawden via Python-list:
> Karsten Hilbert writes:
>
> Python 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux
>Type "help", "copyright", "credits" or "license
After all the shenanigans two weeks ago – everyone discovering nasty little
problems in release candidate 2 – the last week was suspiciously quiet, and
therefore I can finally say:
<https://discuss.python.org/t/python-3-13-0-final-has-been-released/66972#p-196505-python-3130-is-now-availabl
cases, ...
-Original Message-
From: Python-list On
Behalf Of Gilmeh Serda via Python-list
Sent: Friday, October 11, 2024 10:44 AM
To: [email protected]
Subject: Re: Correct syntax for pathological re.search()
On Mon, 7 Oct 2024 08:35:32 -0500, Michael F. Stemper wrote:
> I'
On 10/5/2024 4:27 PM, Ulrich Goebel via Python-list wrote:
Hi,
I learned to use virtual environments where ever possible, and I learned to pip
install the required packages there.
That works quite nice at home. Now I come to deploy a Python script on a debian
linux server, making it usable
Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via Python-list:
> Debian (or even Python3 itself) doesn't allow to pip install required
> packages system wide, so I have to use virtual environments even there. But
> is it right, that I have to do that for eve
Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via
Python-list:
> Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via
> Python-list:
>
> > Debian (or even Python3 itself) doesn't allow to pip install required
> > packages system wide
5801 - 5900 of 6733 matches
Mail list logo