473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

i am new to python-Please somebody help

i dont know how to convert a txt file into a zip file

(i.e.,)i have a file named packages and i want the packages file with
a ".gz" extension by implementing a python program

Aug 2 '07 #1
14 1275
On Aug 2, 4:31 am, cool.vimalsm...@gmail.com wrote:
>
i want the packages file with
a ".gz" extension by implementing a python program
http://docs.python.org/lib/module-gzip.html

Aug 2 '07 #2
On Thu, 02 Aug 2007 09:31:43 +0000, cool.vimalsmail wrote:
[snip]

You would be better off actually writing a sensible subject line instead
of grovelling.

Subject: How to use gzip in Python? [beginner]

Then, having written a good subject line, it might have suggested a good
search string for Google: "gzip python"

http://www.google.com.au/search?&q=gzip+python

The first two links found will answer your question.
--
Steven.

Aug 2 '07 #3
On Aug 2, 8:51 am, Steven D'Aprano
<st...@REMOVE.THIS.cybersource.com.auwrote:
On Thu, 02 Aug 2007 09:31:43 +0000, cool.vimalsmail wrote:

[snip]

You would be better off actually writing a sensible subject line instead
of grovelling.

Subject: How to use gzip in Python? [beginner]

Then, having written a good subject line, it might have suggested a good
search string for Google: "gzip python"

http://www.google.com.au/search?&q=gzip+python

The first two links found will answer your question.

--
Steven.
This link answers my question --http://www.google.com/search?hl=en&q...+list+rudeness.
Honestly, I have developed in both Ruby and Python for years now and
have consistently found that the Ruby community if more newbie-
friendly than Python's. Your points are well-taken in how to properly
post and how to do your own homework. Message correct. Delivery
lacking...

Aug 2 '07 #4
On Aug 2, 8:51 am, Steven D'Aprano
<st...@REMOVE.THIS.cybersource.com.auwrote:
On Thu, 02 Aug 2007 09:31:43 +0000, cool.vimalsmail wrote:

[snip]

You would be better off actually writing a sensible subject line instead
of grovelling.

Subject: How to use gzip in Python? [beginner]

Then, having written a good subject line, it might have suggested a good
search string for Google: "gzip python"

http://www.google.com.au/search?&q=gzip+python

The first two links found will answer your question.

--
Steven.
<OT>
Unlike gregarican, I mostly agree with the content of your post.
Except for your subject line suggestion. Why on earth would you
recommend someone use the obnoxious "How to ______ ?" question
format? Yes, I know it's extremely common, but it's completely
nonsensical English. Just try saying it out loud with an inquiring
inflection on the last word. Sounds ridiculous doesn't it? At least
without the question mark it means that the thread is on the topic of
"How to _____".
</OT>

Aug 2 '07 #5

"gregarican" <gr*********@gmail.comwrote in message
news:11*********************@q3g2000prf.googlegrou ps.com...
| friendly than Python's. Your points are well-taken in how to properly
| post and how to do your own homework. Message correct. Delivery
| lacking...

Sorry, I saw nothing rude in Steven's straightforward and indeed polite
suggestion. Your post, however, ....

tjr

Aug 2 '07 #6
On Aug 2, 12:58 pm, "Terry Reedy" <tjre...@udel.eduwrote:
"gregarican" <greg.kuj...@gmail.comwrote in message

news:11*********************@q3g2000prf.googlegrou ps.com...
| friendly than Python's. Your points are well-taken in how to properly
| post and how to do your own homework. Message correct. Delivery
| lacking...

Sorry, I saw nothing rude in Steven's straightforward and indeed polite
suggestion. Your post, however, ....

tjr
Maybe it's just me but the word "grovelling" just doesn't ring of
newbie friendliness. To each their own I guess. Kind of like the
Smalltalk list where a few respondents are really dry. Someone will
post asking something like "Can I use Smalltalk to do X so that it
talks to Y?" One guy (without pointing to a link or offering a
snippet) just posts "Yes." I guess literally they have contributed. Or
someone calls your house and asks, "Is so-and-so there?" You just say
"Yes" and hang up on them :-)
Aug 2 '07 #7
On 2007-08-02, gregarican <gr*********@gmail.comwrote:
On Aug 2, 12:58 pm, "Terry Reedy" <tjre...@udel.eduwrote:
>"gregarican" <greg.kuj...@gmail.comwrote in message

