Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python exercises help
New Posts  All Forums:Forum Nav:

Python exercises help - Page 3

post #21 of 26
Thread Starter 
Yeah I am using an IDE. Sorry, I forgot to mention that.
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
post #22 of 26
Quote:
Originally Posted by Atham View Post

Yeah I am using an IDE. Sorry, I forgot to mention that.

If you're using an IDE, then you didn't need to follow the steps you just did. I'm not familiar with the IDE you're using but there should be an option from where you can "import" packages. Look for something like that. Then point it to the place where the unzipped Swampy folder is located and it should import the package and have it ready for use. Then you can just continue writing your code that uses methods/Classes etc. from the Swampy package. When you try to execute that code, the required stuff from Swampy will automatically be accessed so you don't need to worry about anything.

What you were doing right now would be appropriate if you were running all your programs by first typing the code into some text editor like notepad and then passing the appropriate command for executing the Python code in CMD.

EDIT: Hopefully someone who actively uses Python and external packages can come in and give some further input, if need be.
 
Desktop
(13 items)
 
MacBook Pro 13"
(6 items)
 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
CPUGraphicsRAMHard Drive
Intel i5 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Lion 13.3" @ 1280 x 800 
  hide details  
Reply
 
Desktop
(13 items)
 
MacBook Pro 13"
(6 items)
 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
CPUGraphicsRAMHard Drive
Intel i5 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Lion 13.3" @ 1280 x 800 
  hide details  
Reply
post #23 of 26
Thread Starter 
I found import module, but that only imports opened modules.
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
post #24 of 26
What are you actually trying to use Swampy for?
Riemann
(26 items)
 
   
CPUMotherboardGraphicsRAM
i7 3930K [4.4GHz @ 1.31 Vcore] ASUS Rampage IV Extreme EVGA GTX 680 4GB FTW G-Skill RipjawsZ 16GB (4x 4GB) DDR3 
Hard DriveHard DriveHard DriveHard Drive
OCZ Agility 120GB SSD Kingston SSDNow 96GB WD Caviar Green 2TB (7200RPM) Seagate 1.5TB (7200RPM) 
Hard DriveHard DriveOptical DriveCooling
Seagate 500GB (7200RPM) WD 250GB (7200RPM) ASUS BW-12B1LT Corsair H100 with 2x Corsair SP120 Quiet Edition 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit LG W2361V Customised Filco Majestouch-2 TKL [Cherry MX Br... Corsair AX860i 
CaseMouseMouse PadAudio
Cooler Master HAF-X Mionix NAOS 5000 Steelseries 4HD Logitech Z-5500 
AudioAudioAudioOther
Logitech G930 Logitech Z323 Sennheiser HD 518 Lamptron FC2 
OtherOther
Bitfenix Sprectre Pro 230mm Black Bitfenix Spectre Pro 200m Black x3 
RAMHard DriveCoolingMonitor
32GB Corsair Dominator Platinum 2400MHz 4TB Seagate Barracuda Corsair H100i ASUS PB278Q 
KeyboardOther
WASD v2 Sleeved cables 
  hide details  
Reply
Riemann
(26 items)
 
   
CPUMotherboardGraphicsRAM
i7 3930K [4.4GHz @ 1.31 Vcore] ASUS Rampage IV Extreme EVGA GTX 680 4GB FTW G-Skill RipjawsZ 16GB (4x 4GB) DDR3 
Hard DriveHard DriveHard DriveHard Drive
OCZ Agility 120GB SSD Kingston SSDNow 96GB WD Caviar Green 2TB (7200RPM) Seagate 1.5TB (7200RPM) 
Hard DriveHard DriveOptical DriveCooling
Seagate 500GB (7200RPM) WD 250GB (7200RPM) ASUS BW-12B1LT Corsair H100 with 2x Corsair SP120 Quiet Edition 
OSMonitorKeyboardPower
Windows 7 Ultimate 64-bit LG W2361V Customised Filco Majestouch-2 TKL [Cherry MX Br... Corsair AX860i 
CaseMouseMouse PadAudio
Cooler Master HAF-X Mionix NAOS 5000 Steelseries 4HD Logitech Z-5500 
AudioAudioAudioOther
Logitech G930 Logitech Z323 Sennheiser HD 518 Lamptron FC2 
OtherOther
Bitfenix Sprectre Pro 230mm Black Bitfenix Spectre Pro 200m Black x3 
RAMHard DriveCoolingMonitor
32GB Corsair Dominator Platinum 2400MHz 4TB Seagate Barracuda Corsair H100i ASUS PB278Q 
KeyboardOther
WASD v2 Sleeved cables 
  hide details  
Reply
post #25 of 26
You have to install packages if you want them to be importable for anywhere. You can search for how to do that with Py Portable, but installing essentially just means sticking the folder in the Python Lib/site-packages folder. You can install stuff in a local Python installation and then just copy them to the Py Portable site-packages folder and it'll work.
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
post #26 of 26
Thread Starter 
Oh I see.

So I just copy and paste the file contents into the libs. It works. !

Thanks everyone. I thought I had to paste the folder of the package. Now I know that I have to paste the contents of the package into the libs folder. Thanks a lot.
Quote:
What are you actually trying to use Swampy for?
It is part of a case study in a Python Book.
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
Navy Beast
(14 items)
 
  
CPUMotherboardGraphicsRAM
[INTEL] Core i7 3770K @ 4.5 GHz w/ 1.225V [ASUS] P8Z77-V [GIGABYTE] GTX 670 Windforce Edition [CORSAIR] Vengeance 8GB 1866MHz CL9 
Hard DriveHard DriveOptical DriveCooling
[Intel] 520 120GB [WD] Green 1TB SATA II [SAMSUNG] SH-222BB [NOCTUA] NH-U12P-SE2 
OSMonitorKeyboardPower
[MICROSOFT] Windows 7 Ultimate 64 Bit [ASUS] VH242 24" 1920 x 1080 [BENQ] A800 => Corsair K90 very soon [CORSAIR] AX750 
CaseMouse
[NZXT] Switch 810 Microsoft Windows Optical Mouse 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Python exercises help