news:11*********************@q3g2000prf.googlegro ups.com...
| friendly than Python's. Your points are well-taken in how to properly
| post and how to do your own homework. Message correct. Delivery
| lacking...

Sorry, I saw nothing rude in Steven's straightforward and indeed polite
suggestion. Your post, however, ....

tjr

Maybe it's just me but the word "grovelling" just doesn't ring
of newbie friendliness.
Maybe not, but it seemed to be a reasonable characterisation of
the subject line.

The only thing more valued than politeness on most programming
newsgroups is correctness.
To each their own I guess. Kind of like the Smalltalk list
where a few respondents are really dry. Someone will post
asking something like "Can I use Smalltalk to do X so that it
talks to Y?" One guy (without pointing to a link or offering a
snippet) just posts "Yes." I guess literally they have
contributed. Or someone calls your house and asks, "Is
so-and-so there?" You just say "Yes" and hang up on them :-)
Those kind of replies are posted for the fun of it, and with the
knowledge that somebody else will feel less flip at the time and
probably provide real help.

--
Neil Cerutti
The pastor will preach his farewell message, after which the choir will sing,
"Break Forth Into Joy." --Church Bulletin Blooper
Aug 2 '07 #8

"gregarican" <gr*********@gmail.comwrote in message
news:11**********************@i13g2000prf.googlegr oups.com...
| On Aug 2, 12:58 pm, "Terry Reedy" <tjre...@udel.eduwrote:
|| Sorry, I saw nothing rude in Steven's straightforward and indeed
polite
| suggestion. Your post, however, ....
| >
| tjr
|
| Maybe it's just me but the word "grovelling" just doesn't ring of
| newbie friendliness. To each their own I guess.

I'll give you half a point here. I have seen enough friendly, helpful
posts from Steven that I am predisposed to give a friendly interpretation,
especialy when additional helpful suggestions follow. 'Stop grovelling'
<send*would* have been rude, but that is far away from what Steven
posted.

| Kind of like the
| Smalltalk list where a few respondents are really dry. Someone will
| post asking something like "Can I use Smalltalk to do X so that it
| talks to Y?" One guy (without pointing to a link or offering a
| snippet) just posts "Yes." I guess literally they have contributed. Or
| someone calls your house and asks, "Is so-and-so there?" You just say
| "Yes" and hang up on them :-)

I'll take the half point back here ;-). "Yes <click>" is precisely what
Steven did not do, so it was *not* 'kind of like'. He followed with a
useful suggestion and example link.

tjr

Aug 2 '07 #9
gregarican a écrit :
(snip)
This link answers my question --http://www.google.com/search?hl=en&q...+list+rudeness.
I seriously don't think that this newsgroup can be qualified as "rude"
(and I'm possibly one of the "rudest" persons here). Compared to most
comp.* newsgroup, Python is certainly one of the most tolerant and
newbie-friendly around - and quite a lot of newcomers say so. FWIW, even
FAQs, RTFMs or STFWs are usually expressed in a mostly polite way, and
almost always with links and pointers (and FWIW, it's the case here).
Honestly, I have developed in both Ruby and Python for years now and
have consistently found that the Ruby community if more newbie-
friendly than Python's.
I spent sometimes lurking on c.l.ruby and didn't find it *that*
friendly. Not more than c.l.py at least, and certainly less respectful
of peoples coming from other languages...

Now if you want some examples of definitively "rude" newsgroups, I
suggest you take your chance on other newsgroups in the comp.*
hierarchy...
Aug 2 '07 #10
On Aug 2, 11:03 am, Bruno Desthuilliers
<bdesth.quelquech...@free.quelquepart.frwrote:
gregarican a écrit :
(snip)
This link answers my question -->http://www.google.com/search?hl=en&q...+list+rudeness.

I seriously don't think that this newsgroup can be qualified as "rude"
(and I'm possibly one of the "rudest" persons here). Compared to most
comp.* newsgroup, Python is certainly one of the most tolerant and
newbie-friendly around - and quite a lot of newcomers say so. FWIW, even
FAQs, RTFMs or STFWs are usually expressed in a mostly polite way, and
almost always with links and pointers (and FWIW, it's the case here).
Honestly, I have developed in both Ruby and Python for years now and
have consistently found that the Ruby community if more newbie-
friendly than Python's.

I spent sometimes lurking on c.l.ruby and didn't find it *that*
friendly. Not more than c.l.py at least, and certainly less respectful
of peoples coming from other languages...

Now if you want some examples of definitively "rude" newsgroups, I
suggest you take your chance on other newsgroups in the comp.*
hierarchy...
Good points. I guess I read a little too much into things. Apology
extended. I do recall when I was learning Python most of my questions
weren't crushed or anything. And I hear you about some of the other
comp.* lists. Browsing them awhile back I was left with my jaw open
thinking, "Oh no he diiiiiii....nt."

Aug 2 '07 #11

"gregarican" <greg.....il.comwrote:
Maybe it's just me but the word "grovelling" just doesn't ring of
newbie friendliness. To each their own I guess. Kind of like the
Smalltalk list where a few respondents are really dry. Someone will
post asking something like "Can I use Smalltalk to do X so that it
talks to Y?" One guy (without pointing to a link or offering a
snippet) just posts "Yes." I guess literally they have contributed. Or
someone calls your house and asks, "Is so-and-so there?" You just say
"Yes" and hang up on them :-)
Or at table - "Can you pass the salt?"

"Yes"

< a brief hiatus, laden with unfulfilled expectations and no action >

"Please pass me the salt"

"Certainly - there you are."

On the subject of "grovelling" - this refusal to tug, and to condone
tugging at forelocks, may be a Southern Hemisphere affliction.

Don't like it myself.

- Hendrik

Aug 3 '07 #12
"Bruno Desthuilliers" <bdes...art.frwrote:
>Now if you want some examples of definitively "rude" newsgroups, I
suggest you take your chance on other newsgroups in the comp.*
hierarchy...
I know someone who derisively refers to anybody that is associated
with computers in any way as a "Pencil Neck".

This leads me to wonder whether or not the rudeness stems from
the physically deficient's urge to kick sand in the bully's face.

- Hendrik

Aug 3 '07 #13
On the discussion of rudeness, we have to include the OP. He/She/it
did not even attempt a Google before posting, and posted with a
meaningless subject. We'll chalk that up to newness, but some sort of
retort was called for IMHO. How else do we learn the conventions that
govern rudeness. Personally, there is only one form of rudeness that
can not be overlooked and that is the prima donna that says "My Way Is
The Only Way", or posts some nonsense like "that is not correct" with
no other explanation. Any attempt to sincerely help, I can live with.

Aug 3 '07 #14
BTW - on the subject of polite discussions, how about this one as an
example of opinions politely expressed.
Oh, and does anyone know how to use zip in Python. Yes+1.

Aug 3 '07 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Emile van Sebille | last post by:
QOTW: "If we get 2.3.3c1 out in early December, we could release 2.3.3 final before the end of the year, and start 2004 with a 100% bug-free codebase <wink>." -- Tim Peters "cjOr proWe vbCould...
0
by: Emile van Sebille | last post by:
QOTW: "Have you ever used the copy module? I am *not* a beginner, and have used it *once* (and I can't remember what for, either)." -- Michael Hudson "It will likely take a little practice...
0
by: John J Lee | last post by:
QOTW: "...simple genexps will work fine anyway almost all the time, so it doesn't appear to matter much that devious uses will have nightmarish semantics." -- Tim Peters on Generator Expressions ...
0
by: Cliff Wells | last post by:
QOTW: "I find it hard to believe nobody has tried this yet, unless it's the case that those who know how to do it also know that it's actually not possible for some reason..." -- Peter Hansen...
1
by: Josiah Carlson | last post by:
QOTW: "Python, the language that wraps tightly around a problem and swallows it whole." -- Raymond Hettinger Because it is so important, this link is re-posted for the future (originally...
0
by: Josiah Carlson | last post by:
QOTW: "XML with elementtree is what makes me never have think about XML again." -- Istvan Albert "'Plays well with others' was a strong motivator for Python's design, and that often means...
0
by: Cameron Laird | last post by:
QOTW: "Really, of course, the only things you need to make explicit are the ones that readers don't understand." -- Steve Holden "Working with unicode objects in Python is so transparent, it's...
0
by: Simon Brunning | last post by:
QOTW: "It's not perfect, but then nobody in this thread has offered anything even remotely resembling perfect documentation for regular expressions yet. <wink>" - Peter Hansen "Python's flavor...
0
by: Simon Brunning | last post by:
QOTW: "Python is more concerned with making it easy to write good programs than difficult to write bad ones." - Steve Holden "Scientists build so that they can learn. Programmers and engineers...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 349 open ( +7) / 3737 closed (+25) / 4086 total (+32) Bugs : 939 open (-12) / 6648 closed (+60) / 7587 total (+48) RFE : 249 open...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.